unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: michael_heerdegen@web.de, 62677@debbugs.gnu.org
Subject: bug#62677: 30.0.50; Need to find a better name for flyspell-prog-mode
Date: Thu, 6 Apr 2023 10:46:13 -0700	[thread overview]
Message-ID: <7dd7ff53-64e5-80fe-f375-fbdbda5b055f@gmail.com> (raw)
In-Reply-To: <83y1n5r0i9.fsf@gnu.org>

On 4/5/2023 11:24 PM, Eli Zaretskii wrote:
>> Date: Wed, 5 Apr 2023 13:29:59 -0700
>> From: Jim Porter <jporterbugs@gmail.com>
>>
>> On 4/5/2023 6:13 AM, Michael Heerdegen wrote:
>>> `flyspell-prog-mode' is a variant of `flyspell-mode' for editing
>>> programs: it limits spell checking to areas of text fontified with
>>> certain faces (`flyspell-prog-text-faces', normally strings and
>>> comments).  The intention is obviously to skip keywords and tags that
>>> are used by the programming language itself.
>>
>> For what it's worth, when I started using flyspell-mode last year and
>> subsequently discovered flyspell-prog-mode, I immediately understood
>> what its intent was from the name. So from my perspective, it's actually
>> a very good name.
> 
> That depends on what you understood ;-)  It could be that you
> understood it immediately, but incorrectly or inaccurately.

To be clear, my understanding was that 'flyspell-prog-mode' is what you 
should use for modes where some text should be ignored for 
spell-checking. (Code is the most obvious example, but not the only one.)

>>> This mode is geared toward text modes.  In buffers that contain
>>> code, ‘flyspell-prog-mode’ is usually a better choice.
> 
> The above is inaccurate as well: text-derived modes for markup text
> can also benefit.  Basically, anything where you have keywords that
> are not necessarily words in a human language.

Maybe something like this would be more-precise?

"This mode spell checks all the text in a buffer.  In buffers that 
contain text that shouldn't be spell-checked (such as code or markup), 
'flyspell-prog-mode' is usually a better choice."

Then, we could expand on the docstring for 'flyspell-prog-mode', since 
it's pretty short right now.

> IMO, we should start with what the manual says:
> 
>       Flyspell Prog mode works just like ordinary Flyspell mode, except
>    that it only checks words in comments and string constants.  This
>    feature is useful for editing programs.
> 
> Which might try to explain the name, but in doing so, it misses the
> opportunity to let the readers discover what that mode truly is and
> what it can do.

Yeah, this could probably use a bit of expansion too. It does a 
reasonable job of explaining why you'd use it in a programming mode, but 
that's (arguably) already obvious from the name.





  reply	other threads:[~2023-04-06 17:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05 13:13 bug#62677: 30.0.50; Need to find a better name for flyspell-prog-mode Michael Heerdegen
2023-04-04 23:32 ` Payas Relekar
2023-04-05 15:04   ` Akib Azmain Turja via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-05 15:26     ` Eli Zaretskii
2023-04-07  2:43       ` Richard Stallman
2023-04-07  6:39         ` Eli Zaretskii
2023-04-10  2:53           ` Richard Stallman
2023-04-10  4:48             ` Eli Zaretskii
2023-04-05 15:46     ` Dmitry Gutov
2023-04-05 16:17 ` Juri Linkov
2023-04-05 17:44   ` Michael Heerdegen
2023-04-06 12:14     ` Augusto Stoffel
2023-04-05 19:04   ` Eli Zaretskii
2023-04-05 20:29 ` Jim Porter
2023-04-06  6:24   ` Eli Zaretskii
2023-04-06 17:46     ` Jim Porter [this message]
2023-09-05 20:57     ` Stefan Kangas
2023-09-06 11:19       ` Eli Zaretskii
2023-09-06 18:51         ` Stefan Kangas
2023-09-06 19:05           ` Eli Zaretskii
2023-09-24 14:08             ` bug#62677: Merge flyspell-mode with flyspell-prog-mode Stefan Kangas
2023-09-24 15:41               ` Eli Zaretskii
2023-09-24 16:29                 ` Stefan Kangas
2023-09-24 16:42                   ` Eli Zaretskii
2023-09-07  6:30           ` bug#62677: 30.0.50; Need to find a better name for flyspell-prog-mode Juri Linkov
2023-09-07  7:09             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7dd7ff53-64e5-80fe-f375-fbdbda5b055f@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=62677@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).