GNU bug report logs - #15903
24.3.50; Fix small issue with ispell-hunspell when dictionary is set to default (nil)

Previous Next

Package: emacs;

Reported by: Vladimir Lomov <lomov.vl <at> gmail.com>

Date: Fri, 15 Nov 2013 15:18:02 UTC

Severity: normal

Found in version 24.3.50

Done: Agustin Martin <agustin.martin <at> hispalinux.es>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15903 in the body.
You can then email your comments to 15903 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15903; Package emacs. (Fri, 15 Nov 2013 15:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vladimir Lomov <lomov.vl <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 15 Nov 2013 15:18:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vladimir Lomov <lomov.vl <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; Fix small issue with ispell-hunspell when dictionary is set
 to default (nil)
Date: Sat, 16 Nov 2013 00:16:59 +0900
[Message part 1 (text/plain, inline)]
--text follows this line--

Hello,
according to variable 'ispell-dictionary-base-alist' defined in
'ispell.el' if 'ispell-dictionary' is nil then it is considered as
default value for dictionary. Unfortunately, when hunspell is used as
ispell program function 'ispell-parse-hunspell-affix-file' fails because
it doesn't expect nil as argument.

I propose small and simple patch. I checked it starting emacs as:
  emacs -Q
and evaluating in *scratch*:
  (setq ispell-program-name "hunspell")
  (setq ispell-really-hunspell t)
after that I run 'M-$' while point is on first 's' of
  (message)

In minibuffer I see
  MESSAGE is correct

Without this patch the same steps lead to message
  ispell-phaf: No matching entry for nil.


In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.3)
 of 2013-11-14 on smoon
Bzr revision: rgm <at> gnu.org-20131114112121-t9kk595b6a0hqn4x
Windowing system distributor `The X.Org Foundation', version 11.0.11404000
System Description:	Arch Linux

Configured using:
 `configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
 --libexecdir=/usr/lib --with-xpm --with-jpeg --with-tiff --with-gif
 --with-png --with-rsvg --with-x-toolkit=gtk3 --with-xft --with-libotf
 --with-dbus --with-gsettings --without-sound 'CFLAGS=-march=x86-64
 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4'
 CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: ru_RU.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Org

Minor modes in effect:
  erc-services-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  diff-auto-refine-mode: t
  global-auto-complete-mode: t
  shell-dirtrack-mode: t
  org-cdlatex-mode: t
  ido-everywhere: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<down> <down> <down> <down> <up> <tab> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> C-c ' <up> <up> <up> <up> <up> <up> <up> 
<up> C-SPC <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <end> C-c ; C-c C-c <help-echo> <help-echo> 
<help-echo> <menu-bar> <emacs-lisp> <comment-region> 
<down> <down> <end> <left> <left> <left> <left> <left> 
<left> <left> <left> u <backspace> e n g l i s h <delete> 
<delete> <delete> <delete> <delete> <delete> <delete> 
<down> <down> <home> C-k <up> <down> <delete> <up> 
<end> <left> <backspace> <backspace> <backspace> <backspace> 
l i s h <down> <down> <down> <down> <down> <down> <end> 
<left> <backspace> <backspace> <backspace> <backspace> 
l i s h <down> <backspace> <backspace> <backspace> 
<backspace> l i s h <home> <down> <down> <down> <end> 
<up> <down> <down> C-SPC <home> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> C-g <down> <down> <down> C-SPC 
<down> <down> <end> <help-echo> <help-echo> <help-echo> 
<menu-bar> <emacs-lisp> <comment-region> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> C-c 
' <f2> C-c C-v C-t <down-mouse-1> <mouse-movement> 
<mouse-1> C-c ' <up> <up> <up> <home> C-SPC <down> 
<down> <down> <end> <help-echo> <help-echo> <help-echo> 
<menu-bar> <emacs-lisp> <comment-region> <down> <down> 
<down> <down> <end> <home> <down> C-SPC <down> <end> 
<help-echo> <help-echo> <menu-bar> <emacs-lisp> <comment-region> 
<up> <home> <right> <right> <right> <right> <right> 
<right> <delete> <delete> <delete> <delete> <delete> 
<delete> <down> <delete> <delete> <delete> <delete> 
<delete> <delete> C-c ' <f2> C-c C-v C-t <down-mouse-1> 
<mouse-1> C-c ' <home> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <up> <up> 
<up> <up> <up> <up> <up> <end> C-SPC <home> <up> <up> 
<up> C-w <delete> C-c ' <f2> C-c C-v C-t M-x r e p 
o r t - e m <tab> <return>

Recent messages:
Wrote /home/lomov/works/scripts/emacs.d/erc-us.el
Wrote /home/lomov/works/scripts/emacs.d/emacs
Wrote /home/lomov/works/scripts/emacs.d/cdlatex-us.el
Wrote /home/lomov/works/scripts/emacs.d/auctex-us.el
Wrote /home/lomov/works/scripts/emacs.d/org-us.el
Wrote /home/lomov/works/scripts/emacs.d/keybinds-us.el
Wrote /home/lomov/works/scripts/emacs.d/mode/org-capture-note-idea.txt
Wrote /home/lomov/works/scripts/emacs.d/mode/org-capture-journal.txt
Wrote /home/lomov/works/scripts/emacs.d/mode/org-capture-todo.txt
Tangled 27 code blocks from emacs.org

