GNU bug report logs -
#24050
24.5; ispell-change-dictionary suggests non-existent dicts (aspell)
Previous Next
Reported by: Ole Jørgen Brønner <olejorgenb <at> gmail.com>
Date: Thu, 21 Jul 2016 22:01:02 UTC
Severity: minor
Found in version 24.5
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #36 received at 24050 <at> debbugs.gnu.org (full text, mbox):
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: olejorgenb <at> gmail.com, 24050 <at> debbugs.gnu.org
> Date: Mon, 29 Jul 2019 13:12:15 +0200
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > If aspell/hunspell is misconfigured, or has some bug, it might not
> > output the correct list of installed dictionaries, or not at all.
>
> But if it's misconfigured, then it'll bug out when you ask it to do
> other things as well, as hitting `M-$'.
Not necessarily, because the dictionary can be specified as a full
absolute file name. Also, ispell-dictionary-alist provides for
specifying command-line options for the speller, and some of those
could instruct the speller to look for the dictionary in a
non-standard directory, where the speller doesn't look when we query
it about installed dictionaries.
> With the patch, ispell-change-directory (on this system) seems to list
> all the dictionaries it can use. This is quite useful, because now that
> command allows me to actually choose the dictionary variant I most want
> to use, which was impossible before when they were hidden among all the
> dictionaries Emacs was claiming I could use (but can't).
I see your point and agree with the convenience part, but
unfortunately things are not as simple as they seem.
First, if this kind of filtering of the potentially available
dictionaries should happen, its place is in
ispell-valid-dictionary-list, not where the proposed change was made.
Second, ispell-find-aspell-dictionaries was (before the change you
made) modifying in-place the entries for the dictionaries it found
(and now it doesn't -- this could be a bug in itself in some other use
case), so after ispell-find-aspell-dictionaries returned,
ispell-dictionary-base-alist had some of its entries modified to adapt
them to the underlying installation. Thus, you cannot disregard
ispell-dictionary-base-alist, because it includes other valuable
information, and at least part of it is not theoretical, it reflects
what the underlying system has installed.
Third, by ignoring ispell-dictionary-base-alist, you make it
impossible to install a dictionary while Emacs is running with
ispell.el loaded.
So all of this is ... complicated. And since the original complaint
is about the completion candidates shown by ispell-change-directory, I
think we should solve that problem by tweaking only the completion,
not the data structures it uses. If you agree, maybe you or someone
else could come up with an alternative patch which only modified how
the collection of completion candidates is calculated. (And btw, I
think it is a mistake to call completing-read with MUST-MATCH argument
non-nil here, because it prevents users from typing a full absolute
file name of the dictionary, an entirely valid and useful response.)
OK?
This bug report was last modified 3 years and 88 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.