[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: jinx

From: Michael Eliachevitch
Subject: Re: jinx
Date: Mon, 03 Apr 2023 13:51:13 +0000

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

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 

Cheers, Michael

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]