Load-path shadows:
/usr/share/emacs/site-lisp/org/org-macs hides /usr/share/emacs/24.3.50/lisp/org/org-macs
/usr/share/emacs/site-lisp/org/org-list hides /usr/share/emacs/24.3.50/lisp/org/org-list
/usr/share/emacs/site-lisp/org/org-feed hides /usr/share/emacs/24.3.50/lisp/org/org-feed
/usr/share/emacs/site-lisp/org/org-faces hides /usr/share/emacs/24.3.50/lisp/org/org-faces
/usr/share/emacs/site-lisp/org/org-ctags hides /usr/share/emacs/24.3.50/lisp/org/org-ctags
/usr/share/emacs/site-lisp/org/org-crypt hides /usr/share/emacs/24.3.50/lisp/org/org-crypt
/usr/share/emacs/site-lisp/org/org-colview hides /usr/share/emacs/24.3.50/lisp/org/org-colview
/usr/share/emacs/site-lisp/org/org-clock hides /usr/share/emacs/24.3.50/lisp/org/org-clock
/usr/share/emacs/site-lisp/org/org-archive hides /usr/share/emacs/24.3.50/lisp/org/org-archive
/usr/share/emacs/site-lisp/org/org-agenda hides /usr/share/emacs/24.3.50/lisp/org/org-agenda
/usr/share/emacs/site-lisp/org/ob-lilypond hides /usr/share/emacs/24.3.50/lisp/org/ob-lilypond
/usr/share/emacs/site-lisp/org/ob-ocaml hides /usr/share/emacs/24.3.50/lisp/org/ob-ocaml
/usr/share/emacs/site-lisp/org/ob-latex hides /usr/share/emacs/24.3.50/lisp/org/ob-latex
/usr/share/emacs/site-lisp/org/ob-python hides /usr/share/emacs/24.3.50/lisp/org/ob-python
/usr/share/emacs/site-lisp/org/ob-mscgen hides /usr/share/emacs/24.3.50/lisp/org/ob-mscgen
/usr/share/emacs/site-lisp/org/ob-asymptote hides /usr/share/emacs/24.3.50/lisp/org/ob-asymptote
/usr/share/emacs/site-lisp/org/ob-comint hides /usr/share/emacs/24.3.50/lisp/org/ob-comint
/usr/share/emacs/site-lisp/org/ob-clojure hides /usr/share/emacs/24.3.50/lisp/org/ob-clojure
/usr/share/emacs/site-lisp/org/ob-scheme hides /usr/share/emacs/24.3.50/lisp/org/ob-scheme
/usr/share/emacs/site-lisp/org/org-table hides /usr/share/emacs/24.3.50/lisp/org/org-table
/usr/share/emacs/site-lisp/org/org-src hides /usr/share/emacs/24.3.50/lisp/org/org-src
/usr/share/emacs/site-lisp/org/org-rmail hides /usr/share/emacs/24.3.50/lisp/org/org-rmail
/usr/share/emacs/site-lisp/org/org-protocol hides /usr/share/emacs/24.3.50/lisp/org/org-protocol
/usr/share/emacs/site-lisp/org/ox-odt hides /usr/share/emacs/24.3.50/lisp/org/ox-odt
/usr/share/emacs/site-lisp/org/org-plot hides /usr/share/emacs/24.3.50/lisp/org/org-plot
/usr/share/emacs/site-lisp/org/org-pcomplete hides /usr/share/emacs/24.3.50/lisp/org/org-pcomplete
/usr/share/emacs/site-lisp/org/ox-md hides /usr/share/emacs/24.3.50/lisp/org/ox-md
/usr/share/emacs/site-lisp/org/org-mouse hides /usr/share/emacs/24.3.50/lisp/org/org-mouse
/usr/share/emacs/site-lisp/org/org-mobile hides /usr/share/emacs/24.3.50/lisp/org/org-mobile
/usr/share/emacs/site-lisp/org/org-mhe hides /usr/share/emacs/24.3.50/lisp/org/org-mhe
/usr/share/emacs/site-lisp/org/org-macro hides /usr/share/emacs/24.3.50/lisp/org/org-macro
/usr/share/emacs/site-lisp/org/org-irc hides /usr/share/emacs/24.3.50/lisp/org/org-irc
/usr/share/emacs/site-lisp/org/org-inlinetask hides /usr/share/emacs/24.3.50/lisp/org/org-inlinetask
/usr/share/emacs/site-lisp/org/ox-icalendar hides /usr/share/emacs/24.3.50/lisp/org/ox-icalendar
/usr/share/emacs/site-lisp/org/org-info hides /usr/share/emacs/24.3.50/lisp/org/org-info
/usr/share/emacs/site-lisp/org/org-indent hides /usr/share/emacs/24.3.50/lisp/org/org-indent
/usr/share/emacs/site-lisp/org/org-id hides /usr/share/emacs/24.3.50/lisp/org/org-id
/usr/share/emacs/site-lisp/org/org-habit hides /usr/share/emacs/24.3.50/lisp/org/org-habit
/usr/share/emacs/site-lisp/org/org-gnus hides /usr/share/emacs/24.3.50/lisp/org/org-gnus
/usr/share/emacs/site-lisp/org/org-footnote hides /usr/share/emacs/24.3.50/lisp/org/org-footnote
/usr/share/emacs/site-lisp/org/ox-html hides /usr/share/emacs/24.3.50/lisp/org/ox-html
/usr/share/emacs/site-lisp/org/org-eshell hides /usr/share/emacs/24.3.50/lisp/org/org-eshell
/usr/share/emacs/site-lisp/org/org-entities hides /usr/share/emacs/24.3.50/lisp/org/org-entities
/usr/share/emacs/site-lisp/org/ox-beamer hides /usr/share/emacs/24.3.50/lisp/org/ox-beamer
/usr/share/emacs/site-lisp/org/org-element hides /usr/share/emacs/24.3.50/lisp/org/org-element
/usr/share/emacs/site-lisp/org/ox-ascii hides /usr/share/emacs/24.3.50/lisp/org/ox-ascii
/usr/share/emacs/site-lisp/org/org-docview hides /usr/share/emacs/24.3.50/lisp/org/org-docview
/usr/share/emacs/site-lisp/org/org hides /usr/share/emacs/24.3.50/lisp/org/org
/usr/share/emacs/site-lisp/org/org-datetree hides /usr/share/emacs/24.3.50/lisp/org/org-datetree
/usr/share/emacs/site-lisp/org/org-w3m hides /usr/share/emacs/24.3.50/lisp/org/org-w3m
/usr/share/emacs/site-lisp/org/org-compat hides /usr/share/emacs/24.3.50/lisp/org/org-compat
/usr/share/emacs/site-lisp/org/org-timer hides /usr/share/emacs/24.3.50/lisp/org/org-timer
/usr/share/emacs/site-lisp/org/ox hides /usr/share/emacs/24.3.50/lisp/org/ox
/usr/share/emacs/site-lisp/org/org-capture hides /usr/share/emacs/24.3.50/lisp/org/org-capture
/usr/share/emacs/site-lisp/org/ox-latex hides /usr/share/emacs/24.3.50/lisp/org/ox-latex
/usr/share/emacs/site-lisp/org/org-bibtex hides /usr/share/emacs/24.3.50/lisp/org/org-bibtex
/usr/share/emacs/site-lisp/org/ox-texinfo hides /usr/share/emacs/24.3.50/lisp/org/ox-texinfo
/usr/share/emacs/site-lisp/org/org-bbdb hides /usr/share/emacs/24.3.50/lisp/org/org-bbdb
/usr/share/emacs/site-lisp/org/org-attach hides /usr/share/emacs/24.3.50/lisp/org/org-attach
/usr/share/emacs/site-lisp/org/ox-publish hides /usr/share/emacs/24.3.50/lisp/org/ox-publish
/usr/share/emacs/site-lisp/org/ox-man hides /usr/share/emacs/24.3.50/lisp/org/ox-man
/usr/share/emacs/site-lisp/org/ox-org hides /usr/share/emacs/24.3.50/lisp/org/ox-org
/usr/share/emacs/site-lisp/org/ob hides /usr/share/emacs/24.3.50/lisp/org/ob
/usr/share/emacs/site-lisp/org/ob-tangle hides /usr/share/emacs/24.3.50/lisp/org/ob-tangle
/usr/share/emacs/site-lisp/org/ob-table hides /usr/share/emacs/24.3.50/lisp/org/ob-table
/usr/share/emacs/site-lisp/org/ob-sqlite hides /usr/share/emacs/24.3.50/lisp/org/ob-sqlite
/usr/share/emacs/site-lisp/org/ob-plantuml hides /usr/share/emacs/24.3.50/lisp/org/ob-plantuml
/usr/share/emacs/site-lisp/org/ob-java hides /usr/share/emacs/24.3.50/lisp/org/ob-java
/usr/share/emacs/site-lisp/org/ob-picolisp hides /usr/share/emacs/24.3.50/lisp/org/ob-picolisp
/usr/share/emacs/site-lisp/org/ob-maxima hides /usr/share/emacs/24.3.50/lisp/org/ob-maxima
/usr/share/emacs/site-lisp/org/ob-io hides /usr/share/emacs/24.3.50/lisp/org/ob-io
/usr/share/emacs/site-lisp/org/ob-perl hides /usr/share/emacs/24.3.50/lisp/org/ob-perl
/usr/share/emacs/site-lisp/org/ob-matlab hides /usr/share/emacs/24.3.50/lisp/org/ob-matlab
/usr/share/emacs/site-lisp/org/ob-haskell hides /usr/share/emacs/24.3.50/lisp/org/ob-haskell
/usr/share/emacs/site-lisp/org/ob-sql hides /usr/share/emacs/24.3.50/lisp/org/ob-sql
/usr/share/emacs/site-lisp/org/ob-org hides /usr/share/emacs/24.3.50/lisp/org/ob-org
/usr/share/emacs/site-lisp/org/ob-ledger hides /usr/share/emacs/24.3.50/lisp/org/ob-ledger
/usr/share/emacs/site-lisp/org/ob-gnuplot hides /usr/share/emacs/24.3.50/lisp/org/ob-gnuplot
/usr/share/emacs/site-lisp/org/ob-shen hides /usr/share/emacs/24.3.50/lisp/org/ob-shen
/usr/share/emacs/site-lisp/org/ob-octave hides /usr/share/emacs/24.3.50/lisp/org/ob-octave
/usr/share/emacs/site-lisp/org/ob-keys hides /usr/share/emacs/24.3.50/lisp/org/ob-keys
/usr/share/emacs/site-lisp/org/ob-fortran hides /usr/share/emacs/24.3.50/lisp/org/ob-fortran
/usr/share/emacs/site-lisp/org/ob-screen hides /usr/share/emacs/24.3.50/lisp/org/ob-screen
/usr/share/emacs/site-lisp/org/ob-exp hides /usr/share/emacs/24.3.50/lisp/org/ob-exp
/usr/share/emacs/site-lisp/org/ob-lisp hides /usr/share/emacs/24.3.50/lisp/org/ob-lisp
/usr/share/emacs/site-lisp/org/ob-eval hides /usr/share/emacs/24.3.50/lisp/org/ob-eval
/usr/share/emacs/site-lisp/org/ob-ref hides /usr/share/emacs/24.3.50/lisp/org/ob-ref
/usr/share/emacs/site-lisp/org/ob-lob hides /usr/share/emacs/24.3.50/lisp/org/ob-lob
/usr/share/emacs/site-lisp/org/ob-emacs-lisp hides /usr/share/emacs/24.3.50/lisp/org/ob-emacs-lisp
/usr/share/emacs/site-lisp/org/ob-sass hides /usr/share/emacs/24.3.50/lisp/org/ob-sass
/usr/share/emacs/site-lisp/org/ob-js hides /usr/share/emacs/24.3.50/lisp/org/ob-js
/usr/share/emacs/site-lisp/org/ob-dot hides /usr/share/emacs/24.3.50/lisp/org/ob-dot
/usr/share/emacs/site-lisp/org/ob-ruby hides /usr/share/emacs/24.3.50/lisp/org/ob-ruby
/usr/share/emacs/site-lisp/org/ob-makefile hides /usr/share/emacs/24.3.50/lisp/org/ob-makefile
/usr/share/emacs/site-lisp/org/ob-ditaa hides /usr/share/emacs/24.3.50/lisp/org/ob-ditaa
/usr/share/emacs/site-lisp/org/ob-scala hides /usr/share/emacs/24.3.50/lisp/org/ob-scala
/usr/share/emacs/site-lisp/org/ob-R hides /usr/share/emacs/24.3.50/lisp/org/ob-R
/usr/share/emacs/site-lisp/org/ob-css hides /usr/share/emacs/24.3.50/lisp/org/ob-css
/usr/share/emacs/site-lisp/org/ob-C hides /usr/share/emacs/24.3.50/lisp/org/ob-C
/usr/share/emacs/site-lisp/org/ob-sh hides /usr/share/emacs/24.3.50/lisp/org/ob-sh
/usr/share/emacs/site-lisp/org/org-loaddefs hides /usr/share/emacs/24.3.50/lisp/org/org-loaddefs
/usr/share/emacs/site-lisp/org/ob-awk hides /usr/share/emacs/24.3.50/lisp/org/ob-awk
/usr/share/emacs/site-lisp/org/ob-core hides /usr/share/emacs/24.3.50/lisp/org/ob-core
/usr/share/emacs/site-lisp/org/ob-calc hides /usr/share/emacs/24.3.50/lisp/org/ob-calc
/usr/share/emacs/site-lisp/org/org-version hides /usr/share/emacs/24.3.50/lisp/org/org-version
/usr/share/emacs/site-lisp/org/org-install hides /usr/share/emacs/24.3.50/lisp/org/org-install

