GNU bug report logs - #54131
29.0.50; Flyspell incorrectly reports first word in Python f-string

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Wed, 23 Feb 2022 18:17:02 UTC

Severity: normal

Found in version 29.0.50

Full log


Message #29 received at 54131 <at> debbugs.gnu.org (full text, mbox):

From: Visuwesh <visuweshm <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, p.stephani2 <at> gmail.com,
 54131 <at> debbugs.gnu.org
Subject: Re: bug#54131: 29.0.50; Flyspell incorrectly reports first word in
 Python f-string
Date: Thu, 24 Feb 2022 16:53:48 +0530
[வியாழன், பிப்ரவரி 24 2022] Eli Zaretskii wrote:

>> From: Lars Ingebrigtsen <larsi <at> gnus.org>
>> Cc: p.stephani2 <at> gmail.com,  54131 <at> debbugs.gnu.org
>> Date: Thu, 24 Feb 2022 10:12:58 +0100
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> > For program sources, flyspell-prog-mode relies on font-lock faces to
>> > tell it where strings and comments are, so perhaps this part doesn't
>> > work for some reason (and perhaps the root cause is in font-lock of
>> > python-mode, not in flyspell.el per se).
>> 
>> I didn't know about flyspell-prog-mode, but it does indeed do the right
>> thing here.  (I've now mentioned the mode in the flyspell-mode doc
>> string.)
>
> That's strange, because the OP explicitly invoked flyspell-prog-mode,
> so how come it didn't work for Philipp, but did for you?
>
>> But `M-$' does not do the right thing -- if you `M-$' on f'hello, it
>> tries to correct the whole thing.
>
> Maybe we should have a key binding for
> ispell-comment-or-string-at-point, and/or maybe
> ispell-comments-and-strings and flyspell-prog-mode should rebind M-$
> to ispell-comment-or-string-at-point.

I misspell parts of a symbol quite often so rebinding M-$ to a command
that NOOPs when the point is not over a comment/string would end up
annoying, IMO.  I am not sure how common this usecase is though.




This bug report was last modified 3 years and 112 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.