Discussion:
anti top-posting gnus-article-outlook-rearrange-citation fails for gmail. II
Uwe Brauer
2014-09-30 13:21:20 UTC
Permalink
Hello

I debuged the relevant functions and the problem is
in the function
gnus-outlook-repair-attribution-outlook

I have attached it below.

To be more specific the problem lies in the call:


re-search-forward

For example in top-posting generated by apple mail

nil t) returns a number, say 700

While in top-posting generated by gmail

nil t) returns nil

However when I sent my self a mail using gmail this does not happen so
I am really desperate.

So that is why the rearrangement does not work. I just don't understand
why it returns nil for some gmail messages

(defun gnus-outlook-repair-attribution-outlook () ;this function is the problem with google
"Repair a broken attribution line (Outlook)."
(let ((case-fold-search nil)
(inhibit-read-only t)
(cite-marks gnus-outlook-deuglify-cite-marks))
(gnus-with-article-buffer
(article-goto-body)
(when (re-search-forward
(concat "^\\([^" cite-marks "].+\\)"
"\\(" gnus-outlook-deuglify-attrib-verb-regexp "\\)"
"\\(.*\n?[^\n" cite-marks "].*\\)?"
"\\(" gnus-outlook-deuglify-attrib-end-regexp "\\)$")
nil t)
^^^^^^^^
(gnus-kill-all-overlays)
(replace-match "\\1\\2\\4")
(match-beginning 0)))))


Uwe Brauer
Lars Ingebrigtsen
2015-01-27 03:03:13 UTC
Permalink
Post by Uwe Brauer
I debuged the relevant functions and the problem is
in the function
gnus-outlook-repair-attribution-outlook
[...]
Post by Uwe Brauer
While in top-posting generated by gmail
nil t) returns nil
Could you include an example mail that fails?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Lars Ingebrigtsen
2015-02-18 01:07:14 UTC
Permalink
Post by Lars Ingebrigtsen
Could you include an example mail that fails?
Here is an example (off-list) tell me whether I send it in a different
format. I used
gnus-summary-write-article-file
I think it's basically this thing that fails to match the line below:

(when (re-search-forward
(concat "^\\(" gnus-outlook-deuglify-attrib-cut-regexp "\\)?"
"\\([^" cite-marks "].+\\)\n\\([^\n" cite-marks "].*\\)?"
"\\(" gnus-outlook-deuglify-attrib-verb-regexp "\\).*"
"\\(" gnus-outlook-deuglify-attrib-end-regexp "\\)$")
nil t)
Perhaps someone familiar with that code can tweak the regexps further...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Loading...