[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SOLV3D] Re: `ispell-message' don't spell the subject line if it sta
From: |
Eli Zaretskii |
Subject: |
Re: [SOLV3D] Re: `ispell-message' don't spell the subject line if it starts with a square bracket |
Date: |
Fri, 10 May 2024 09:58:25 +0300 |
> From: Karl Fogel <kfogel@red-bean.com>
> Date: Thu, 09 May 2024 19:23:12 -0500
>
> On 09 May 2024, Emanuel Berg wrote:
> >Eli Zaretskii wrote:
> >
> >> No, it's a feature [...] it doesn't spell-check Subject if
> >> it comes from another message: if it starts with "Re:"
> >> (which indicates the Subject comes from the message to which
> >> you reply), or if it starts with "[", which indicates
> >> a forwarded message
> >
> >I think "Fwd:" is the convention for forwarded messages, but
> >you are right, people add such little notes sometimes, like
> >[SOLVED], [OFF LIST] and so on and then most often the subject
> >line shouldn't be spell-checked except for within the square
> >brackets maybe :)
>
> Yes: I've seen "Fwd:" used, and also "[FWD]".
>
> But there are other little things that people put in square
> brackets that probably *shouldn't* block spell-check. For
> example, "[PATCH]" and "[PROPOSAL]".
>
> I haven't tested the attached patch, but if there is consensus on
> this general direction of fix, I would be happy to finalize it
> (updating it based on suggestions here) and test it.
I agree to the general direction, but the actual implementation you
propose is IMO wrong. Try forwarding a message from Rmail or Gnus
with the default settings, and you will see that "[" is not followed
by any telltale string; the very fact that the subject is in "[...]"
_is_ the only indication of the fact that the message is being
forwarded. So removing the "\\[" match is not TRT here.
AFAICT, MH-E uses yet another format for forwarded messages. And I
don't know what other Emacs-based MUAs do with subject of forwarded
and replied messages.
OTOH, just having the "Fwd: " prefix doesn't avoid spell-checking the
Subject, which is a bug of an opposite kind (false negative).
So I think we should leave the "\\[" pattern alone, and instead
override the no-spell-checking decision if only part of the subject is
in brackets.
If we also want not to spell-check the part inside the brackets, we
could instead skip the bracketed part. (If the entire Subject is
bracketed, as in the default-formatted forwarded messages, that would
avoid spell-checking all of it.) Not sure how important that is,
since the text inside the brackets is usually auto-generated and thus
correct (see the examples you posted).
There's a more general issue here: ispell-message currently doesn't
know about all the localized variants of "Re:" and "Fwd:", although
the MUAs generally do: see, for example, rmail-re-abbrevs. So bonus
points for detecting replied and forwarded Subject lines using these
patterns.
P.S. It's too bad this discussion is here and not on the bug tracker.
Bugs, even potential bugs, should _always_ be reported using "M-x
report-emacs-bug".