From: Eli Zaretskii <eliz@gnu.org>
To: Agustin Martin <agustin.martin@hispalinux.es>
Cc: emacs-devel@gnu.org
Subject: Re: Ispell and unibyte characters
Date: Thu, 29 Mar 2012 20:06:17 +0200 [thread overview]
Message-ID: <83sjgr1duu.fsf@gnu.org> (raw)
In-Reply-To: <20120328191821.GA6266@agmartin.aq.upm.es>
> Date: Wed, 28 Mar 2012 21:18:21 +0200
> From: Agustin Martin <agustin.martin@hispalinux.es>
>
> > OTHERCHARS are not very important anyway, at least for languages I'm
> > interested in.
> >
> > > Since currently it is not possible to ask hunspell for installed
> > > dictionaries (hunspell -D does not return control to the console)
> > > no one tried something similar for hunspell.
> >
> > In what version do you have problems with -D?
>
> Hunspell 1.3.2. Does not return control until I press ^C. This may be useful
> if someone wants to know about installed hunspell dictionaries and prepare
> something to play with that info, in a way similar to what is currently done
> for aspell in ispell.el.
Well, to be fair to the Hunspell developers, the documentation doesn't
say that -D should exit after displaying the available dictionaries.
And the code really doesn't do that. However, with a simple 2-liner
(below) I can make it do what you want.
> > Since I wrote that, I found that the problem was due to a bug in
> > hunspell (which I fixed in my copy): it reported byte offsets of the
> > misspelled words, rather than character offsets. After fixing that
> > bug, there's no issue here anymore and nothing to fix in ispell.el.
> > There's a bug report with a patch about that in the hunspell bug
> > tracker, so there's reason to believe this bug will be fixed in a
> > future release.
>
> You mean
>
> http://sourceforge.net/tracker/?func=detail&aid=3178449&group_id=143754&atid=756395
Yes.
> I filed that bug one year ago and received no reply from hunspell
> maintainers. This year I received a followup with a proposed change, but
> there is still no reply to it.
I simply fixed this. This _is_ Free Software, isn't it?
> There is other problem that mostly hits re-using ispell default entries
> under hunspell
>
> http://sourceforge.net/tracker/?func=detail&aid=2617130&group_id=143754&atid=756395
>
> [~ prefixed strings are treated as words in pipe mode]
Another easy fix (the feature is not implemented, so the code should
simply ignore such lines).
> that now stands for three years. I have waited in the hope this is fixed,
It's true that development seems to be slow, but then aspell
development is not exactly vibrant, either: both spellers hadn't a
release in many months.
Anyway, to me, Hunspell is a better tool, because of its support for
multiple dictionaries, which fixes the most annoying inconvenience in
Emacs spell-checking: the need to switch dictionaries according to the
language -- this is really a bad thing when you use Flyspell.
With multiple dictionaries, with very rare exceptions, one needs a
single entry in ispell-dictionary-alist, having all of the
dictionaries for languages one normally uses, [[:alpha:]] as
CASECHARS, and UTF-8 as the encoding.
> but I think I will soon commit to Emacs the same change I use for Debian,
> making sure extended-character-mode is nil for hunspell.
Probably a good idea.
--- src/tools/hunspell.cxx~0 2011-01-21 19:01:29.000000000 +0200
+++ src/tools/hunspell.cxx 2012-03-21 16:40:31.255690500 +0200
@@ -1756,6 +1763,7 @@ int main(int argc, char** argv)
fprintf(stderr, gettext("SEARCH PATH:\n%s\n"), path);
fprintf(stderr, gettext("AVAILABLE DICTIONARIES (path is not mandatory for -d option):\n"));
search(path, NULL, NULL);
+ if (arg_files==-1) exit(0);
}
if (!privdicname) privdicname = mystrdup(getenv("WORDLIST"));
next prev parent reply other threads:[~2012-03-29 18:06 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-17 18:46 Ispell and unibyte characters Eli Zaretskii
2012-03-26 17:39 ` Agustin Martin
2012-03-26 20:08 ` Eli Zaretskii
2012-03-26 22:07 ` Lennart Borgman
2012-03-28 19:18 ` Agustin Martin
2012-03-29 18:06 ` Eli Zaretskii [this message]
2012-03-29 21:13 ` Andreas Schwab
2012-03-30 6:28 ` Eli Zaretskii
2012-04-26 9:54 ` Eli Zaretskii
2012-04-10 19:08 ` Agustin Martin
2012-04-10 19:11 ` Eli Zaretskii
2012-04-12 14:36 ` Agustin Martin
2012-04-12 19:01 ` Eli Zaretskii
2012-04-13 15:25 ` Agustin Martin
2012-04-13 15:53 ` Eli Zaretskii
2012-04-13 16:38 ` Agustin Martin
2012-04-13 17:51 ` Stefan Monnier
2012-04-13 18:44 ` Agustin Martin
2012-04-14 1:57 ` Stefan Monnier
2012-04-15 0:02 ` Agustin Martin
2012-04-16 2:40 ` Stefan Monnier
2012-04-20 15:25 ` Agustin Martin
2012-04-20 15:36 ` Eli Zaretskii
2012-04-20 16:17 ` Agustin Martin
2012-04-21 2:17 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83sjgr1duu.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=agustin.martin@hispalinux.es \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).