unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#52104: 29.0.50; sometimes ispell-message does not check the Subject field
@ 2021-11-25 13:41 Peter Münster
  2021-11-29 16:09 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Münster @ 2021-11-25 13:41 UTC (permalink / raw)
  To: 52104


[-- Attachment #1.1: Type: text/plain, Size: 308 bytes --]

Hi,

ispell-message does not check Subject fields, when it finds a sequence
with "re ". And in French, there are a lot of words ending with "re"...

Please find attached a patch, that fixes the problem.

The "Re: " is hardcoded here, just as in message-reply.

Kind regards,
-- 
           Peter

[-- Attachment #1.2: my.patch --]
[-- Type: text/x-patch, Size: 775 bytes --]

commit 686bd0550797d0ec6225267914cef5cb0e5a61f6
Author: Peter Münster <pm@a16n.net>
Date:   Thu Nov 25 14:25:18 2021 +0100

    Fix spelling of subject line
    
    * lisp/textmodes/ispell.el (ispell-message): Only subjects starting with
    "Re: " are real replies.

diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 4087f7e5f2..ce8a82cda7 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -3977,7 +3977,7 @@ ispell-message
 	    (if (re-search-forward "^Subject: *" end-of-headers t)
 		(progn
 		  (goto-char (match-end 0))
-		  (if (and (not (looking-at ".*Re\\>"))
+		  (if (and (not (looking-at "Re: "))
 			   (not (looking-at "\\[")))
 		      (progn
 			(setq case-fold-search old-case-fold-search)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#52104: 29.0.50; sometimes ispell-message does not check the Subject field
  2021-11-25 13:41 bug#52104: 29.0.50; sometimes ispell-message does not check the Subject field Peter Münster
@ 2021-11-29 16:09 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-29 16:09 UTC (permalink / raw)
  To: Peter Münster; +Cc: 52104

Peter Münster <pm@a16n.net> writes:

> ispell-message does not check Subject fields, when it finds a sequence
> with "re ". And in French, there are a lot of words ending with "re"...
>
> Please find attached a patch, that fixes the problem.
>
> The "Re: " is hardcoded here, just as in message-reply.

...

-		  (if (and (not (looking-at ".*Re\\>"))
+		  (if (and (not (looking-at "Re: "))

I think this is too strict -- there may not be a : after the Re, and
there is often some locale-specific mistranslation of Re somewhere.  So
I think the right fix here is ".*\\<Re\\>", which I've done in Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-29 16:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 13:41 bug#52104: 29.0.50; sometimes ispell-message does not check the Subject field Peter Münster
2021-11-29 16:09 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).