unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tor Kringeland <tor.kringeland@ntnu.no>
To: "52179@debbugs.gnu.org" <52179@debbugs.gnu.org>
Subject: bug#52179: Highlighting a word in `ispell' using `enchant'
Date: Tue, 24 May 2022 15:49:45 +0000	[thread overview]
Message-ID: <OL1P279MB0194988AA408911D0B9BB38C88D79@OL1P279MB0194.NORP279.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <m2h7bvxbqg.fsf@ntnu.no>

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

I had another look at it and managed to solve the problem. By default `ispell-dictionary-base-alist' is conservative in setting the regexes for what counts as a word in a given language. I had set `ispell-current-dictionary' to nil so enchant would choose the dictionary on its own. The nil entry in the aforementioned alist says a word is a string with the letters A-Z or a-z and possibly containing '. Changing it to [[:alpha:]] solved the issue.

The restrictive regexes are set in `ispell-dictionary-base-alist' but in `ispell-dictionary-alist' (at least for me) most of the regexes are changed to [[:alpha:]]. I'm not sure how that is done but probably there's some good logic behind it. "british" and "american" (as well as the nil entry) still have the restrictive regexes, though ...

Could we change the nil entry to have the [[:alpha:]] regex? So, if the user doesn't explicitly set their dictionary, it works more as expected?

[-- Attachment #2: Type: text/html, Size: 1750 bytes --]

  parent reply	other threads:[~2022-05-24 15:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 14:44 bug#52179: Highlighting a word in `ispell' using `enchant' Tor Kringeland
2021-11-29 14:51 ` Eli Zaretskii
2021-11-29 20:46   ` Tor Kringeland
2021-11-30  3:22     ` Eli Zaretskii
2022-05-24 15:49 ` Tor Kringeland [this message]
2022-05-24 19:11   ` Eli Zaretskii
2022-05-24 19:27     ` Tor Kringeland
2022-05-24 19:36       ` Eli Zaretskii
2022-05-24 21:34         ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-25  2:28           ` Eli Zaretskii
2022-05-25  7:39             ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-25 13:23               ` Eli Zaretskii
2022-05-27 13:45                 ` Tor Kringeland
2022-05-27 14:22                   ` 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=OL1P279MB0194988AA408911D0B9BB38C88D79@OL1P279MB0194.NORP279.PROD.OUTLOOK.COM \
    --to=tor.kringeland@ntnu.no \
    --cc=52179@debbugs.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).