From: Martin Kletzander <mk@linux.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 25830@debbugs.gnu.org
Subject: bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly
Date: Tue, 28 Feb 2017 22:53:52 +0100 [thread overview]
Message-ID: <20170228215352.GB29225@wheatley> (raw)
In-Reply-To: <83poi3pr23.fsf@gnu.org>
On Mon, Feb 27, 2017 at 05:54:44PM +0200, Eli Zaretskii wrote:
>> Date: Sat, 25 Feb 2017 13:15:23 +0100
>> From: Martin Kletzander <mk@linux.com>
>> Cc: 25830@debbugs.gnu.org
>>
>> >Thanks. I'll look into invoking ispell-hunspell-add-multi-dic
>> >automatically when we find more than one dictionary loaded by
>> >Hunspell, as it reports when invoked with the -D option.
>>
>> Thank you. Feel free too Cc me on any patch for that, I'll gladly test
>> it out (and learn more about the underlying code).
>
>Please try the patch below. (If it doesn't apply to your version of
>ispell.el, tell me which version of Emacs you have, and I will try to
>produce a compatible patch.)
>
Sorry I didn't get to this earlier. One of the hunks didn't apply
correctly, so I used the file from master and it applied correctly. So
with your patch applied on top of ispell.el from current master, the
situation is way better. But I feel like it still doesn't work as
expected. Not that anything would be broken, but it uses only the first
dictionary found. I have to manually do:
(ispell-hunspell-add-multi-dic "en_GB,cs_CZ")
(ispell-change-dictionary "en_GB,cs_CZ")
I confirmed that both of them needed to be ran. However after that
everything works perfectly. So the only reason why I said it doesn't
work properly is that I see you running similar code in the patch:
(when hunspell-multi-dict
(ispell-hunspell-add-multi-dic hunspell-multi-dict)
(setq ispell-current-dictionary hunspell-multi-dict))
When it works, I see hunspell is ran with '-d en_GB,cs_CZ', but it would
also work if hunspell was ran without '-d', but my guess is that you
don't want to do that.
Anyway, to find out a bit more, I did some debugging. I'm not sure if
it helps or if it makes it more confusing, though. Calling the function
returns "en_GB,cs_CZ". When I add some prin1 statements around the
'add-multi-dic' and 'setq' I see it is called before the hunspell is ran
and it has the proper values set. However when I check the values from
the scratch buffer after it was ran (either manually or by
spell-checking a word), it's like it didn't do anything. It behaves
like it did all the right things, but in a different scope, even though
the variables are not buffer-local or anything.
Unsure how to continue or debug this more, I am giving up for today.
Let me know if I should debug it a bit more somehow.
Have a nice day,
Martin
next prev parent reply other threads:[~2017-02-28 21:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 9:18 bug#25830: 25.2; ispell doesn't parse hunspell dictionaries properly Martin Kletzander
2017-02-21 17:23 ` Eli Zaretskii
2017-02-21 20:24 ` Martin Kletzander
2017-02-21 20:44 ` Eli Zaretskii
2017-02-22 10:40 ` Martin Kletzander
2017-02-22 16:20 ` Eli Zaretskii
2017-02-22 16:43 ` Martin Kletzander
2017-02-25 8:24 ` Eli Zaretskii
2017-02-25 12:15 ` Martin Kletzander
2017-02-25 12:41 ` Eli Zaretskii
2017-02-25 13:10 ` Martin Kletzander
2017-02-27 15:54 ` Eli Zaretskii
2017-02-28 21:53 ` Martin Kletzander [this message]
2017-03-05 15:42 ` Eli Zaretskii
2017-03-07 16:51 ` Eli Zaretskii
2017-03-25 16:13 ` 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=20170228215352.GB29225@wheatley \
--to=mk@linux.com \
--cc=25830@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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.