Features:
(shadow sort spook cookie1 mail-extr emacsbug message idna rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils
image-file tabify ffap org-colview cal-china lunar solar cal-dst
cal-bahai cal-iso vc-git cdlatex texmathp org-annotate-file org-id
org-habit org-info org-docview org-bibtex bibtex org-bbdb erc-services
erc-list erc-menu erc-join erc-ring erc-networks erc-pcomplete erc-track
erc-match erc-button wid-edit erc-fill erc-stamp erc-netsplit
erc-goodies erc erc-backend erc-compat magit-key-mode magit grep compile
epa derived epg epg-config diff-mode git-rebase-mode thingatpt rx
git-commit-mode server log-edit pcvs-util add-log magit-version
auto-complete-config auto-complete cl-macs gv popup cl calfw-ical url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util url-parse auth-source eieio eieio-core gnus-util
mm-util mail-prsvr password-cache url-vars mailcap icalendar diary-lib
diary-loaddefs calfw-org org-agenda calfw edmacro kmacro cl-loaddefs
cl-lib holidays hol-loaddefs ob-sh shell ob-perl ob-latex ob-asymptote
ob-gnuplot ox-latex ox-icalendar ox-html ox-ascii ox-publish ox
org-element org byte-opt bytecomp byte-compile cconv org-macro
org-footnote org-pcomplete pcomplete org-list org-faces org-entities
noutline outline org-version ob-emacs-lisp ob ob-tangle org-src ob-ref
ob-lob ob-table ob-keys ob-exp ob-comint comint ansi-color ring ob-core
ob-eval org-compat org-macs org-loaddefs format-spec find-func cal-menu
calendar cal-loaddefs preview-latex tex-site auto-loads jka-compr dired+
dired-aux bookmark+ bookmark+-key easy-mmode advice help-fns dired-x
dired bookmark+-1 bookmark+-bmu help-mode easymenu bookmark+-lit
bookmark pp ido uniquify flyspell ispell time-date paren cyril-util
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse 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 nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)


