all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13019: 24.2; ispell: use of local ispell-personal-dictionary
@ 2012-11-28 10:16 Akim Demaille
  2012-11-28 21:16 ` Glenn Morris
       [not found] ` <11368004.8066.1354137417393.JavaMail.root@mx1-new.spamfiltro.es>
  0 siblings, 2 replies; 8+ messages in thread
From: Akim Demaille @ 2012-11-28 10:16 UTC (permalink / raw)
  To: 13019

Hi all,

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.

Consider the following use case: several documents (LaTeX for that
matter), with many uncommon words in common. Instead of having a
bazillion of (duplicated) "LocalWords:" in all my documents, I have:

| %%% Local Variables:
| %%% mode: latex
| %%% coding: utf-8
| %%% ispell-dictionary: "american"
| %%% ispell-personal-dictionary: "../en.dict"
| %%% TeX-master: t
| %%% fill-column: 76
| %%% End:

in each file.

This used to work well, i.e., aspell was given the right path to
en.dict.  With the current version of Emacs, "../en.dict" seems to be
resolved relatively to the directory from which Emacs was run, instead
of relatively to the document.

I do not want to force a full path to the dictionary, because the
documents are under VCS, and the dictionary is shared between the
authors.

I have run the following experiment, on a file with these local
variables:

| %%% Local Variables:
| %%% mode: latex
| %%% coding: utf-8
| %%% ispell-dictionary: "american"
| %%% ispell-personal-dictionary: "en.dict"
| %%% TeX-master: t
| %%% fill-column: 76
| %%% End:

Of course, what is expected is that en.dict is a local file, "in ./"
relatively to the file with these local variables.

With Emacs 22, I have the expected behavior:

| $ /usr/bin/emacs --version
| GNU Emacs 22.1.1
| Copyright (C) 2007 Free Software Foundation, Inc.
| GNU Emacs comes with ABSOLUTELY NO WARRANTY.
| You may redistribute copies of Emacs
| under the terms of the GNU General Public License.
| For more information about these matters, see the file named COPYING.

| $ /usr/bin/emacs f.tex
                       -- (here, I "M-x ispell", and "C-z" Emacs)
| 
| zsh: suspended  /usr/bin/emacs f.tex
| $ ps aux | grep aspell
| […] /opt/local/bin/aspell -a -m -d en_US --encoding=utf-8 -p /Users/akimd/src/lrde/cours-mob/mob1/src/lecture_2/en.dict

As you can see, the location of the en.dict is correct (f.tex is
indeed in /Users/akimd/src/lrde/cours-mob/mob1/src/lecture_2).

Now with Emacs 24:

| $ emacs --version
| GNU Emacs 24.2.1
| Copyright (C) 2012 Free Software Foundation, Inc.
| GNU Emacs comes with ABSOLUTELY NO WARRANTY.
| You may redistribute copies of Emacs
| under the terms of the GNU General Public License.
| For more information about these matters, see the file named COPYING.

| $ emacs mob1/src/lecture_2/f.tex
| 
| zsh: suspended  emacs mob1/src/lecture_2/f.tex
| $ ps aux | grep aspell
| […] /opt/local/bin/aspell -a -m -d en_US -p /Users/akimd/en.dict --encoding=utf-8

this time its completely wrong.


The previous behavior was very useful, as it made it possible for a
repository of documents to share a dictionary (more useful than
per-document Local Words).

Yes, there is the "eval" option, but that's working around a bug imho,
with the nasty effect that each time the document is opened, you have
to validate the action.

If "personal" was really meant to be the user's personal data, then it
was easy to use "~/" to make it clear, and it is still easy today.  On
the other hand, the way the dictionary name is turned absolute in 24.2
forbids the previous useful approach.

Or have I missed something?

Thanks in advance!

----------------------------------------------------------------------

In GNU Emacs 24.2.1 (x86_64-apple-darwin12.2.0)
 of 2012-11-26 on mcote-eth.lrde.epita.fr
Configured using:
 `configure '--prefix=/opt/local' '--without-x' '--without-dbus'
 '--without-gconf' '--without-libotf' '--without-m17n-flt'
 '--without-gpm' '--without-gnutls' '--without-xml2' '--infodir'
 '/opt/local/share/info/emacs' 'CC=/usr/bin/clang' 'CFLAGS=-pipe -O2
 -arch x86_64' 'LDFLAGS=-L/opt/local/lib -Wl,-no_pie -arch x86_64'
 'CPPFLAGS=-I/opt/local/include''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message idna format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils time-date auctex-autoloads
tex-site info tool-bar easymenu package tabulated-list uniquify advice
help-fns advice-preload ido cus-start cus-load ediff-hook vc-hooks
lisp-float-type lisp-mode register page menu-bar rfn-eshadow timer
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)






^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-12-03 17:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28 10:16 bug#13019: 24.2; ispell: use of local ispell-personal-dictionary Akim Demaille
2012-11-28 21:16 ` Glenn Morris
     [not found] ` <11368004.8066.1354137417393.JavaMail.root@mx1-new.spamfiltro.es>
2012-11-30 17:11   ` Agustin Martin
2012-11-30 17:59     ` Agustin Martin
2012-11-30 18:49       ` Stefan Monnier
2012-12-03 16:59         ` Agustin Martin
2012-12-03 17:35           ` Agustin Martin
2012-11-30 18:53     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.