GNU bug report logs -
#13019
24.2; ispell: use of local ispell-personal-dictionary
Previous Next
Reported by: Akim Demaille <akim.demaille <at> gmail.com>
Date: Wed, 28 Nov 2012 10:20:02 UTC
Severity: normal
Found in version 24.2
Done: Agustin Martin <agustin.martin <at> hispalinux.es>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 13019 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Nov 30, 2012 at 06:11:56PM +0100, Agustin Martin wrote:
> On Wed, Nov 28, 2012 at 04:16:53PM -0500, Glenn Morris wrote:
> > Akim Demaille wrote:
> >
> > > I have recently upgraded my Emacs from 22.2.1 to 24.2.1, and there is
> > > a feature I lost: I could use ispell-personal-dictionary to specify a
> > > per-document *local* (i.e., relative to the directory of the file)
> > > dictionary.
> >
> > Presumably due to 2010-09-02 changes to ispell-init-process for
> > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6143
> >
> > Perhaps a file-name-absolute-p check for various variables could be
> > file-local could be added to that.
> >
> > > | %%% ispell-dictionary: "american"
> > > | %%% ispell-personal-dictionary: "../en.dict"
>
> Actual problem happens in `ispell-start-process' where the string to be
> passed to the spellchecker as personal dictionary is expanded,
>
> (if ispell-current-personal-dictionary ; Use specified pers dict.
> (list "-p" (expand-file-name ispell-current-personal-dictionary)))
>
> and is indeed affected by the changes in `default-dictionary' coming from
> `ispell-init-process`.
>
> I think the only reason for that `expand-file-name' is the tilde expansion
> in non-UNIX systems. In UNIX systems tilde can be explicitly passed.
> Not sure if the directory {forward,back}slash is also related to this.
>
> I am thinking about expanding `ispell-current-personal-dictionary' string
> only if it contains a tilde prefix.
I am now playing with something different, preserve original value of
`default-directory' in `current-ispell-directory' variable and expand
personal dictionary after it if no absolute path or tilde is used.
I think this is a better approach, see attached patch.
Let me test this a bit more before committing. Feel free to test it too.
--
Agustin
[ispell.el_honour-personal-dictionary-path.diff (text/x-diff, attachment)]
This bug report was last modified 12 years and 230 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.