-
|
I use the latest emacs on windows11/mingw64, with latest packages. Here is the configuration : (use-package jinx
:hook (emacs-startup . global-jinx-mode)
:bind (("M-$" . jinx-correct)
("C-M-$" . jinx-languages))
:custom (jinx-languages "en_US fr_FR")
(jinx-exclude-regexps '((emacs-lisp-mode "Package-Requires:.*$")
(t "[A-Z]+\\>" "-+\\>" "\\w*?[0-9]\\w*\\>" "[a-z]+://\\S-+"
"<?[-+_.~a-zA-Z][-+_.~:a-zA-Z0-9]*@[-.a-zA-Z0-9]+>?"
"\\(?:Local Variables\\|End\\):\\s-*$" "eqref:eq:[0-9]+"
"ref:fig:[a-z0-9]+" "ref:tab:[a-z0-9]+" "[bcolor:[a-zA-Z0-9]+"
"jinx-\\(?:languages\\|local-words\\):\\s-+.*$"))))When I write a voluntarily mispelled word in a buffer, jinx does not seem to notice it, even after a while. Also, if I type What could be the problem ? Why jinx does not automatically scan |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The suspicious part is this regexp in your "[bcolor:[a-zA-Z0-9]+"In Emacs regexps, That also explains the symptoms:
Try removing that regexp first. If you meant to exclude a literal "\\[bcolor:[a-zA-Z0-9]+"or tighten it further to the exact syntax you use. A quick check is to evaluate: (setq jinx-exclude-regexps
'((emacs-lisp-mode "Package-Requires:.*$")
(t "[A-Z]+\\>"
"-+\\>"
"\\w*?[0-9]\\w*\\>"
"[a-z]+://\\S-+"
"<?[-+_.~a-zA-Z][-+_.~:a-zA-Z0-9]*@[-.a-zA-Z0-9]+>?"
"\\(?:Local Variables\\|End\\):\\s-*$"
"jinx-\\(?:languages\\|local-words\\):\\s-+.*$")))then toggle Jinx in the buffer: (jinx-mode -1)
(jinx-mode 1)If highlighting starts working after that, the issue is the custom exclusion regexp, not the Windows/enchant setup. |
Beta Was this translation helpful? Give feedback.
The suspicious part is this regexp in your
jinx-exclude-regexps:"[bcolor:[a-zA-Z0-9]+"In Emacs regexps,
[...]is a character class. So this does not match the literal text[bcolor:...]; it matches a run of characters from that class. Since the class containsa-zA-Z0-9, it will match almost every normal word at the beginning, and Jinx will treat those words as excluded.That also explains the symptoms:
jinx-correct-allsays there are no misspellings, because the words are excludedjinx-correct-wordcan still offer suggestions, because that command explicitly forces correction of the word at point even if it was not marked as misspelledTry …