all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
Cc: homeros.misasa@gmail.com, 34272@debbugs.gnu.org
Subject: bug#34272: 26.1.91 M-x flyspell-mode
Date: Sat, 09 Feb 2019 11:18:33 +0200	[thread overview]
Message-ID: <83mun5nwuu.fsf@gnu.org> (raw)
In-Reply-To: <20190208.203001.2196726877618799295.tkk@misasa.okayama-u.ac.jp> (message from Tak Kunihiro on Fri, 08 Feb 2019 20:30:01 +0900 (JST))

> Date: Fri, 08 Feb 2019 20:30:01 +0900 (JST)
> Cc: homeros.misasa@gmail.com, 34272@debbugs.gnu.org,
>  tkk@misasa.okayama-u.ac.jp
> From: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
> 
> I traced `ispell-find-hunspell-dictionaries' using Edebug.  I have an
> impression, problem is something to do with initialization on
> `hunspell-default-dict'.  The output is shown below.

Thanks.

hunspell-default-dict is computed in this function,
ispell-find-hunspell-dictionaries.  It starts as nil, and then the
function iterates through the list of dictionaries produced by the
command "hunspell -D nul", looking for a dictionary name that ends
with a ".aff".  Here's the relevant portion of the code:

  (let ((hunspell-found-dicts
	 (split-string
	  (with-temp-buffer
	    (ispell-call-process ispell-program-name
				 null-device
				 t
				 nil
                                 ;; Hunspell 1.7.0 (and later?) won't
                                 ;; show LOADED DICTIONARY unless
                                 ;; there's at least one file argument
                                 ;; on the command line.  So we feed
                                 ;; it with the null device.
				 "-D" null-device)
	    (buffer-string))
	  "[\n\r]+"
	  t))
	hunspell-default-dict
	hunspell-default-dict-entry
	hunspell-multi-dict)
    (dolist (dict hunspell-found-dicts)
      (let* ((full-name (file-name-nondirectory dict))
	     (basename  (file-name-sans-extension full-name))
	     (affix-file (concat dict ".aff")))
	(if (string-match "\\.aff$" dict)
	    ;; Found default dictionary
	    (progn
	      (if hunspell-default-dict
		  (setq hunspell-multi-dict
			(concat (or hunspell-multi-dict
				    (car hunspell-default-dict))
				"," basename))
		(setq affix-file dict)

I need to understand what goes wrong inside this dolist loop that
causes hunspell-default-dict be left at its initial nil value.  This
portion is entirely missing from your trace:

> * Lines surveyed
> 
> ispell:1104: (defun ispell-find-hunspell-dictionaries ()
> ...
> ispell:1187:    (setq hunspell-default-dict (or hunspell-multi-dict
> ispell:1188:				    (car hunspell-default-dict)))
> ispell:1189:    (setq hunspell-default-dict-entry
> ispell:1190:	  (ispell-parse-hunspell-affix-file hunspell-default-dict))

This jumps from line 1104 to 1187, whereas the code fragment shown
above is between lines 1129 and 1158.  Please show me what happens in
that loop, because this is the key to the problem, I think.

(I tried to simulate what should be happening for you, by using the
Hunspell output you have shown in your previous message, but couldn't
spot any problem

Thanks.





  reply	other threads:[~2019-02-09  9:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01 13:54 bug#34272: 26.1.91 M-x flyspell-mode Tak Kunihiro
2019-02-01 15:04 ` Eli Zaretskii
2019-02-01 23:03   ` Tak Kunihiro
2019-02-02  7:07     ` Eli Zaretskii
2019-02-08  7:27 ` Eli Zaretskii
2019-02-08 11:30   ` Tak Kunihiro
2019-02-09  9:18     ` Eli Zaretskii [this message]
2019-02-09  9:48       ` Tak Kunihiro
2019-02-09 10:24         ` Eli Zaretskii
2019-02-09 10:39           ` Tak Kunihiro
2019-02-10 15:35             ` Eli Zaretskii
2019-02-11  0:49               ` Tak Kunihiro
2019-02-11 16:29                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83mun5nwuu.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=34272@debbugs.gnu.org \
    --cc=homeros.misasa@gmail.com \
    --cc=tkk@misasa.okayama-u.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.