P.S. I wasn't able to configure Emacs Message mode to use local
configured mail server (postfix), so I have to resend message using
other mail agent.

--
WBR, Vladimir Lomov

-- 
Whenever Richard Cory went downtown,
	We people on the pavement looked at him:
He was a gentleman from sole to crown,
	Clean-favored, and imperially slim.
And he was always quietly arrayed,
	And he was always human when he talked;
But still he fluttered pulses when he said,
	"Good morning," and he glittered when he walked.
And he was rich -- yes, richer than a king --
	And admirably schooled in every grace:
In fine, we thought that he was everything
	To make us wish that we were in his place.
So on we worked, and waited for the light,
	And went without the meat, and cursed the bread;
And Richard Cory, one calm summer night,
	Went home and put a bullet through his head.
		-- E.A. Robinson, "Richard Cory"
[ispell.el.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15903; Package emacs. (Sat, 16 Nov 2013 18:41:02 GMT) Full text and rfc822 format available.

Message #8 received at 15903 <at> debbugs.gnu.org (full text, mbox):

From: Agustin Martin <agustimartin <at> gmail.com>
To: Vladimir Lomov <lomov.vl <at> gmail.com>
Cc: 15903 <at> debbugs.gnu.org
Subject: Re: bug#15903: 24.3.50; Fix small issue with ispell-hunspell when
 dictionary is set to default (nil)
Date: Sat, 16 Nov 2013 12:43:02 +0100
[Message part 1 (text/plain, inline)]
2013/11/15 Vladimir Lomov <lomov.vl <at> gmail.com>

> --text follows this line--
>
> Hello,
> according to variable 'ispell-dictionary-base-alist' defined in
> 'ispell.el' if 'ispell-dictionary' is nil then it is considered as
> default value for dictionary. Unfortunately, when hunspell is used as
> ispell program function 'ispell-parse-hunspell-affix-file' fails because
> it doesn't expect nil as argument.
>
> I propose small and simple patch. I checked it starting emacs as:
>   emacs -Q
> and evaluating in *scratch*:
>   (setq ispell-program-name "hunspell")
>   (setq ispell-really-hunspell t)
> after that I run 'M-$' while point is on first 's' of
>   (message)
>
> In minibuffer I see
>   MESSAGE is correct
>
> Without this patch the same steps lead to message
>   ispell-phaf: No matching entry for nil.
>

Hi,

Cannot reproduce it here. By the way, once initialized for hunspell
ispell.el provides a match for default (nil) value, here

(nil [[:alpha:]] [^[:alpha:]] ['] nil (-B) nil utf-8)

Regards,

-- 
Agustin
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15903; Package emacs. (Mon, 18 Nov 2013 06:34:01 GMT) Full text and rfc822 format available.

Message #11 received at 15903 <at> debbugs.gnu.org (full text, mbox):

From: Vladimir Lomov <lomov.vl <at> gmail.com>
To: 15903 <at> debbugs.gnu.org
Cc: Agustin Martin <agustimartin <at> gmail.com>
Subject: Re: bug#15903: 24.3.50; Fix small issue with ispell-hunspell when
 dictionary is set to default (nil)
Date: Mon, 18 Nov 2013 15:33:00 +0900
[Message part 1 (text/plain, inline)]
Hello,
** Agustin Martin [2013-11-16 12:43:02 +0100]:

> 2013/11/15 Vladimir Lomov <lomov.vl <at> gmail.com>

>> Hello,
>> according to variable 'ispell-dictionary-base-alist' defined in
>> 'ispell.el' if 'ispell-dictionary' is nil then it is considered as
>> default value for dictionary. Unfortunately, when hunspell is used as
>> ispell program function 'ispell-parse-hunspell-affix-file' fails because
>> it doesn't expect nil as argument.

>> I propose small and simple patch. I checked it starting emacs as:
>>   emacs -Q
>> and evaluating in *scratch*:
>>   (setq ispell-program-name "hunspell")
>>   (setq ispell-really-hunspell t)
>> after that I run 'M-$' while point is on first 's' of
>>   (message)

>> In minibuffer I see
>>   MESSAGE is correct

>> Without this patch the same steps lead to message
>>   ispell-phaf: No matching entry for nil.

> Hi,

> Cannot reproduce it here. By the way, once initialized for hunspell
> ispell.el provides a match for default (nil) value, here

> (nil [[:alpha:]] [^[:alpha:]] ['] nil (-B) nil utf-8)

Wouldn't you mind to share how you get this?

I tried hard to prepare minimal example to catch when the problem
appears but I know a very little of Emacs Lisp.

This is my investigation and results.

My system:
OS: Archlinux x86_64,
Emacs: compiled from trunk (rev. 115132), with original ispell.el
env. variables:
  DICTIONARY=russian
  LANG=ru_RU.UTF-8
  LC_CTYPE="ru_RU.UTF-8"
  LC_NUMERIC="ru_RU.UTF-8"
  LC_TIME="ru_RU.UTF-8"
  LC_COLLATE=C
  LC_MONETARY="ru_RU.UTF-8"
  LC_MESSAGES="ru_RU.UTF-8"
  LC_PAPER="ru_RU.UTF-8"
  LC_NAME="ru_RU.UTF-8"
  LC_ADDRESS="ru_RU.UTF-8"
  LC_TELEPHONE="ru_RU.UTF-8"
  LC_MEASUREMENT="ru_RU.UTF-8"
  LC_IDENTIFICATION="ru_RU.UTF-8"
  LC_ALL=
aspell: @(#) International Ispell Version 3.1.20 (but really Aspell 0.60.6.1)
hunspell: @(#) International Ispell Version 3.2.06 (but really Hunspell 1.3.2)

System has both Russian and English dictionaries.

I tested both aspell and hunspell variants. Emacs is started from rxvt
terminal as
  emacs -Q -l min-VARIANT.el
both min-VARIANT.el, VARIANT={a,hun}spell are attached (and also can be
found in repository https://bitbucket.org/vp1981/issues,
https://bitbucket.org/vp1981/issues/src/452f8c393983a875cb46e96d9c9b5d42cb5e1dc7/emacs/ispell/?at=default)

Then I open one of three test files VARIANT-exN.el, (N=,2,3) and
evaluate commands. The only difference between test files is that
- VARIANT-ex.el:  dictionary is not set explicitly,
- VARIANT-ex2.el: dictionary is set to string 'english',
- VARIANT-ex3.el: dictionary is set to nil,

The rest of test files are the same:
1. output values of several variables: ispell-VARIANT-dictionary-alist,
   ispell-dictionary and ispell-{local,current}-dictionary;
2. run 'ispell-word';
3. output values of the same variables;
4. run 'ispell-word' again;
5. output values of the same variables.

Results are shown in table

         \  |      aspell       |     hunspell
Test file \ | 1 | 2 | 3 | 4 | 5 | 1 | 2 | 3 | 4 | 5 |
------------+---+---+---+---+---+---+---+---+---+---+
   ex.el    | n | - | + | - | + | n |e11| + |e12| + |
  ex2.el    | n |+n | + |+n | + | n |e11| + |e2 | + |
  ex3.el    | n | - | + | - | + | n |e11| + |e12| + |

Here:
n:   means 'nil' (return value);
+n:  means successful run and nil is returned;
+:   means successful run;
-:   means 'ispell-word' was run but seems can't find word "message" in
     a dictionary (may be it didn't use any);
e1*: 'ispell-phaf' error (No matching entry for nil);
     difference between e11 and e12 is that first calls 'find-dictionaries'
     while second one calls 'fill-dictionary-entry';
e2:  Lisp error, (No data for dictionary \"english\"...)

Reports (backtrace) from Debugger are attached.

What I expect in all cases:
if either dictionary set to a valid string, to nil or doesn't set at
all, call of 'ispell-word' (or M-$) should give result, may be zero
one but not an error.

These test files show (on my system) some problem with ispell. Of course
I could be wrong and do something unusual but I tried to minimize any
side-effects of my /real/ Emacs configuration.

If I apply patch proposed in first message and run tests again (only
hunspell part) then all three test files would give positive results
(evaluating 'ispell-word' function gives nil, M-$ gives message in
minibuffer "MESSAGE is correct").

P.S. Seems there might be a problem with aspell but here I want to clarify
issue with hunspell.

---
WBR, Vladimir Lomov

-- 
Churchill's Commentary on Man:
	Man will occasionally stumble over the truth,
	but most of the time he will pick himself up and continue on.
[hunspell-ex.el (text/plain, attachment)]
[hunspell-ex2.el (text/plain, attachment)]
[hunspell-ex3.el (text/plain, attachment)]
[aspell-ex3.el (text/plain, attachment)]
[aspell-ex2.el (text/plain, attachment)]
[aspell-ex3.el (text/plain, attachment)]
[min-hunspell.el (text/plain, attachment)]
[min-aspell.el (text/plain, attachment)]
[hunspell-ex-step2.txt (text/plain, attachment)]
[hunspell-ex-step4.txt (text/plain, attachment)]
[hunspell-ex2-step2.txt (text/plain, attachment)]
[hunspell-ex2-step4.txt (text/plain, attachment)]
[hunspell-ex3-step2.txt (text/plain, attachment)]
[hunspell-ex3-step4.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15903; Package emacs. (Mon, 18 Nov 2013 12:13:01 GMT) Full text and rfc822 format available.

Message #14 received at 15903 <at> debbugs.gnu.org (full text, mbox):

From: Agustin Martin <agustin.martin <at> hispalinux.es>
To: Vladimir Lomov <lomov.vl <at> gmail.com>, 15903 <at> debbugs.gnu.org
Subject: Re: bug#15903: 24.3.50; Fix small issue with ispell-hunspell when
 dictionary is set to default (nil)
Date: Mon, 18 Nov 2013 13:11:58 +0100
On Mon, Nov 18, 2013 at 03:33:00PM +0900, Vladimir Lomov wrote:
> Hello,
> ** Agustin Martin [2013-11-16 12:43:02 +0100]:
> 
> > 2013/11/15 Vladimir Lomov <lomov.vl <at> gmail.com>
> 
> >> Hello,
> >> according to variable 'ispell-dictionary-base-alist' defined in
> >> 'ispell.el' if 'ispell-dictionary' is nil then it is considered as
> >> default value for dictionary. Unfortunately, when hunspell is used as
> >> ispell program function 'ispell-parse-hunspell-affix-file' fails because
> >> it doesn't expect nil as argument.
> 
> >> I propose small and simple patch. I checked it starting emacs as:
> >>   emacs -Q
> >> and evaluating in *scratch*:
> >>   (setq ispell-program-name "hunspell")
> >>   (setq ispell-really-hunspell t)
> >> after that I run 'M-$' while point is on first 's' of
> >>   (message)
> 
> >> In minibuffer I see
> >>   MESSAGE is correct
> 
> >> Without this patch the same steps lead to message
> >>   ispell-phaf: No matching entry for nil.
> 
> > Hi,
> 
> > Cannot reproduce it here. By the way, once initialized for hunspell
> > ispell.el provides a match for default (nil) value, here
> 
> > (nil [[:alpha:]] [^[:alpha:]] ['] nil (-B) nil utf-8)
> 
> Wouldn't you mind to share how you get this?

Using 20131101 emacs-snapshot,

$ LC_ALL=C emacs-snapshot -Q &

In scratch buffer, type

(setq ispell-program-name "hunspell")
(setq ispell-dictionary nil)

and `eval-region' that region. Then run 'M-$' on a couple of words (file and
dictionary). This will make ispell.el be loaded and ispell process started,
messages buffer shows

Starting new Ispell process [hunspell::default] ...
Checking spelling of FILE...
FILE is correct
Checking spelling of DICTIONARY...
DICTIONARY is correct

Evaluating in the scratch buffer

(message "%s" (assoc nil ispell-hunspell-dictionary-alist))

I get (now default here is en_US)

(nil [[:alpha:]] [^[:alpha:]] ['0-9] t (-d en_US) nil utf-8)

Note that `ispell-hunspell-dictionary-alist' is not bound until ispell.el is
loaded, and that will not happen until you spellcheck for the first time (or
call a command that forces ispell.el load), so the first part of your check
should do nothing until then. If you get some result there please doublecheck
that you are not loading it from a different site.

PS: What is prin1?

Regards,

-- 
Agustin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15903; Package emacs. (Mon, 18 Nov 2013 12:49:02 GMT) Full text and rfc822 format available.

Message #17 received at 15903 <at> debbugs.gnu.org (full text, mbox):

From: Vladimir Lomov <lomov.vl <at> gmail.com>
To: Agustin Martin <agustin.martin <at> hispalinux.es>, 15903 <at> debbugs.gnu.org
Subject: Re: bug#15903: 24.3.50; Fix small issue with ispell-hunspell when
 dictionary is set to default (nil)
Date: Mon, 18 Nov 2013 21:48:20 +0900
[Message part 1 (text/plain, inline)]
Hello,
** Agustin Martin [2013-11-18 13:11:58 +0100]:

[...]

>>> Cannot reproduce it here. By the way, once initialized for hunspell
>>> ispell.el provides a match for default (nil) value, here

>>> (nil [[:alpha:]] [^[:alpha:]] ['] nil (-B) nil utf-8)

>> Wouldn't you mind to share how you get this?

> Using 20131101 emacs-snapshot,

> $ LC_ALL=C emacs-snapshot -Q &

> In scratch buffer, type

> (setq ispell-program-name "hunspell")
> (setq ispell-dictionary nil)

> and `eval-region' that region. Then run 'M-$' on a couple of words (file and
> dictionary). This will make ispell.el be loaded and ispell process started,
> messages buffer shows

> Starting new Ispell process [hunspell::default] ...
> Checking spelling of FILE...
> FILE is correct
> Checking spelling of DICTIONARY...
> DICTIONARY is correct

Tried but without luck, I attached content of *Messages* and *scratch*.

> Evaluating in the scratch buffer

> (message "%s" (assoc nil ispell-hunspell-dictionary-alist))

> I get (now default here is en_US)

> (nil [[:alpha:]] [^[:alpha:]] ['0-9] t (-d en_US) nil utf-8)

Got nil.

> Note that `ispell-hunspell-dictionary-alist' is not bound until ispell.el is
> loaded, and that will not happen until you spellcheck for the first time (or
> call a command that forces ispell.el load), so the first part of your check
> should do nothing until then. If you get some result there please doublecheck
> that you are not loading it from a different site.

Exactly that I figured out from ispell.el, so at first I got 'void
variable' then added 'boundp'.

> PS: What is prin1?

I found thin function in Emacs Lisp Manual (info:elisp#Output
Functions), I use it because I didn't know how to use 'message' :),
thanks for example.

After some tests I found that my /real/ Emacs configuration works,
this is odd because earlier it didn't. Using the same settings for test
files gives failure. I'll back to this problem later on this week.

---
WBR, Vladimir Lomov

-- 
Clique Maintenance:
	The need of one generation to see the generation following it
as deficient so as to bolster its own collective ego: "Kids today do
nothing.  They're so apathetic.  We used to go out and protest.  All
they do is shop and complain."
		-- Douglas Coupland, "Generation X: Tales for an Accelerated
		   Culture"
[messages.txt (text/plain, attachment)]
[scratch.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15903; Package emacs. (Tue, 19 Nov 2013 10:30:02 GMT) Full text and rfc822 format available.

Message #20 received at 15903 <at> debbugs.gnu.org (full text, mbox):

From: Agustin Martin <agustin.martin <at> hispalinux.es>
To: Vladimir Lomov <lomov.vl <at> gmail.com>, 15903 <at> debbugs.gnu.org
Subject: Re: bug#15903: 24.3.50; Fix small issue with ispell-hunspell when
 dictionary is set to default (nil)
Date: Tue, 19 Nov 2013 11:29:44 +0100
On Mon, Nov 18, 2013 at 09:48:20PM +0900, Vladimir Lomov wrote:
> 
> After some tests I found that my /real/ Emacs configuration works,
> this is odd because earlier it didn't. Using the same settings for test
> files gives failure. I'll back to this problem later on this week.

Hi,

Just to complete info. What does 'hunspell -D' return in your box? Please
try both with your locale and with LC_ALL=C.

Thanks for the feedback,

-- 
Agustin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15903; Package emacs. (Tue, 19 Nov 2013 12:10:01 GMT) Full text and rfc822 format available.

Message #23 received at 15903 <at> debbugs.gnu.org (full text, mbox):

From: Vladimir Lomov <lomov.vl <at> gmail.com>
To: Agustin Martin <agustin.martin <at> hispalinux.es>, 15903 <at> debbugs.gnu.org
Subject: Re: bug#15903: 24.3.50; Fix small issue with ispell-hunspell when
 dictionary is set to default (nil)
Date: Tue, 19 Nov 2013 21:08:59 +0900
Hello,
** Agustin Martin [2013-11-19 11:29:44 +0100]:

> On Mon, Nov 18, 2013 at 09:48:20PM +0900, Vladimir Lomov wrote:

>> After some tests I found that my /real/ Emacs configuration works,
>> this is odd because earlier it didn't. Using the same settings for test
>> files gives failure. I'll back to this problem later on this week.

> Hi,

> Just to complete info. What does 'hunspell -D' return in your box? Please
> try both with your locale and with LC_ALL=C.

Thank you, this helps me to resolve my issue. Problem was on my side, at
that time when I used to use aspell for spell checking I set environment
variable DICTIONARY to string 'russian'. Seems that fools hunspell. When
I run hunspell -D in a shell with DICTIONARY set to 'russian' hunspell
ended with

  ...
  Can't open affix or dictionary files for dictionary named "russian".

with exit code 1. When I unset that variable I get

  ...
  LOADED DICTIONARY:
  /usr/share/hunspell/ru_RU.aff
  /usr/share/hunspell/ru_RU.dic
  Hunspell 1.3.2

And if I run hunspell with LC_ALL=C:

  ...
  LOADED DICTIONARY:
  /usr/share/hunspell/en_US.aff
  /usr/share/hunspell/en_US.dic
  Hunspell 1.3.2

So when I run Emacs in a shell without variable DICTIONARY like

  LC_ALL=C emacs -Q

and perform your steps,

  (setq ispell-program-name "hunspell")
  (setq ispell-dictionary)

'evar-region' and 'M-$' some words in *scratch* buffer, then

  (message "%s" (assoc nil ispell-hunspell-dictionary-alist))

I get expected behaviour: 'M-$' checks words and
ispell-hunspell-dictionary-alist contains 'nil' entry so it is treated
correctly.

> Thanks for the feedback,

Thanks again.

Now I think this "bug" can be closed as "FIXED".

---
WBR, Vladimir Lomov

-- 
Journalism is literature in a hurry.
		-- Matthew Arnold




Reply sent to Agustin Martin <agustin.martin <at> hispalinux.es>:
You have taken responsibility. (Tue, 19 Nov 2013 13:44:02 GMT) Full text and rfc822 format available.

Notification sent to Vladimir Lomov <lomov.vl <at> gmail.com>:
bug acknowledged by developer. (Tue, 19 Nov 2013 13:44:03 GMT) Full text and rfc822 format available.

Message #28 received at 15903-done <at> debbugs.gnu.org (full text, mbox):

From: Agustin Martin <agustin.martin <at> hispalinux.es>
To: Vladimir Lomov <lomov.vl <at> gmail.com>, 15903-done <at> debbugs.gnu.org
Subject: Re: bug#15903: 24.3.50; Fix small issue with ispell-hunspell when
 dictionary is set to default (nil)
Date: Tue, 19 Nov 2013 14:43:31 +0100
On Tue, Nov 19, 2013 at 09:08:59PM +0900, Vladimir Lomov wrote:
> Hello,
> ** Agustin Martin [2013-11-19 11:29:44 +0100]:
> 
> > On Mon, Nov 18, 2013 at 09:48:20PM +0900, Vladimir Lomov wrote:
> 
> >> After some tests I found that my /real/ Emacs configuration works,
> >> this is odd because earlier it didn't. Using the same settings for test
> >> files gives failure. I'll back to this problem later on this week.
> 
> > Hi,
> 
> > Just to complete info. What does 'hunspell -D' return in your box? Please
> > try both with your locale and with LC_ALL=C.
> 
> Thank you, this helps me to resolve my issue. Problem was on my side, at
> that time when I used to use aspell for spell checking I set environment
> variable DICTIONARY to string 'russian'. Seems that fools hunspell. When
> I run hunspell -D in a shell with DICTIONARY set to 'russian' hunspell
> ended with
> 
>   ...
>   Can't open affix or dictionary files for dictionary named "russian".

hunspell does not have aliases unless you set symlinks to simulate them,
will only accept entries shown in "hunspell -D". ispell.el tries to match
aliases for entries traditionally in ispell-dictionary-alist, so those names
still work from ispell.el, but that is only an internal ispell.el issue.

> Now I think this "bug" can be closed as "FIXED".

Done. Thanks for your help.

Regards,

-- 
Agustin




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 18 Dec 2013 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 239 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.