GNU bug report logs -
#67045
No way to control location of .aspell.en.prepl from within Emacs
Previous Next
To reply to this bug, email your comments to 67045 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67045
; Package
emacs
.
(Fri, 10 Nov 2023 16:03:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Björn Lindqvist <bjourne <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 10 Nov 2023 16:03:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
During operation aspell creates two files; .aspell.en.pws,
.aspell.en.prepl ("en" is of course the language code). By default
these files are placed in ~/. You can control the location of
.aspell.en.pws by setting the ispell-personal-dictionary variable. But
you cannot control the location of .aspell.en.prepl.
So a new customization variable is needed to control the location of
.aspell.en.prepl. Perhaps named
ispell-personal-replacement-dictionary. It should be mapped to
aspell's --repl option which controls where the personal replacement
dictionary is stored.
--
mvh/best regards Björn Lindqvist
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67045
; Package
emacs
.
(Fri, 10 Nov 2023 16:51:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 67045 <at> debbugs.gnu.org (full text, mbox):
> From: Björn Lindqvist <bjourne <at> gmail.com>
> Date: Fri, 10 Nov 2023 17:01:04 +0100
>
> During operation aspell creates two files; .aspell.en.pws,
> .aspell.en.prepl ("en" is of course the language code). By default
> these files are placed in ~/. You can control the location of
> .aspell.en.pws by setting the ispell-personal-dictionary variable. But
> you cannot control the location of .aspell.en.prepl.
>
> So a new customization variable is needed to control the location of
> .aspell.en.prepl. Perhaps named
> ispell-personal-replacement-dictionary. It should be mapped to
> aspell's --repl option which controls where the personal replacement
> dictionary is stored.
Can't you customize ispell-extra-args? In addition,
ispell-dictionary-alist supports language-specific options, AFAIK.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67045
; Package
emacs
.
(Fri, 10 Nov 2023 21:35:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 67045 <at> debbugs.gnu.org (full text, mbox):
I didn't know about that variable and it's not in the manual afaics. I
managed to piece some elisp together using it to set the --repl
option. It works, though I don't think it is a very user-friendly
solution.
Den fre 10 nov. 2023 kl 17:50 skrev Eli Zaretskii <eliz <at> gnu.org>:
>
> > From: Björn Lindqvist <bjourne <at> gmail.com>
> > Date: Fri, 10 Nov 2023 17:01:04 +0100
> >
> > During operation aspell creates two files; .aspell.en.pws,
> > .aspell.en.prepl ("en" is of course the language code). By default
> > these files are placed in ~/. You can control the location of
> > .aspell.en.pws by setting the ispell-personal-dictionary variable. But
> > you cannot control the location of .aspell.en.prepl.
> >
> > So a new customization variable is needed to control the location of
> > .aspell.en.prepl. Perhaps named
> > ispell-personal-replacement-dictionary. It should be mapped to
> > aspell's --repl option which controls where the personal replacement
> > dictionary is stored.
>
> Can't you customize ispell-extra-args? In addition,
> ispell-dictionary-alist supports language-specific options, AFAIK.
--
mvh/best regards Björn Lindqvist
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67045
; Package
emacs
.
(Sat, 11 Nov 2023 07:00:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 67045 <at> debbugs.gnu.org (full text, mbox):
> From: Björn Lindqvist <bjourne <at> gmail.com>
> Date: Fri, 10 Nov 2023 22:33:17 +0100
> Cc: 67045 <at> debbugs.gnu.org
>
> > Can't you customize ispell-extra-args? In addition,
> > ispell-dictionary-alist supports language-specific options, AFAIK.
>
> I didn't know about that variable and it's not in the manual afaics. I
> managed to piece some elisp together using it to set the --repl
> option. It works, though I don't think it is a very user-friendly
> solution.
Why do you consider it not a user-friendly solution? There's no limit
to command-line options a speller can have, so it is not reasonable
IMO to expect Emacs to have a separate variable for each one of them.
Thus, our solution to have a single variable that can hold any
additional options is a reasonable compromise.
As for its discoverability: in general, when you are faced with a
problem in some Emacs Lisp package, my advice is first to see whether
a solution already exists by browsing all the defcustom's of that
package (and its parent packages, if that is appropriate). One way of
doing that is by using "M-x customize-group" bu giving it the group of
the package.
Stefan, WDYT?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67045
; Package
emacs
.
(Sat, 11 Nov 2023 16:40:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 67045 <at> debbugs.gnu.org (full text, mbox):
I care little about what speller backend Emacs uses. I just want it to
follow the XDG (which I think it should do by default because dumping
dotfiles in ~/ is for neanderthals, but that's a different
story). Getting it to work was very difficult especially as I'm
often switching between languages. Here is part of my setup:
(defun set-language (code name)
(let* ((dir (expand-file-name "~/.config/aspell/"))
(pd (concat dir code ".pws"))
(rd (concat dir code ".prepl")))
(make-directory dir t)
(setq ispell-personal-dictionary pd)
(setq ispell-extra-args (list "--repl" rd)))
(ispell-change-dictionary code)
(flyspell-buffer)
(message (format "Switched to %s" name)))
(setq flyspell-issue-message-flag nil)
(add-hook 'text-mode-hook 'flyspell-mode)
(add-hook 'flyspell-mode-hook
(lambda ()
(set-language "en" "English")))
I also have keybindings setup to quickly restart aspell because having
one buffer spell-checked in one language and another buffer in a
different language is not supported. I would be happier if I could
write:
(setq ispell-personal-directory "~/.config/aspell")
and have ispell understand that it should dump all user configuration
files to that directory.
Den lör 11 nov. 2023 kl 07:58 skrev Eli Zaretskii <eliz <at> gnu.org>:
>
> > From: Björn Lindqvist <bjourne <at> gmail.com>
> > Date: Fri, 10 Nov 2023 22:33:17 +0100
> > Cc: 67045 <at> debbugs.gnu.org
> >
> > > Can't you customize ispell-extra-args? In addition,
> > > ispell-dictionary-alist supports language-specific options, AFAIK.
> >
> > I didn't know about that variable and it's not in the manual afaics. I
> > managed to piece some elisp together using it to set the --repl
> > option. It works, though I don't think it is a very user-friendly
> > solution.
>
> Why do you consider it not a user-friendly solution? There's no limit
> to command-line options a speller can have, so it is not reasonable
> IMO to expect Emacs to have a separate variable for each one of them.
> Thus, our solution to have a single variable that can hold any
> additional options is a reasonable compromise.
>
> As for its discoverability: in general, when you are faced with a
> problem in some Emacs Lisp package, my advice is first to see whether
> a solution already exists by browsing all the defcustom's of that
> package (and its parent packages, if that is appropriate). One way of
> doing that is by using "M-x customize-group" bu giving it the group of
> the package.
>
> Stefan, WDYT?
--
mvh/best regards Björn Lindqvist
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Fri, 22 Dec 2023 15:05:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67045
; Package
emacs
.
(Sun, 24 Dec 2023 20:12:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 67045 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> Why do you consider it not a user-friendly solution? There's no limit
> to command-line options a speller can have, so it is not reasonable
> IMO to expect Emacs to have a separate variable for each one of them.
> Thus, our solution to have a single variable that can hold any
> additional options is a reasonable compromise.
[...]
> Stefan, WDYT?
I could go either way with this one, to be really honest. Eli is right
that proliferating our user options with all the details of concrete
spell checkers will start getting unwieldy at some point.
Personally, I'd rather see the interface of ispell.el get more
abstracted away from concrete spell checkers. I don't think users of
Emacs shouldn't have to mess with aspell/ispell/hunspell/enchant (unless
they want to, of course).
So I'm not entirely sure that adding a new user option like this is
moving things in the right thing direction.
This bug report was last modified 1 year and 177 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.