From: Michael Eliachevitch <m.eliachevitch@posteo.de>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Eli Zaretskii <eliz@gnu.org>, Arash Esbati <arash@gnu.org>,
rms@gnu.org, emacs-devel@gnu.org
Subject: Re: jinx
Date: Mon, 03 Apr 2023 13:51:13 +0000 [thread overview]
Message-ID: <87bkk5ujrm.fsf@posteo.de> (raw)
In-Reply-To: <87pm8lxi1n.fsf@web.de>
[-- Attachment #1: Type: text/plain, Size: 2670 bytes --]
On 2023-04-03 at 14:32 +02, Michael Heerdegen <michael_heerdegen@web.de> wrote:
>> This is again not TeX-specific. Similar issues exist in Texinfo and
>> in other markup languages. The annoyance is usually minor: it's
>> enough to tell the speller to "accept" a word just once, since the
>> number of markup codes is usually very small. But it would be nicer,
>> of course, if Emacs could automatically skip markup in each major
>> mode.
>
> Wasn't that the purpose of `flyspell-prog-mode'?
Yes, `flyspell-prog-mode' and `flyspell-prog-text-faces' together offer similar functionality to what jinx does by default, only that it allows configuring the faces on per-major-mode basis and has include- and exclude-faces. As I understood the discussion, ideally we could add this to flyspell and ispell in a consistent way.
I'm also not sure if the distinction between `flyspell-mode' and `flyspell-prog-mode' is still needed, you can just customize the text-mode to not exclude any faces for instance. It doesn't hurt, we can just enable `flyspell-prog-mode' everywhere. But ispell doesn't have a prog-mode. If we want to have common include/exclude faces for ispell and flyspell and be consistent with those packages, one could think about adding an ispell-prog-mode for consistency, though that seems weird to me.
Of course `flyspell-prog-mode' one can achieve very similar functionality to jinx by using per-major-mode hooks and dir-local variables to customize `flyspell-prog-text-faces' for each mode, but it would be nice for that to be simpler. And naming wise, initially I was confused by `flyspell-prog-mode' because I thought this is programming-mode-specific and might need for the mode to inherit from `prog-mode', but we have plenty of modes with font-lock that inherit from text-mode or conf-mode.
An example: I noticed that both jinx and flyspell underline "pgpmime" string in the MML signature snippet in my email buffer, which has the major mode `mu4e-compose-mode' inheriting from `message-mode' and in turn from text-mode. In jinx, I can fix the error message by a simple
(cl-pushnew 'message-mml (alist-get 'message-mode jinx-exclude-faces))
The cited text is still checked, because for non-prog-modes I didn't specify any jinx-include-faces and thus it checks all non-exclude faces. In flyspell, I could add `flyspell-prog-mode' to `message-mode-hook' and also hook a function that locally sets the `flyspell-prog-text-faces' to the default text-face and the four message-cited-faces, hoping I didn't forget any other faces that text might have in the email compose buffer. So it feels a bit more annoying to configure.
Cheers, Michael
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]
next prev parent reply other threads:[~2023-04-03 13:51 UTC|newest]
Thread overview: 101+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 3:00 jinx Richard Stallman
2023-03-29 9:02 ` jinx Philip Kaludercic
2023-03-31 4:29 ` jinx Richard Stallman
2023-03-31 7:15 ` jinx Philip Kaludercic
2023-04-01 3:11 ` jinx Richard Stallman
2023-04-01 6:01 ` jinx Eli Zaretskii
2023-04-01 12:43 ` jinx Peter Oliver
2023-04-01 13:02 ` jinx Eli Zaretskii
2023-04-01 13:21 ` jinx Peter Oliver
2023-04-01 8:54 ` jinx Augusto Stoffel
2023-03-29 22:46 ` jinx Michael Eliachevitch
2023-03-30 1:02 ` jinx João Pedro
2023-03-30 5:23 ` jinx Eli Zaretskii
2023-03-31 4:29 ` jinx Richard Stallman
2023-03-31 6:51 ` jinx Eli Zaretskii
2023-03-31 7:10 ` jinx Gregory Heytings
2023-03-31 7:15 ` Grammar checking (was: jinx) Eli Zaretskii
2023-03-31 7:47 ` Grammar checking Philip Kaludercic
2023-03-31 8:09 ` Gregory Heytings
2023-03-31 8:38 ` Philip Kaludercic
2023-03-31 9:02 ` Gregory Heytings
2023-03-31 11:37 ` Lynn Winebarger
2023-03-31 12:01 ` Gregory Heytings
2023-03-31 12:45 ` Peter Oliver
2023-03-31 15:29 ` Philip Kaludercic
2023-03-31 17:00 ` Peter Oliver
2023-03-31 12:54 ` Peter Oliver
2023-03-31 13:09 ` Gregory Heytings
2023-03-31 11:23 ` Eli Zaretskii
2023-03-31 12:12 ` Peter Oliver
2023-03-31 15:25 ` Philip Kaludercic
2023-03-31 8:40 ` Nasser Alkmim
2023-03-31 8:45 ` Michael Eliachevitch
2023-03-31 13:44 ` Felician Nemeth
2023-03-31 16:03 ` Peter Oliver
2023-03-31 8:48 ` Gregory Heytings
2023-04-01 12:59 ` Lynn Winebarger
2023-04-01 13:18 ` Gregory Heytings
2023-04-01 13:37 ` Eli Zaretskii
2023-04-01 17:30 ` Lynn Winebarger
2023-04-01 17:35 ` Eli Zaretskii
2023-04-02 3:12 ` Richard Stallman
2023-04-02 15:24 ` Lynn Winebarger
2023-04-03 3:05 ` Richard Stallman
2023-04-03 3:05 ` Richard Stallman
2023-04-06 12:29 ` Lynn Winebarger
2023-04-08 3:28 ` Richard Stallman
2023-04-08 13:33 ` Lynn Winebarger
2023-04-08 13:23 ` Eli Zaretskii
2023-04-08 3:28 ` Richard Stallman
2023-04-08 15:20 ` Lynn Winebarger
2023-04-19 5:13 ` Richard Stallman
2023-04-09 9:02 ` Philip Kaludercic
2023-04-09 12:31 ` Lynn Winebarger
2023-04-22 2:22 ` Richard Stallman
2023-04-23 2:25 ` Richard Stallman
2023-04-23 14:14 ` Lynn Winebarger
2023-04-08 3:28 ` Richard Stallman
2023-04-08 14:23 ` Lynn Winebarger
2023-03-31 10:59 ` Eli Zaretskii
2023-04-02 3:11 ` Richard Stallman
2023-04-02 3:40 ` Emanuel Berg
2023-03-31 16:20 ` Grammar checking (was: jinx) João Távora
2023-04-05 13:05 ` jinx Rudolf Adamkovič
2023-04-05 18:37 ` jinx Philip Kaludercic
2023-03-31 18:33 ` jinx Arash Esbati
2023-03-31 19:11 ` jinx Eli Zaretskii
2023-03-31 19:35 ` jinx Arash Esbati
2023-04-01 7:20 ` jinx Eli Zaretskii
2023-04-01 7:42 ` jinx Arash Esbati
2023-04-01 8:13 ` jinx Eli Zaretskii
2023-04-02 11:29 ` jinx Arash Esbati
2023-04-03 12:32 ` jinx Michael Heerdegen
2023-04-03 13:51 ` Michael Eliachevitch [this message]
2023-04-03 14:26 ` jinx Eli Zaretskii
2023-04-03 15:13 ` jinx Michael Eliachevitch
2023-04-04 2:56 ` jinx Richard Stallman
2023-04-04 12:27 ` jinx Michael Heerdegen
2023-04-05 2:35 ` jinx Richard Stallman
2023-04-05 9:02 ` jinx Philip Kaludercic
2023-04-05 10:51 ` jinx Michael Heerdegen
2023-04-05 11:25 ` jinx Michael Heerdegen
2023-04-05 11:55 ` jinx Eli Zaretskii
2023-04-05 13:17 ` jinx Michael Heerdegen
2023-04-05 2:34 ` jinx Richard Stallman
2023-04-05 7:58 ` jinx Po Lu
2023-04-05 8:01 ` jinx Arash Esbati
2023-04-05 8:15 ` jinx Emanuel Berg
2023-04-01 13:11 ` jinx Lynn Winebarger
2023-04-01 8:32 ` jinx Augusto Stoffel
2023-04-01 8:29 ` jinx Augusto Stoffel
2023-04-01 11:21 ` jinx Eli Zaretskii
2023-04-01 11:39 ` jinx Augusto Stoffel
2023-04-01 11:54 ` jinx Eli Zaretskii
2023-04-01 12:32 ` jinx Augusto Stoffel
2023-04-01 12:57 ` jinx Eli Zaretskii
2023-04-01 3:11 ` jinx Richard Stallman
2023-04-01 5:56 ` jinx Eli Zaretskii
2023-04-01 8:35 ` jinx Augusto Stoffel
2023-04-01 8:25 ` jinx Emanuel Berg
-- strict thread matches above, loose matches on Subject: below --
2023-04-19 22:09 jinx Gustavo Barros
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=87bkk5ujrm.fsf@posteo.de \
--to=m.eliachevitch@posteo.de \
--cc=arash@gnu.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=michael_heerdegen@web.de \
--cc=rms@gnu.org \
/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).