unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file
@ 2011-01-03 23:14 Reuben Thomas
  2011-01-07 13:14 ` Agustin Martin
                   ` (5 more replies)
  0 siblings, 6 replies; 35+ messages in thread
From: Reuben Thomas @ 2011-01-03 23:14 UTC (permalink / raw)
  To: 7781

With the following text, and using emacs -Q, I get the errors you can
see in the messages log below when using hunspell to spell-check a UTF-8
buffer with some extended characters in it.

I did test this with emacs -Q, but the current session, in which I
reproduced the problem and am now composing this bug report, was not
started with -Q (this is so submitting the bug report works properly!).

I am running a freshly bzr-pulled build of the emacs-23 branch.

Text follows

----cut here----
---
title: Kindle 3 is a good first attempt
tags: computing, books
format: markdown
date: Mon, 03 Jan 2011 20:53:13 +0000
post-id: 2585181001
---

Giving my girlfriend a Kindle for Christmas was the carrot in a multi-pronged strategy to avoid needing more bookshelves (the stick being “I will start giving away your books” and my contribution being to archive books I’ve read (or return the many that aren’t even mine). This therefore required that I stocked it with books before she got her hands on it, which in turn was all the excuse I needed to play with the thing.

My lazy solution was simply to download all of [Feedbooks](http://www.feedbooks.com); I [wrote some scripts](http://rrt.sc3d.org/Software/Kindle/) to make this actually lazy, rather than brain-numbingly dull. In the process I found that while the Kindle is nice to hold and great to read, it struggles to cope with a large collection of books (even though the nearly 3,000 volumes of Feedbooks only half-filled its 4Gb memory), and is woeful as a research tool. And, of course, Amazon’s first-mover-evil surfaced early.

Here are the problems I had:

1. Amazon’s own store doesn’t seem to contain free books. I think it’s poor form not to give people a straightforward choice of free editions of out-of-copyright works. The Kindle may be a loss leader, but at £109 it’s still not cheap. Feedbooks, rather than integrating easily into the Kindle, like, say, a 3rd-party software provider into Ubuntu’s Software Center, provide a catalogue which itself is in the form of a book, doesn’t automatically update, and offers a list ordered only by title. In other words, it’s useless; one is better off using the built-in web browser to search the online catalogue…

2. …or better, another browser, since the Kindle’s is woefully slow (and I don’t just mean the screen update). It’s just about usable, and hence useful in an emergency, but is no good as, for example, an online research tool to use in parallel with the books you have downloaded, although…

3. …offline search is awful too. With just the few ebooks that come loaded on the device, it was slow; with the thousands of books I loaded, it simply locked up the device, even when trying to search in the manual, presumably already indexed. The Kindle seems to index its contents in the background, but even now, over a week later, search doesn’t work. The only effective navigation is by a book’s table of contents, and, to choose which books to read, the user-definable collections, though…

4. …collections are a pain to set up for many books, as you have to select each book manually; there is no way I have found to select a range. (Fortunately, I was able to define collections programmatically, but this will be beyond most users.)

In summary, it’s a lovely device, but the software is rather toytown. Amazon could improve it (and indeed, the 3.0.3 firmware update, at the experimental stage when I checked, claims, vaguely, “performance improvements”), but given that their main interest is in selling books and Kindles, I’m not hopeful that it will happen before the next hardware iteration; whether it happens at all depends on competition, and there should be plenty of that, to go by the number of other ebook readers.

----cut here----


In GNU Emacs 23.2.91.3 (i686-pc-linux-gnu, GTK+ Version 2.22.0)
 of 2011-01-03 on mord
Windowing system distributor `The X.Org Foundation', version 11.0.10900000
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: en_GB.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
  longlines-mode: t
  buffer-face-mode: t
  flyspell-mode: t
  show-paren-mode: t
  savehist-mode: t
  minibuffer-electric-default-mode: t
  iswitchb-mode: t
  icomplete-mode: t
  global-auto-revert-mode: t
  desktop-save-mode: t
  smart-quotes-mode: t
  mouse-wheel-mode: t
  use-hard-newlines: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e p o r t - e m <tab> <return> h u n s p e l 
l SPC <M-backspace> i s p e l l SPC w i t h SPC h u 
n s l e <backspace> <backspace> s p e <backspace> <backspace> 
p e <backspace> <backspace> <backspace> p e l l SPC 
f a i l s C-g <down> <down> <down> <down> <down> <down> 
<down> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> M-x i s p e l l 
<return> SPC SPC SPC M-x i s p e <backspace> <backspace> 
<backspace> <backspace> <up> <up> <return>

Recent messages:
Scanning for "hard" Perl constructions... done
Applying style hooks... done
Scanning for "hard" Perl constructions... done
Scanning for "hard" Perl constructions... done
Scanning for "hard" Perl constructions... done
Scanning for "hard" Perl constructions... done
Lazy desktop load complete
Quit
Spell-checking Kindle 3 is a good first attempt using hunspell with british+accs dictionary...
Spell-checking region using hunspell with british+accs dictionary...done
ispell-process-line: Ispell misalignment: word `Feedbooks' point 1363; probably incompatible versions

Load-path shadows:
/usr/local/share/emacs/23.2.91/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style
/usr/local/share/emacs/23.2.91/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf
/usr/local/share/emacs/23.2.91/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context
/usr/local/share/emacs/23.2.91/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite
/usr/local/share/emacs/23.2.91/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold
/usr/local/share/emacs/23.2.91/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp
/usr/local/share/emacs/23.2.91/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl
/usr/local/share/emacs/23.2.91/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x
/usr/local/share/emacs/23.2.91/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik
/usr/local/share/emacs/23.2.91/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en
/usr/local/share/emacs/23.2.91/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp
/usr/local/share/emacs/23.2.91/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info
/usr/local/share/emacs/23.2.91/site-lisp/auctex/tex-fptex hides /usr/share/emacs/site-lisp/auctex/tex-fptex
/usr/local/share/emacs/23.2.91/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font
/usr/local/share/emacs/23.2.91/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex
/usr/local/share/emacs/23.2.91/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex
/usr/local/share/emacs/23.2.91/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar
/usr/local/share/emacs/23.2.91/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt
/usr/local/share/emacs/23.2.91/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex

Features:
(shadow sort mail-extr message sendmail ecomplete rfc822 mml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1
hex-util hashcash mail-utils emacsbug preview prv-emacs byte-opt
warnings tex-buf noutline outline font-latex bytecomp byte-compile latex
tex-style tex nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid
rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn
nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc
xmltok sgml-mode conf-mode newcomment make-mode vc-git cperl-mode
longlines face-remap filladapt flyspell auto-dictionary-autoloads
dictionary-autoloads js2-mode-autoloads package reporter completing-help
ff-paths uniquify paren savehist minibuf-eldef iswitchb icomplete
autorevert time cus-start cus-load desktop server change-mode advice
help-fns advice-preload php-mode derived etags cc-langs cl cl-19 cc-mode
cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
speedbar sb-image ezimage dframe easymenu assoc lua-mode regexp-opt
comint ring whitespace etags-update smart-quotes edmacro kmacro ispell
ffap muse-autoloads emacs-goodies-el emacs-goodies-custom
emacs-goodies-loaddefs easy-mmode devhelp preview-latex tex-site
auto-loads tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win
x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register
page menu-bar rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)

-- 
http://rrt.sc3d.org/





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

* bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file
  2011-01-03 23:14 bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file Reuben Thomas
@ 2011-01-07 13:14 ` Agustin Martin
  2011-01-07 14:30   ` Reuben Thomas
  2011-02-11 17:00   ` Agustin Martin
  2012-01-01 21:42 ` bug#7781: ispell problem with hunspell and UTF-8 file (and other, related hunspell problems) Richard Wordingham
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 35+ messages in thread
From: Agustin Martin @ 2011-01-07 13:14 UTC (permalink / raw)
  To: Reuben Thomas; +Cc: 7781

2011/1/4 Reuben Thomas <rrt@sc3d.org>:
> With the following text, and using emacs -Q, I get the errors you can
> see in the messages log below when using hunspell to spell-check a UTF-8
> buffer with some extended characters in it.
>
> I did test this with emacs -Q, but the current session, in which I
> reproduced the problem and am now composing this bug report, was not
> started with -Q (this is so submitting the bug report works properly!).
>
> I am running a freshly bzr-pulled build of the emacs-23 branch.

Hi, Reuben,

I can also reproduce this with emacs23.2. I could locate problems in
two lines, after splititng original lines,

-- Cut here -- 8< ----- minimal.txt: utf-8
of out-of-copyright works. The Kindle may be a loss leader, but at £109
it’s still not cheap. Feedbooks, rather than integrating easily into
-- Cut here -- 8< ----- End of minimal.txt

In first line, currency seems to give some conversion errors when
iso-8859-1 is used, when that should have ignored by hunspell. I get
tons of

UTF-8 encoding error. Missing continuation byte in 0. character position:

for that line when using

$ cat minimal.txt | hunspell -d en_US -a -i iso-8859-1

In second line unusual apostrophe seems to cause some confusion to
hunspell when utf8 is used. Comparing what aspell and hunspell give in
similar text I get

$ cat minimal.txt | aspell --encoding=utf-8 -d en_US -a
& Feedbooks 6 22: Feed books, Feed-books, Feedback's, Feedbags, ...

$ cat minimal.txt | hunspell -d en_US -i utf-8 -a
& Feedbooks 8 24: Feed books, Feed-books, Feedback, Feedbags, ...

Do not worry about first number, is the number of suggestions. However
position in second number differ. Seems that hunspell is not
considering that apostrophe as a single (multibyte) char when
counting, but as three components

Looks to me an hunspell bug. I found no reference to this problem in
hunspell sf site, but noticed that Hunspell 1.2.14 was released
yesterday. Need to check if that has some related new.

-- 
Agustin





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

* bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file
  2011-01-07 13:14 ` Agustin Martin
@ 2011-01-07 14:30   ` Reuben Thomas
  2011-02-11 17:00   ` Agustin Martin
  1 sibling, 0 replies; 35+ messages in thread
From: Reuben Thomas @ 2011-01-07 14:30 UTC (permalink / raw)
  To: Agustin Martin; +Cc: 7781

Thanks very much for your investigation, Agustin.

I tried hunspell 1.2.14 and got exactly the same error.





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

* bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file
  2011-01-07 13:14 ` Agustin Martin
  2011-01-07 14:30   ` Reuben Thomas
@ 2011-02-11 17:00   ` Agustin Martin
  2014-10-16 13:37     ` Agustin Martin
  1 sibling, 1 reply; 35+ messages in thread
From: Agustin Martin @ 2011-02-11 17:00 UTC (permalink / raw)
  To: Reuben Thomas; +Cc: 7781

forwarded 7781 https://sourceforge.net/tracker/?func=detail&aid=3178449&group_id=143754&atid=756395
thanks

2011/1/7 Agustin Martin <agustin.martin@hispalinux.es>:
> 2011/1/4 Reuben Thomas <rrt@sc3d.org>:
>> With the following text, and using emacs -Q, I get the errors you can
>> see in the messages log below when using hunspell to spell-check a UTF-8
>> buffer with some extended characters in it.

> Do not worry about first number, is the number of suggestions. However
> position in second number differ. Seems that hunspell is not
> considering that apostrophe as a single (multibyte) char when
> counting, but as three components
>
> Looks to me an hunspell bug. I found no reference to this problem in
> hunspell sf site, but noticed that Hunspell 1.2.14 was released
> yesterday. Need to check if that has some related new.

Opened an hunspell  bug report for bad count problem

https://sourceforge.net/tracker/?func=detail&aid=3178449&group_id=143754&atid=756395

Seems I no longer see the other problem.

Cheers,

-- 
Agustin





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

* bug#7781: ispell problem with hunspell and UTF-8 file (and other, related hunspell problems)
  2011-01-03 23:14 bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file Reuben Thomas
  2011-01-07 13:14 ` Agustin Martin
@ 2012-01-01 21:42 ` Richard Wordingham
  2013-04-13 19:12 ` bug#7781: [PATCH] Fix ispell problem with hunspell and UTF-8 file Николай Сущенко
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 35+ messages in thread
From: Richard Wordingham @ 2012-01-01 21:42 UTC (permalink / raw)
  To: 7781

Those who want to compile a bug fix in Hunspell for themselves can find
fixes (based on Hunspell 1.2.8 and Emacs V23) to spell check
word-separated Thai in UTF-8 from Emacs at
http://homepage.ntlworld.com/richard.wordingham/thai/hunspell-1.2.8-jrw1.1.zip
- the byte v. character count problem was just one of those met and resolved. The full list is:

On Hunspell:

Bad UTF-8 char count in pipe mode - ID: 3178449
No Encoding of Word for Suggestions in Piped Mode
(https://sourceforge.net/tracker/?func=detail&aid=3468022&group_id=143754&atid=756395)
Multidictionary guesses dictionary for suggestions
(https://sourceforge.net/tracker/?func=detail&aid=3468039&group_id=143754&atid=756395)
Hunspell 1.2.8 Groups Thai TIS-620 Chars in Lower/Upper Case Pairs
(https://bugs.launchpad.net/ubuntu/+source/hunspell/+bug/910452) (fixed
in Release 1.2.14)

On the Thai dictionary:

th_TH Affix File Inadequate for Hunspell
(https://bugs.launchpad.net/ubuntu/+source/openoffice.org-dictionaries/+bug/910447)

There is also a problem with the size of the window holding correction
in Thai (probably depending on the choice of font); the addition of
(fit-window-to-buffer) at the appropriate point in ispell.el (as in the
zip file) fixes that.

Richard.





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

* bug#7781: [PATCH] Fix ispell problem with hunspell and UTF-8 file
  2011-01-03 23:14 bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file Reuben Thomas
  2011-01-07 13:14 ` Agustin Martin
  2012-01-01 21:42 ` bug#7781: ispell problem with hunspell and UTF-8 file (and other, related hunspell problems) Richard Wordingham
@ 2013-04-13 19:12 ` Николай Сущенко
  2013-04-14  5:42   ` Eli Zaretskii
  2014-04-27 21:30 ` bug#7781: hunspell and latex-mode Peter Münster
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 35+ messages in thread
From: Николай Сущенко @ 2013-04-13 19:12 UTC (permalink / raw)
  To: 7781

[-- Attachment #1: Type: text/plain, Size: 400 bytes --]

As soon as I can see, the hunspell team haven't fixed the bug in more 
then 2 years. Maybe for them it is not a bug but a feature.

The problem is that hunspell reports byte-position instead of 
char-position with multi-byte character input, while Emacs waits for 
char-position. With the patch attached I propose to make conversation in 
the ispell-parse-output function.

Thanks,
Nikolay Suschenko

[-- Attachment #2: ispell.el.patch --]
[-- Type: text/plain, Size: 794 bytes --]

--- a/lisp/textmodes/ispell.el	2013-02-22 13:09:26.000000000 +0400
+++ b/lisp/textmodes/ispell.el	2013-04-13 22:46:35.209323584 +0400
@@ -2597,7 +2597,11 @@
 	  (setq count 0)		; no misses for type #
 	(setq count (string-to-number output) ; get number of misses.
 	      output (substring output (1+ (string-match " " output 1)))))
-      (setq offset (string-to-number output))
+      ; hunspell reports byte-position instead of char-position
+      ; with multi-byte character input
+      (setq offset (if ispell-really-hunspell
+		       (byte-to-position (string-to-number output))
+		     (string-to-number output)))
       (setq output (if (eq type ?#)     ; No miss or guess list.
                        nil
                      (substring output (1+ (string-match " " output 1)))))

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

* bug#7781: [PATCH] Fix ispell problem with hunspell and UTF-8 file
  2013-04-13 19:12 ` bug#7781: [PATCH] Fix ispell problem with hunspell and UTF-8 file Николай Сущенко
@ 2013-04-14  5:42   ` Eli Zaretskii
  2013-04-14  6:33     ` Николай Сущенко
  0 siblings, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2013-04-14  5:42 UTC (permalink / raw)
  To: Николай Сущенко
  Cc: 7781

> Date: Sat, 13 Apr 2013 23:12:38 +0400
> From: Николай Сущенко <sckol@yandex.ru>
> 
> As soon as I can see, the hunspell team haven't fixed the bug in more 
> then 2 years. Maybe for them it is not a bug but a feature.

Hunspell bug resolution process could use some speedup.

> The problem is that hunspell reports byte-position instead of 
> char-position with multi-byte character input, while Emacs waits for 
> char-position. With the patch attached I propose to make conversation in 
> the ispell-parse-output function.

Sorry, no.  I tried that initially, but this work-around has problems
(don't remember the details, though).

It is much better to rebuild Hunspell with this bug fixed.  I can give
you a patch for that if you need it (I think there's a patch in the
bug database as well).  I fixed my hunspell long ago, and never looked
back.  Or ask your distribution's maintainers to release a fixed
hunspell distro.

Thanks.






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

* bug#7781: [PATCH] Fix ispell problem with hunspell and UTF-8 file
  2013-04-14  5:42   ` Eli Zaretskii
@ 2013-04-14  6:33     ` Николай Сущенко
  2013-04-14  7:08       ` Eli Zaretskii
  0 siblings, 1 reply; 35+ messages in thread
From: Николай Сущенко @ 2013-04-14  6:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 7781

Hi, Eli

Please send me this patch, I'll ask the hunspell developers to include it.
Could you also recall which concrete problems produces this workaround? 
For me it works fine, but I haven't tested it in different languages and 
encodings. If it is some problems, I could try to fix it, but as for 
now, Emacs don't work with hunspell+utf-8 at all, at the minimum in 
Slackware and Arch.





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

* bug#7781: [PATCH] Fix ispell problem with hunspell and UTF-8 file
  2013-04-14  6:33     ` Николай Сущенко
@ 2013-04-14  7:08       ` Eli Zaretskii
  2013-04-20 18:43         ` Николай Сущенко
  0 siblings, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2013-04-14  7:08 UTC (permalink / raw)
  To: Николай Сущенко
  Cc: 7781

> Date: Sun, 14 Apr 2013 10:33:39 +0400
> From: Николай Сущенко
>  <sckol@yandex.ru>
> CC: 7781@debbugs.gnu.org
> 
> Please send me this patch, I'll ask the hunspell developers to include it.

Attached.  This is a small part of a much larger patch, most of it for
Windows-specific problems.  If you have problems compiling the patched
hunspell, let me know: it could be that I omitted some hunk that is
needed for this part.

> Could you also recall which concrete problems produces this workaround? 
> For me it works fine, but I haven't tested it in different languages and 
> encodings.

One problem is that you assume the encoding of the communications with
hunspell is UTF-8, and thus matches the internal representation of
text in Emacs buffers and strings (only then will byte-to-position
give correct results).  But that assumption is false: hunspell
supports any encoding that it can convert to/from UTF-8 (it uses
libiconv internally).  The "usual" choice of the encoding is the one
used by the dictionary.  Not every dictionary out there is in UTF-8.

> If it is some problems, I could try to fix it

I don't think you can fix this on the Emacs side, because Emacs cannot
easily and/or quickly convert between bytes and characters in an
arbitrary multibyte encoding.

When I discovered this problem, I also tried fixing it on the Emacs
side first, but then I realized that this kind of solution has too
many problems, and instead fixed it in hunspell.

--- src/tools/hunspell.cxx~0	2011-01-21 19:01:29.000000000 +0200
+++ src/tools/hunspell.cxx	2013-02-07 10:11:54.443610900 +0200
@@ -710,13 +748,22 @@ if (pos >= 0) {
 			fflush(stdout);
 		} else {
 			char ** wlst = NULL;
-			int ns = pMS[d]->suggest(&wlst, token);
+			int byte_offset = parser->get_tokenpos() + pos;
+			int char_offset = 0;
+			if (strcmp(io_enc, "UTF-8") == 0) {
+				for (int i = 0; i < byte_offset; i++) {
+					if ((buf[i] & 0xc0) != 0x80)
+						char_offset++;
+				}
+			} else {
+				char_offset = byte_offset;
+			}
+			int ns = pMS[d]->suggest(&wlst, chenc(token, io_enc, dic_enc[d]));
 			if (ns == 0) {
-		    		fprintf(stdout,"# %s %d", token,
-		    		    parser->get_tokenpos() + pos);
+		    		fprintf(stdout,"# %s %d", token, char_offset);
 			} else {
 				fprintf(stdout,"& %s %d %d: ", token, ns,
-				    parser->get_tokenpos() + pos);
+					char_offset);
 				fprintf(stdout,"%s", chenc(wlst[0], dic_enc[d], io_enc));
 			}
 			for (int j = 1; j < ns; j++) {
@@ -745,13 +792,23 @@ if (pos >= 0) {
 			if (root) free(root);
 		} else {
 			char ** wlst = NULL;
+			int byte_offset = parser->get_tokenpos() + pos;
+			int char_offset = 0;
+			if (strcmp(io_enc, "UTF-8") == 0) {
+				for (int i = 0; i < byte_offset; i++) {
+					if ((buf[i] & 0xc0) != 0x80)
+						char_offset++;
+				}
+			} else {
+				char_offset = byte_offset;
+			}
 			int ns = pMS[d]->suggest(&wlst, chenc(token, io_enc, dic_enc[d]));
 			if (ns == 0) {
 		    		fprintf(stdout,"# %s %d", chenc(token, io_enc, ui_enc),
-		    		    parser->get_tokenpos() + pos);
+		    		    char_offset);
 			} else {
 				fprintf(stdout,"& %s %d %d: ", chenc(token, io_enc, ui_enc), ns,
-				    parser->get_tokenpos() + pos);
+				    char_offset);
 				fprintf(stdout,"%s", chenc(wlst[0], dic_enc[d], ui_enc));
 			}
 			for (int j = 1; j < ns; j++) {






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

* bug#7781: [PATCH] Fix ispell problem with hunspell and UTF-8 file
  2013-04-14  7:08       ` Eli Zaretskii
@ 2013-04-20 18:43         ` Николай Сущенко
  0 siblings, 0 replies; 35+ messages in thread
From: Николай Сущенко @ 2013-04-20 18:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 7781

Thank you, for me this patch worked well. However, somebody have already 
proposed another patch:
https://sourceforge.net/tracker/?func=detail&aid=3610147&group_id=143754&atid=756397





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

* bug#7781: hunspell and latex-mode
  2011-01-03 23:14 bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file Reuben Thomas
                   ` (2 preceding siblings ...)
  2013-04-13 19:12 ` bug#7781: [PATCH] Fix ispell problem with hunspell and UTF-8 file Николай Сущенко
@ 2014-04-27 21:30 ` Peter Münster
  2014-04-28 15:37   ` Eli Zaretskii
  2014-09-25  9:54 ` bug#7781: Bug still present in hunspell 1.3.3; Eli's patch still works Reuben Thomas
  2020-08-28 12:00 ` bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file Stefan Kangas
  5 siblings, 1 reply; 35+ messages in thread
From: Peter Münster @ 2014-04-27 21:30 UTC (permalink / raw)
  To: 7781

Hi,

I'm using a patched hunspell
(http://sourceforge.net/p/hunspell/patches/57/) and it works well with
text-mode and message-mode. But unfortunately it does not work with
context-mode or latex-mode.

Example:

--8<---------------cut here---------------start------------->8---
\documentclass{article}
\begin{document}
bla
\end{document}
--8<---------------cut here---------------end--------------->8---

Running ispell fails with this error:

ispell-process-line: Ispell misalignment: word `bla' point 41; probably incompatible versions

Do you know a solution?

I'm using bzr emacs and git auctex.

TIA for any help,
-- 
           Peter





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

* bug#7781: hunspell and latex-mode
  2014-04-27 21:30 ` bug#7781: hunspell and latex-mode Peter Münster
@ 2014-04-28 15:37   ` Eli Zaretskii
  2014-04-28 16:18     ` Peter Münster
  0 siblings, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2014-04-28 15:37 UTC (permalink / raw)
  To: Peter Münster; +Cc: 7781

> From: Peter Münster <pmlists@free.fr>
> Date: Sun, 27 Apr 2014 23:30:25 +0200
> 
> I'm using a patched hunspell
> (http://sourceforge.net/p/hunspell/patches/57/) and it works well with
> text-mode and message-mode. But unfortunately it does not work with
> context-mode or latex-mode.
> 
> Example:
> 
> --8<---------------cut here---------------start------------->8---
> \documentclass{article}
> \begin{document}
> bla
> \end{document}
> --8<---------------cut here---------------end--------------->8---
> 
> Running ispell fails with this error:
> 
> ispell-process-line: Ispell misalignment: word `bla' point 41; probably incompatible versions

I cannot reproduce this.  If I start "emacs -Q" and try spell-checking
your example (with Hunspell being the speller), it works just fine for
me: I get suggestions to replace "bla".  Same thing if I load AUCTeX
into "emacs -Q" (does AUCTeX even change anything about
spell-checking?).

Does this work for you in "emacs -Q"?  If so, I suggest to review your
customizations to look for those which somehow cause this.

If "emacs -Q" doesn't work either, please provide a detailed
reproduction recipe starting from "emacs -Q".





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

* bug#7781: hunspell and latex-mode
  2014-04-28 15:37   ` Eli Zaretskii
@ 2014-04-28 16:18     ` Peter Münster
  2014-04-28 16:48       ` Eli Zaretskii
  2014-04-29 10:03       ` Agustin Martin
  0 siblings, 2 replies; 35+ messages in thread
From: Peter Münster @ 2014-04-28 16:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 7781

On Mon, Apr 28 2014, Eli Zaretskii wrote:

> I cannot reproduce this.  If I start "emacs -Q" and try spell-checking
> your example (with Hunspell being the speller), it works just fine for
> me: I get suggestions to replace "bla".  Same thing if I load AUCTeX
> into "emacs -Q" (does AUCTeX even change anything about
> spell-checking?).

Hi Eli,

It's not AUCTeX, I've just tested with normal latex-mode.


> If "emacs -Q" doesn't work either, please provide a detailed
> reproduction recipe starting from "emacs -Q".

Here a reproduction recipe:

- create minimal latex file /tmp/test.tex
- start emacs:
  LANG=C emacs -Q --eval '(setq ispell-program-name "hunspell")' /tmp/test.tex
- M-x ispell

Here are more details about my system:

In GNU Emacs 24.4.50.2 (x86_64-suse-linux-gnu, GTK+ Version 3.10.4)
 of 2014-04-20 on micropit
Repository revision: 116996 dancol@dancol.org-20140420144613-8e4t4swlxauwl4w7
Windowing system distributor `The X.Org Foundation', version 11.0.11403901
System Description:	openSUSE 13.1 (Bottle) (x86_64)

Configured using:
 `configure --without-toolkit-scroll-bars'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY LIBSELINUX LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB

Important settings:
  value of $LANG: C
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: nil

Major mode: LaTeX

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x i s p <tab> <return> M-x r e p o r t - e m <tab> 
<return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Starting new Ispell process hunspell with default dictionary...
Spell-checking test.tex using hunspell with default dictionary...done
ispell-process-line: Ispell misalignment: word `bla' point 41; probably incompatible versions

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mail-utils ispell tex-mode
compile shell pcomplete comint ansi-color ring latexenc time-date
tooltip electric uniquify 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)

Memory information:
((conses 16 87695 6922)
 (symbols 48 19137 0)
 (miscs 40 44 125)
 (strings 32 14709 4542)
 (string-bytes 1 418678)
 (vectors 16 10601)
 (vector-slots 8 389507 5806)
 (floats 8 67 64)
 (intervals 56 250 165)
 (buffers 960 13)
 (heap 1024 42866 735))

-- 
           Peter





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

* bug#7781: hunspell and latex-mode
  2014-04-28 16:18     ` Peter Münster
@ 2014-04-28 16:48       ` Eli Zaretskii
  2014-04-28 17:17         ` Peter Münster
  2014-04-29 10:03       ` Agustin Martin
  1 sibling, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2014-04-28 16:48 UTC (permalink / raw)
  To: Peter Münster; +Cc: 7781

> From: Peter Münster <pmlists@free.fr>
> Cc: 7781@debbugs.gnu.org
> Date: Mon, 28 Apr 2014 18:18:10 +0200
> 
> - create minimal latex file /tmp/test.tex
> - start emacs:
>   LANG=C emacs -Q --eval '(setq ispell-program-name "hunspell")' /tmp/test.tex
> - M-x ispell

Works fine for me, sorry.

Maybe your Hunspell is not patched enough.  Mine has much more patches
than the one you mentioned.  Most of them are Windows-specific or
related to encoding/decoding non-ASCII characters, something that
doesn't sound relevant for your use case.  But who knows? you might
take a look at the file DIFFS in this archive, where you will find all
the changes I made to Hunspell:

  http://sourceforge.net/projects/ezwinports/files/hunspell-1.3.2-3-w32-src.zip/download

Or maybe wait for someone on Unix to try reproducing your recipe.

One other idea is to try spell-checking your sample file outside of
Emacs, maybe you will see something that will give some ideas.

Finally, are you sure the 'hunspell' executable Emacs finds on PATH is
indeed the one you intend?  (Try putting a full absolute file name
into ispell-program-name.)





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

* bug#7781: hunspell and latex-mode
  2014-04-28 16:48       ` Eli Zaretskii
@ 2014-04-28 17:17         ` Peter Münster
  2014-04-28 17:32           ` Eli Zaretskii
  0 siblings, 1 reply; 35+ messages in thread
From: Peter Münster @ 2014-04-28 17:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 7781

On Mon, Apr 28 2014, Eli Zaretskii wrote:

> Maybe your Hunspell is not patched enough.

Perhaps.


> Mine has much more patches than the one you mentioned. Most of them
> are Windows-specific or related to encoding/decoding non-ASCII
> characters, something that doesn't sound relevant for your use case.
> But who knows? you might take a look at the file DIFFS in this
> archive, where you will find all the changes I made to Hunspell:
>
>   http://sourceforge.net/projects/ezwinports/files/hunspell-1.3.2-3-w32-src.zip/download

Indeed. I'll take a look when I have some more time.


> Or maybe wait for someone on Unix to try reproducing your recipe.

Yes, let's see.


> One other idea is to try spell-checking your sample file outside of
> Emacs, maybe you will see something that will give some ideas.

No. Here is the result:

--8<---------------cut here---------------start------------->8---
$ hunspell -a -d en_US -i UTF-8 /tmp/test.tex
@(#) International Ispell Version 3.2.06 (but really Hunspell 1.3.2)
& documentclass 8 1: document class, document-class, documentations, documentation, documents, documentary, underclassmen, underclassman
*

*
*

& bla 15 0: alb, bl, la, blat, bola, blag, blah, blab, lab, baa, bra, boa, Ila, Ala, Ola

*
*
--8<---------------cut here---------------end--------------->8---


> Finally, are you sure the 'hunspell' executable Emacs finds on PATH is
> indeed the one you intend?

Yes. And after switching to "M-x text-mode", there is no more problem.

-- 
           Peter





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

* bug#7781: hunspell and latex-mode
  2014-04-28 17:17         ` Peter Münster
@ 2014-04-28 17:32           ` Eli Zaretskii
  2014-04-28 18:27             ` Peter Münster
  0 siblings, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2014-04-28 17:32 UTC (permalink / raw)
  To: Peter Münster; +Cc: 7781

> From: Peter Münster <pmlists@free.fr>
> Cc: 7781@debbugs.gnu.org
> Date: Mon, 28 Apr 2014 19:17:36 +0200
> 
> after switching to "M-x text-mode", there is no more problem.

Maybe you should activate the debugging code in ispell.el and see what
is being submitted to hunspell and what it returns.





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

* bug#7781: hunspell and latex-mode
  2014-04-28 17:32           ` Eli Zaretskii
@ 2014-04-28 18:27             ` Peter Münster
  0 siblings, 0 replies; 35+ messages in thread
From: Peter Münster @ 2014-04-28 18:27 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 7781

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

On Mon, Apr 28 2014, Eli Zaretskii wrote:

>> after switching to "M-x text-mode", there is no more problem.
>
> Maybe you should activate the debugging code in ispell.el and see what
> is being submitted to hunspell and what it returns.

Please find attached 2 debug-outputs, one with latex-mode and one with
text-mode. Both are created with `ispell-buffer-with-debug'.

Do you see, what is going on there?

-- 
           Peter

[-- Attachment #2: ispell-debug-latex.txt --]
[-- Type: text/plain, Size: 4493 bytes --]

-- ispell-fhd: Skipping entry: SEARCH PATH:
-- ispell-fhd: Skipping entry: .::/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/home/peter/.openoffice.org/3/user/wordbook:.openoffice.org2/user/wordbook:.openoffice.org2.0/user/wordbook:Library/Spelling:/opt/openoffice.org/basis3.0/share/dict/ooo:/usr/lib/openoffice.org/basis3.0/share/dict/ooo:/opt/openoffice.org2.4/share/dict/ooo:/usr/lib/openoffice.org2.4/share/dict/ooo:/opt/openoffice.org2.3/share/dict/ooo:/usr/lib/openoffice.org2.3/share/dict/ooo:/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/openoffice.org2.2/share/dict/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr/lib/openoffice.org2.1/share/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo:/usr/lib/openoffice.org2.0/share/dict/ooo
-- ispell-fhd: Skipping entry: AVAILABLE DICTIONARIES (path is not mandatory for -d option):
++ ispell-fhd: dict-entry:/usr/share/myspell/fr_FR name:fr_FR basename:fr_FR affix-file:/usr/share/myspell/fr_FR.aff
++ ispell-fhd: dict-entry:/usr/share/myspell/en_US name:en_US basename:en_US affix-file:/usr/share/myspell/en_US.aff
++ ispell-fhd: dict-entry:/usr/share/myspell/es_ES name:es_ES basename:es_ES affix-file:/usr/share/myspell/es_ES.aff
++ ispell-fhd: dict-entry:/usr/share/myspell/en_GB name:en_GB basename:en_GB affix-file:/usr/share/myspell/en_GB.aff
++ ispell-fhd: dict-entry:/usr/share/myspell/de_DE name:de_DE basename:de_DE affix-file:/usr/share/myspell/de_DE.aff
-- ispell-fhd: Skipping entry: LOADED DICTIONARY:
-- ispell-fhd: Skipping entry: /usr/share/myspell/en_US.dic
-- ispell-fhd: Skipping entry: Hunspell 1.3.2
++ ispell-fhd: Adding alias german8 -> /usr/share/myspell/de_DE.aff.
++ ispell-fhd: Adding alias german -> /usr/share/myspell/de_DE.aff.
++ ispell-fhd: Adding alias francais -> /usr/share/myspell/fr_FR.aff.
++ ispell-fhd: Adding alias english -> /usr/share/myspell/en_US.aff.
++ ispell-fhd: Adding alias deutsch8 -> /usr/share/myspell/de_DE.aff.
++ ispell-fhd: Adding alias deutsch -> /usr/share/myspell/de_DE.aff.
++ ispell-fhd: Adding alias castellano8 -> /usr/share/myspell/es_ES.aff.
++ ispell-fhd: Adding alias castellano -> /usr/share/myspell/es_ES.aff.
++ ispell-fhd: Adding alias british -> /usr/share/myspell/en_GB.aff.
++ ispell-fhd: Adding alias american -> /usr/share/myspell/en_US.aff.
ispell-region: (ispell-skip-region-list):
((\\addcontentsline ispell-tex-arg-end 2) (\\add\(tocontents\|vspace\) ispell-tex-arg-end) (\\\([aA]lph\|arabic\) ispell-tex-arg-end) (\\bibliographystyle ispell-tex-arg-end) (\\makebox ispell-tex-arg-end 0) (\\e?psfig ispell-tex-arg-end) (\\document\(class\|style\) . \\begin[ 	
]*{[ 	
]*document[ 	
]*}) (\(figure\|table\)\*? ispell-tex-arg-end 0) (list ispell-tex-arg-end 2) (program . \\end[ 	
]*{[ 	
]*program[ 	
]*}) (verbatim\*? . \\end[ 	
]*{[ 	
]*verbatim\*?[ 	
]*}) (ispell-words-keyword forward-line) (ispell-dictionary-keyword forward-line) (ispell-pdict-keyword forward-line) (ispell-parsing-keyword forward-line) (^---*BEGIN PGP [A-Z ]*--* . ^---*END PGP [A-Z ]*--*) (^begin [0-9][0-9][0-9] [^ 	]+$ . 
end
) (^%!PS-Adobe-[123].0 . 
%%EOF
) (^---* \(Start of \)?[Ff]orwarded [Mm]essage . ^---* End of [Ff]orwarded [Mm]essage) (\(--+\|_+\|\(/\w\|\(\(\w\|[-_]\)+[.:@]\)\)\(\w\|[-_]\)*\([.:/@]+\(\w\|[-_~=?&]\)+\)+\)))
ispell-region: (ispell-begin-skip-region-regexp):
\\addcontentsline\|\\add\(tocontents\|vspace\)\|\\\([aA]lph\|arabic\)\|\\bibliographystyle\|\\makebox\|\\e?psfig\|\\document\(class\|style\)\|\\begin[ 	
]*{[ 	
]*\(figure\|table\)\*?[ 	
]*}\|\\begin[ 	
]*{[ 	
]*list[ 	
]*}\|\\begin[ 	
]*{[ 	
]*program[ 	
]*}\|\\begin[ 	
]*{[ 	
]*verbatim\*?[ 	
]*}\|LocalWords: \|Local IspellDict: \|Local IspellPersDict: \|Local IspellParsing: \|^---*BEGIN PGP [A-Z ]*--*\|^begin [0-9][0-9][0-9] [^ 	]+$\|^%!PS-Adobe-[123].0\|^---* \(Start of \)?[Ff]orwarded [Mm]essage\|\(--+\|_+\|\(/\w\|\(\(\w\|[-_]\)+[.:@]\)\)\(\w\|[-_]\)*\([.:/@]+\(\w\|[-_~=?&]\)+\)+\)
ispell-region: Search for first region to skip after (ispell-begin-skip-region-regexp)
ispell-region: First skip: \documentclass at (pos,line,column): (1,1,0).
ispell-region: Continue spell-checking with hunspell and default dictionary...
ispell-region: string pos (41->41), eol: 45, [in-comment]: [nil], [add-comment]: [nil], [string]: [nil]
ispell-region: string pos (42->45), eol: 45, [in-comment]: [nil], [add-comment]: [nil], [string]: [^bla
]
ispell-process-line: Ispell misalignment error:
  [Word from ispell pipe]: [bla], actual (point,line,column): (41,2,16)

[-- Attachment #3: ispell-debug-text.txt --]
[-- Type: text/plain, Size: 4198 bytes --]

-- ispell-fhd: Skipping entry: SEARCH PATH:
-- ispell-fhd: Skipping entry: .::/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/home/peter/.openoffice.org/3/user/wordbook:.openoffice.org2/user/wordbook:.openoffice.org2.0/user/wordbook:Library/Spelling:/opt/openoffice.org/basis3.0/share/dict/ooo:/usr/lib/openoffice.org/basis3.0/share/dict/ooo:/opt/openoffice.org2.4/share/dict/ooo:/usr/lib/openoffice.org2.4/share/dict/ooo:/opt/openoffice.org2.3/share/dict/ooo:/usr/lib/openoffice.org2.3/share/dict/ooo:/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/openoffice.org2.2/share/dict/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr/lib/openoffice.org2.1/share/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo:/usr/lib/openoffice.org2.0/share/dict/ooo
-- ispell-fhd: Skipping entry: AVAILABLE DICTIONARIES (path is not mandatory for -d option):
++ ispell-fhd: dict-entry:/usr/share/myspell/fr_FR name:fr_FR basename:fr_FR affix-file:/usr/share/myspell/fr_FR.aff
++ ispell-fhd: dict-entry:/usr/share/myspell/en_US name:en_US basename:en_US affix-file:/usr/share/myspell/en_US.aff
++ ispell-fhd: dict-entry:/usr/share/myspell/es_ES name:es_ES basename:es_ES affix-file:/usr/share/myspell/es_ES.aff
++ ispell-fhd: dict-entry:/usr/share/myspell/en_GB name:en_GB basename:en_GB affix-file:/usr/share/myspell/en_GB.aff
++ ispell-fhd: dict-entry:/usr/share/myspell/de_DE name:de_DE basename:de_DE affix-file:/usr/share/myspell/de_DE.aff
-- ispell-fhd: Skipping entry: LOADED DICTIONARY:
-- ispell-fhd: Skipping entry: /usr/share/myspell/en_US.dic
-- ispell-fhd: Skipping entry: Hunspell 1.3.2
++ ispell-fhd: Adding alias german8 -> /usr/share/myspell/de_DE.aff.
++ ispell-fhd: Adding alias german -> /usr/share/myspell/de_DE.aff.
++ ispell-fhd: Adding alias francais -> /usr/share/myspell/fr_FR.aff.
++ ispell-fhd: Adding alias english -> /usr/share/myspell/en_US.aff.
++ ispell-fhd: Adding alias deutsch8 -> /usr/share/myspell/de_DE.aff.
++ ispell-fhd: Adding alias deutsch -> /usr/share/myspell/de_DE.aff.
++ ispell-fhd: Adding alias castellano8 -> /usr/share/myspell/es_ES.aff.
++ ispell-fhd: Adding alias castellano -> /usr/share/myspell/es_ES.aff.
++ ispell-fhd: Adding alias british -> /usr/share/myspell/en_GB.aff.
++ ispell-fhd: Adding alias american -> /usr/share/myspell/en_US.aff.
ispell-region: (ispell-skip-region-list):
((ispell-words-keyword forward-line) (ispell-dictionary-keyword forward-line) (ispell-pdict-keyword forward-line) (ispell-parsing-keyword forward-line) (^---*BEGIN PGP [A-Z ]*--* . ^---*END PGP [A-Z ]*--*) (^begin [0-9][0-9][0-9] [^ 	]+$ . 
end
) (^%!PS-Adobe-[123].0 . 
%%EOF
) (^---* \(Start of \)?[Ff]orwarded [Mm]essage . ^---* End of [Ff]orwarded [Mm]essage) (\(--+\|_+\|\(/\w\|\(\(\w\|[-_]\)+[.:@]\)\)\(\w\|[-_]\)*\([.:/@]+\(\w\|[-_~=?&]\)+\)+\)))
ispell-region: (ispell-begin-skip-region-regexp):
LocalWords: \|Local IspellDict: \|Local IspellPersDict: \|Local IspellParsing: \|^---*BEGIN PGP [A-Z ]*--*\|^begin [0-9][0-9][0-9] [^ 	]+$\|^%!PS-Adobe-[123].0\|^---* \(Start of \)?[Ff]orwarded [Mm]essage\|\(--+\|_+\|\(/\w\|\(\(\w\|[-_]\)+[.:@]\)\)\(\w\|[-_]\)*\([.:/@]+\(\w\|[-_~=?&]\)+\)+\)
ispell-region: Search for first region to skip after (ispell-begin-skip-region-regexp)
ispell-region: Continue spell-checking with hunspell and default dictionary...
ispell-region: string pos (1->24), eol: 24, [in-comment]: [nil], [add-comment]: [nil], [string]: [^\documentclass{article}
]
ispell-region: string pos (24->24), eol: 41, [in-comment]: [nil], [add-comment]: [nil], [string]: [nil]
ispell-region: string pos (25->41), eol: 41, [in-comment]: [nil], [add-comment]: [nil], [string]: [^\begin{document}
]
ispell-region: string pos (41->41), eol: 45, [in-comment]: [nil], [add-comment]: [nil], [string]: [nil]
ispell-region: string pos (42->45), eol: 45, [in-comment]: [nil], [add-comment]: [nil], [string]: [^bla
]
ispell-region: string pos (45->45), eol: 60, [in-comment]: [nil], [add-comment]: [nil], [string]: [nil]
ispell-region: string pos (46->60), eol: 60, [in-comment]: [nil], [add-comment]: [nil], [string]: [^\end{document}
]
ispell-region: string pos (60->60), eol: 61, [in-comment]: [nil], [add-comment]: [nil], [string]: [nil]

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

* bug#7781: hunspell and latex-mode
  2014-04-28 16:18     ` Peter Münster
  2014-04-28 16:48       ` Eli Zaretskii
@ 2014-04-29 10:03       ` Agustin Martin
  2014-04-29 10:13         ` Peter Münster
  2014-04-29 10:20         ` Peter Münster
  1 sibling, 2 replies; 35+ messages in thread
From: Agustin Martin @ 2014-04-29 10:03 UTC (permalink / raw)
  To: Peter Münster, 7781

On Mon, Apr 28, 2014 at 06:18:10PM +0200, Peter Münster wrote:
> On Mon, Apr 28 2014, Eli Zaretskii wrote:
> 
> > I cannot reproduce this.  If I start "emacs -Q" and try spell-checking
> > your example (with Hunspell being the speller), it works just fine for
> > me: I get suggestions to replace "bla".  Same thing if I load AUCTeX
> > into "emacs -Q" (does AUCTeX even change anything about
> > spell-checking?).
> 
> Hi Eli,
> 
> It's not AUCTeX, I've just tested with normal latex-mode.
> 
> 
> > If "emacs -Q" doesn't work either, please provide a detailed
> > reproduction recipe starting from "emacs -Q".
> 
> Here a reproduction recipe:
> 
> - create minimal latex file /tmp/test.tex
> - start emacs:
>   LANG=C emacs -Q --eval '(setq ispell-program-name "hunspell")' /tmp/test.tex
> - M-x ispell
> 
> Here are more details about my system:
> 
> In GNU Emacs 24.4.50.2 (x86_64-suse-linux-gnu, GTK+ Version 3.10.4)
>  of 2014-04-20 on micropit

Cannot reproduce it here with emacs-snapshot 24.3.50.1 in Debian. What does
'ps -aux' show for hunspell call when run in xterm? 

-- 
Agustin





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

* bug#7781: hunspell and latex-mode
  2014-04-29 10:03       ` Agustin Martin
@ 2014-04-29 10:13         ` Peter Münster
  2014-04-29 10:21           ` Agustin Martin
  2014-04-29 10:20         ` Peter Münster
  1 sibling, 1 reply; 35+ messages in thread
From: Peter Münster @ 2014-04-29 10:13 UTC (permalink / raw)
  To: Agustin Martin; +Cc: 7781

On Tue, Apr 29 2014, Agustin Martin wrote:

> Cannot reproduce it here with emacs-snapshot 24.3.50.1 in Debian. What does
> 'ps -aux' show for hunspell call when run in xterm? 

hunspell -a -d en_US -i UTF-8

-- 
           Peter





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

* bug#7781: hunspell and latex-mode
  2014-04-29 10:03       ` Agustin Martin
  2014-04-29 10:13         ` Peter Münster
@ 2014-04-29 10:20         ` Peter Münster
  2014-04-29 10:39           ` Agustin Martin
  1 sibling, 1 reply; 35+ messages in thread
From: Peter Münster @ 2014-04-29 10:20 UTC (permalink / raw)
  To: Agustin Martin; +Cc: 7781

On Tue, Apr 29 2014, Agustin Martin wrote:

> Cannot reproduce it here with emacs-snapshot 24.3.50.1 in Debian.

Could you please send the ispell-debug buffer, created with
`ispell-buffer-with-debug'? Then we could compare it with mine. There
are perhaps differences.

-- 
           Peter





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

* bug#7781: hunspell and latex-mode
  2014-04-29 10:13         ` Peter Münster
@ 2014-04-29 10:21           ` Agustin Martin
  0 siblings, 0 replies; 35+ messages in thread
From: Agustin Martin @ 2014-04-29 10:21 UTC (permalink / raw)
  To: Peter Münster, 7781

On Tue, Apr 29, 2014 at 12:13:04PM +0200, Peter Münster wrote:
> On Tue, Apr 29 2014, Agustin Martin wrote:
> 
> > Cannot reproduce it here with emacs-snapshot 24.3.50.1 in Debian. What does
> > 'ps -aux' show for hunspell call when run in xterm? 
> 
> hunspell -a -d en_US -i UTF-8

That is what is expected. I am clueless about this.

-- 
Agustin





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

* bug#7781: hunspell and latex-mode
  2014-04-29 10:20         ` Peter Münster
@ 2014-04-29 10:39           ` Agustin Martin
  2014-04-29 11:54             ` Peter Münster
  0 siblings, 1 reply; 35+ messages in thread
From: Agustin Martin @ 2014-04-29 10:39 UTC (permalink / raw)
  To: Peter Münster, 7781

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

On Tue, Apr 29, 2014 at 12:20:50PM +0200, Peter Münster wrote:
> On Tue, Apr 29 2014, Agustin Martin wrote:
> 
> > Cannot reproduce it here with emacs-snapshot 24.3.50.1 in Debian.
> 
> Could you please send the ispell-debug buffer, created with
> `ispell-buffer-with-debug'? Then we could compare it with mine. There
> are perhaps differences.

Please find it attached. Apart from the misalignment problem the only
difference seems to be that I have lots of dicts installed and the
~/.openoffice.org/ path.

-- 
Agustin

[-- Attachment #2: ispell-debug-buffer-amd-7781.txt --]
[-- Type: text/plain, Size: 16455 bytes --]

-- ispell-fhd: Skipping entry: SEARCH PATH:
-- ispell-fhd: Skipping entry: .::/usr/share/hunspell:/usr/share/myspell:/usr/share/myspell/dicts:/Library/Spelling:/home/amd/.openoffice.org/3/user/wordbook:.openoffice.org2/user/wordbook:.openoffice.org2.0/user/wordbook:Library/Spelling:/opt/openoffice.org/basis3.0/share/dict/ooo:/usr/lib/openoffice.org/basis3.0/share/dict/ooo:/opt/openoffice.org2.4/share/dict/ooo:/usr/lib/openoffice.org2.4/share/dict/ooo:/opt/openoffice.org2.3/share/dict/ooo:/usr/lib/openoffice.org2.3/share/dict/ooo:/opt/openoffice.org2.2/share/dict/ooo:/usr/lib/openoffice.org2.2/share/dict/ooo:/opt/openoffice.org2.1/share/dict/ooo:/usr/lib/openoffice.org2.1/share/dict/ooo:/opt/openoffice.org2.0/share/dict/ooo:/usr/lib/openoffice.org2.0/share/dict/ooo
-- ispell-fhd: Skipping entry: AVAILABLE DICTIONARIES (path is not mandatory for -d option):
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_NI name:es_NI basename:es_NI affix-file:/usr/share/hunspell/es_NI.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_PA name:es_PA basename:es_PA affix-file:/usr/share/hunspell/es_PA.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_EG name:ar_EG basename:ar_EG affix-file:/usr/share/hunspell/ar_EG.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/eu_ES name:eu_ES basename:eu_ES affix-file:/usr/share/hunspell/eu_ES.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/cs name:cs basename:cs affix-file:/usr/share/hunspell/cs.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ca_ES-valencia name:ca_ES-valencia basename:ca_ES-valencia affix-file:/usr/share/hunspell/ca_ES-valencia.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/sk_SK name:sk_SK basename:sk_SK affix-file:/usr/share/hunspell/sk_SK.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_TN name:ar_TN basename:ar_TN affix-file:/usr/share/hunspell/ar_TN.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_YE name:ar_YE basename:ar_YE affix-file:/usr/share/hunspell/ar_YE.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_BO name:es_BO basename:es_BO affix-file:/usr/share/hunspell/es_BO.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/en_US name:en_US basename:en_US affix-file:/usr/share/hunspell/en_US.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_GT name:es_GT basename:es_GT affix-file:/usr/share/hunspell/es_GT.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/eo name:eo basename:eo affix-file:/usr/share/hunspell/eo.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_AR name:es_AR basename:es_AR affix-file:/usr/share/hunspell/es_AR.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_LB name:ar_LB basename:ar_LB affix-file:/usr/share/hunspell/ar_LB.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/sl name:sl basename:sl affix-file:/usr/share/hunspell/sl.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_BH name:ar_BH basename:ar_BH affix-file:/usr/share/hunspell/ar_BH.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/pt_PT name:pt_PT basename:pt_PT affix-file:/usr/share/hunspell/pt_PT.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/hr_HR name:hr_HR basename:hr_HR affix-file:/usr/share/hunspell/hr_HR.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/lt name:lt basename:lt affix-file:/usr/share/hunspell/lt.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/hu_HU_u8 name:hu_HU_u8 basename:hu_HU_u8 affix-file:/usr/share/hunspell/hu_HU_u8.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_CR name:es_CR basename:es_CR affix-file:/usr/share/hunspell/es_CR.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/sv name:sv basename:sv affix-file:/usr/share/hunspell/sv.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_DZ name:ar_DZ basename:ar_DZ affix-file:/usr/share/hunspell/ar_DZ.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/de_LI name:de_LI basename:de_LI affix-file:/usr/share/hunspell/de_LI.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_OM name:ar_OM basename:ar_OM affix-file:/usr/share/hunspell/ar_OM.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_JO name:ar_JO basename:ar_JO affix-file:/usr/share/hunspell/ar_JO.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ca_ES name:ca_ES basename:ca_ES affix-file:/usr/share/hunspell/ca_ES.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_HN name:es_HN basename:es_HN affix-file:/usr/share/hunspell/es_HN.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/et_EE name:et_EE basename:et_EE affix-file:/usr/share/hunspell/et_EE.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_ES name:es_ES basename:es_ES affix-file:/usr/share/hunspell/es_ES.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/de_DE name:de_DE basename:de_DE affix-file:/usr/share/hunspell/de_DE.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/gl_ES name:gl_ES basename:gl_ES affix-file:/usr/share/hunspell/gl_ES.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_PR name:es_PR basename:es_PR affix-file:/usr/share/hunspell/es_PR.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_SA name:ar_SA basename:ar_SA affix-file:/usr/share/hunspell/ar_SA.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_VE name:es_VE basename:es_VE affix-file:/usr/share/hunspell/es_VE.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/de_AT name:de_AT basename:de_AT affix-file:/usr/share/hunspell/de_AT.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/cs_CZ name:cs_CZ basename:cs_CZ affix-file:/usr/share/hunspell/cs_CZ.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/castellano name:castellano basename:castellano affix-file:/usr/share/hunspell/castellano.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ru_RU name:ru_RU basename:ru_RU affix-file:/usr/share/hunspell/ru_RU.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/en_GB name:en_GB basename:en_GB affix-file:/usr/share/hunspell/en_GB.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_PY name:es_PY basename:es_PY affix-file:/usr/share/hunspell/es_PY.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_UY name:es_UY basename:es_UY affix-file:/usr/share/hunspell/es_UY.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_CL name:es_CL basename:es_CL affix-file:/usr/share/hunspell/es_CL.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/eo_XX name:eo_XX basename:eo_XX affix-file:/usr/share/hunspell/eo_XX.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/lv_LV name:lv_LV basename:lv_LV affix-file:/usr/share/hunspell/lv_LV.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/hr name:hr basename:hr affix-file:/usr/share/hunspell/hr.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_LY name:ar_LY basename:ar_LY affix-file:/usr/share/hunspell/ar_LY.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_DO name:es_DO basename:es_DO affix-file:/usr/share/hunspell/es_DO.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/de_LU name:de_LU basename:de_LU affix-file:/usr/share/hunspell/de_LU.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_SY name:ar_SY basename:ar_SY affix-file:/usr/share/hunspell/ar_SY.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/fo name:fo basename:fo affix-file:/usr/share/hunspell/fo.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/lt_LT name:lt_LT basename:lt_LT affix-file:/usr/share/hunspell/lt_LT.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_IQ name:ar_IQ basename:ar_IQ affix-file:/usr/share/hunspell/ar_IQ.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/tl name:tl basename:tl affix-file:/usr/share/hunspell/tl.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/sl_SI name:sl_SI basename:sl_SI affix-file:/usr/share/hunspell/sl_SI.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/pl_PL name:pl_PL basename:pl_PL affix-file:/usr/share/hunspell/pl_PL.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar name:ar basename:ar affix-file:/usr/share/hunspell/ar.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/tl_PH name:tl_PH basename:tl_PH affix-file:/usr/share/hunspell/tl_PH.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/pl name:pl basename:pl affix-file:/usr/share/hunspell/pl.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_IN name:ar_IN basename:ar_IN affix-file:/usr/share/hunspell/ar_IN.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_MA name:ar_MA basename:ar_MA affix-file:/usr/share/hunspell/ar_MA.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_AE name:ar_AE basename:ar_AE affix-file:/usr/share/hunspell/ar_AE.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_QA name:ar_QA basename:ar_QA affix-file:/usr/share/hunspell/ar_QA.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_CO name:es_CO basename:es_CO affix-file:/usr/share/hunspell/es_CO.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_PE name:es_PE basename:es_PE affix-file:/usr/share/hunspell/es_PE.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/uz_UZ name:uz_UZ basename:uz_UZ affix-file:/usr/share/hunspell/uz_UZ.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/de_CH name:de_CH basename:de_CH affix-file:/usr/share/hunspell/de_CH.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/fo_FO name:fo_FO basename:fo_FO affix-file:/usr/share/hunspell/fo_FO.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_EC name:es_EC basename:es_EC affix-file:/usr/share/hunspell/es_EC.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/sv_SE name:sv_SE basename:sv_SE affix-file:/usr/share/hunspell/sv_SE.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/pt name:pt basename:pt affix-file:/usr/share/hunspell/pt.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_MX name:es_MX basename:es_MX affix-file:/usr/share/hunspell/es_MX.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/en_AU name:en_AU basename:en_AU affix-file:/usr/share/hunspell/en_AU.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/pt_BR name:pt_BR basename:pt_BR affix-file:/usr/share/hunspell/pt_BR.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/de_BE name:de_BE basename:de_BE affix-file:/usr/share/hunspell/de_BE.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es name:es basename:es affix-file:/usr/share/hunspell/es.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_KW name:ar_KW basename:ar_KW affix-file:/usr/share/hunspell/ar_KW.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/sk name:sk basename:sk affix-file:/usr/share/hunspell/sk.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_CU name:es_CU basename:es_CU affix-file:/usr/share/hunspell/es_CU.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/es_SV name:es_SV basename:es_SV affix-file:/usr/share/hunspell/es_SV.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/ar_SD name:ar_SD basename:ar_SD affix-file:/usr/share/hunspell/ar_SD.aff
++ ispell-fhd: dict-entry:/usr/share/hunspell/hu_HU name:hu_HU basename:hu_HU affix-file:/usr/share/hunspell/hu_HU.aff
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/cs
++ ispell-fhd: dict-entry:/usr/share/myspell/dicts/de-BE name:de-BE basename:de-BE affix-file:/usr/share/myspell/dicts/de-BE.aff
++ ispell-fhd: dict-entry:/usr/share/myspell/dicts/de-LI name:de-LI basename:de-LI affix-file:/usr/share/myspell/dicts/de-LI.aff
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/lt
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/de_LI
++ ispell-fhd: dict-entry:/usr/share/myspell/dicts/de-DE name:de-DE basename:de-DE affix-file:/usr/share/myspell/dicts/de-DE.aff
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/de_DE
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/de_AT
++ ispell-fhd: dict-entry:/usr/share/myspell/dicts/en-GB name:en-GB basename:en-GB affix-file:/usr/share/myspell/dicts/en-GB.aff
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/cs_CZ
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/en_GB
++ ispell-fhd: dict-entry:/usr/share/myspell/dicts/de-CH name:de-CH basename:de-CH affix-file:/usr/share/myspell/dicts/de-CH.aff
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/lv_LV
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/de_LU
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/lt_LT
++ ispell-fhd: dict-entry:/usr/share/myspell/dicts/lv-LV name:lv-LV basename:lv-LV affix-file:/usr/share/myspell/dicts/lv-LV.aff
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/ar
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/hyph_lv_LV
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/hyph_lt_LT
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/de_CH
-- ispell-fhd: Skipping entry: /usr/share/myspell/dicts/de_BE
++ ispell-fhd: dict-entry:/usr/share/myspell/dicts/de-LU name:de-LU basename:de-LU affix-file:/usr/share/myspell/dicts/de-LU.aff
++ ispell-fhd: dict-entry:/usr/share/myspell/dicts/de-AT name:de-AT basename:de-AT affix-file:/usr/share/myspell/dicts/de-AT.aff
-- ispell-fhd: Skipping entry: LOADED DICTIONARY:
-- ispell-fhd: Skipping entry: /usr/share/hunspell/en_US.dic
-- ispell-fhd: Skipping entry: Hunspell 1.3.2
-- ispell-fhd: Excluding castellano alias. Standalone dict found.
++ ispell-fhd: Adding alias svenska -> /usr/share/hunspell/sv_SE.aff.
++ ispell-fhd: Adding alias slovenian -> /usr/share/hunspell/sl_SI.aff.
++ ispell-fhd: Adding alias slovak -> /usr/share/hunspell/sk_SK.aff.
++ ispell-fhd: Adding alias russianw -> /usr/share/hunspell/ru_RU.aff.
++ ispell-fhd: Adding alias russian -> /usr/share/hunspell/ru_RU.aff.
++ ispell-fhd: Adding alias portugues -> /usr/share/hunspell/pt_PT.aff.
++ ispell-fhd: Adding alias polish -> /usr/share/hunspell/pl_PL.aff.
++ ispell-fhd: Adding alias german8 -> /usr/share/hunspell/de_DE.aff.
++ ispell-fhd: Adding alias german -> /usr/share/hunspell/de_DE.aff.
++ ispell-fhd: Adding alias esperanto -> /usr/share/hunspell/eo.aff.
++ ispell-fhd: Adding alias english -> /usr/share/hunspell/en_US.aff.
++ ispell-fhd: Adding alias deutsch8 -> /usr/share/hunspell/de_DE.aff.
++ ispell-fhd: Adding alias deutsch -> /usr/share/hunspell/de_DE.aff.
++ ispell-fhd: Adding alias czech -> /usr/share/hunspell/cs_CZ.aff.
++ ispell-fhd: Adding alias castellano8 -> /usr/share/hunspell/es_ES.aff.
++ ispell-fhd: Adding alias british -> /usr/share/hunspell/en_GB.aff.
++ ispell-fhd: Adding alias brasileiro -> /usr/share/hunspell/pt_BR.aff.
++ ispell-fhd: Adding alias american -> /usr/share/hunspell/en_US.aff.
ispell-region: (ispell-skip-region-list):
((\\addcontentsline ispell-tex-arg-end 2) (\\add\(tocontents\|vspace\) ispell-tex-arg-end) (\\\([aA]lph\|arabic\) ispell-tex-arg-end) (\\bibliographystyle ispell-tex-arg-end) (\\makebox ispell-tex-arg-end 0) (\\e?psfig ispell-tex-arg-end) (\\document\(class\|style\) . \\begin[
]*{[
]*document[
]*}) (\(figure\|table\)\*? ispell-tex-arg-end 0) (list ispell-tex-arg-end 2) (program . \\end[
]*{[
]*program[
]*}) (verbatim\*? . \\end[
]*{[
]*verbatim\*?[
]*}) (ispell-words-keyword forward-line) (ispell-dictionary-keyword forward-line) (ispell-pdict-keyword forward-line) (ispell-parsing-keyword forward-line) (^---*BEGIN PGP [A-Z ]*--* . ^---*END PGP [A-Z ]*--*) (^begin [0-9][0-9][0-9] [^ 	]+$ .
end
) (^%!PS-Adobe-[123].0 .
%%EOF
) (^---* \(Start of \)?[Ff]orwarded [Mm]essage . ^---* End of [Ff]orwarded [Mm]essage) (\(--+\|_+\|\(/\w\|\(\(\w\|[-_]\)+[.:@]\)\)\(\w\|[-_]\)*\([.:/@]+\(\w\|[-_~=?&]\)+\)+\)))
ispell-region: (ispell-begin-skip-region-regexp):
\\addcontentsline\|\\add\(tocontents\|vspace\)\|\\\([aA]lph\|arabic\)\|\\bibliographystyle\|\\makebox\|\\e?psfig\|\\document\(class\|style\)\|\\begin[
]*{[
]*\(figure\|table\)\*?[
]*}\|\\begin[
]*{[
]*list[
]*}\|\\begin[
]*{[
]*program[
]*}\|\\begin[
]*{[
]*verbatim\*?[
]*}\|LocalWords: \|Local IspellDict: \|Local IspellPersDict: \|Local IspellParsing: \|^---*BEGIN PGP [A-Z ]*--*\|^begin [0-9][0-9][0-9] [^ 	]+$\|^%!PS-Adobe-[123].0\|^---* \(Start of \)?[Ff]orwarded [Mm]essage\|\(--+\|_+\|\(/\w\|\(\(\w\|[-_]\)+[.:@]\)\)\(\w\|[-_]\)*\([.:/@]+\(\w\|[-_~=?&]\)+\)+\)
ispell-region: Search for first region to skip after (ispell-begin-skip-region-regexp)
ispell-region: First skip: \documentclass at (pos,line,column): (1,1,0).
ispell-region: Continue spell-checking with hunspell and default dictionary...
ispell-region: string pos (41->41), eol: 45, [in-comment]: [nil], [add-comment]: [nil], [string]: [nil]
ispell-region: string pos (42->45), eol: 45, [in-comment]: [nil], [add-comment]: [nil], [string]: [^bla
]
ispell-region: string pos (45->45), eol: 60, [in-comment]: [nil], [add-comment]: [nil], [string]: [nil]
ispell-region: string pos (46->60), eol: 60, [in-comment]: [nil], [add-comment]: [nil], [string]: [^\end{document}
]
ispell-region: string pos (60->60), eol: 61, [in-comment]: [nil], [add-comment]: [nil], [string]: [nil]

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

* bug#7781: hunspell and latex-mode
  2014-04-29 10:39           ` Agustin Martin
@ 2014-04-29 11:54             ` Peter Münster
  2014-04-29 12:48               ` Peter Münster
  0 siblings, 1 reply; 35+ messages in thread
From: Peter Münster @ 2014-04-29 11:54 UTC (permalink / raw)
  To: Agustin Martin; +Cc: 7781

On Tue, Apr 29 2014, Agustin Martin wrote:

> Please find it attached. Apart from the misalignment problem the only
> difference seems to be that I have lots of dicts installed and the
> ~/.openoffice.org/ path.

There is probably not enough information in the debug buffer.

Could you please try this:

mv /usr/bin/hunspell /usr/bin/hunspell-orig

And create the file /usr/bin/hunspell with the following content:

--8<---------------cut here---------------start------------->8---
#!/bin/bash
tee /tmp/hunspell-input | hunspell-orig "$@" | tee /tmp/hunspell-output
--8<---------------cut here---------------end--------------->8---

This is what I get:

input:
--8<---------------cut here---------------start------------->8---
!
+
^bla
--8<---------------cut here---------------end--------------->8---

output:
--8<---------------cut here---------------start------------->8---
@(#) International Ispell Version 3.2.06 (but really Hunspell 1.3.2)
& bla 15 0: alb, bl, la, blat, bola, blag, blah, blab, lab, baa, bra, boa, Ila, Ala, Ola
--8<---------------cut here---------------end--------------->8---

I guess, that you get "bla 15 1", because of the "^" before the "bla".

That would mean, that my hunspell would need another patch. Which one
please?

Thanks for your efforts,
-- 
           Peter





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

* bug#7781: hunspell and latex-mode
  2014-04-29 11:54             ` Peter Münster
@ 2014-04-29 12:48               ` Peter Münster
  2014-04-29 13:57                 ` Eli Zaretskii
  0 siblings, 1 reply; 35+ messages in thread
From: Peter Münster @ 2014-04-29 12:48 UTC (permalink / raw)
  To: Agustin Martin; +Cc: 7781

I've just tried unpatched hunspell: no problem with TeX-mode.
It's the patch on sf.net that breaks the TeX-mode, the character
position is always 0:
https://sourceforge.net/p/hunspell/patches/57/#d425

I'll build hunspell with Eli's patch now.

Sorry for the noise...

-- 
           Peter





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

* bug#7781: hunspell and latex-mode
  2014-04-29 12:48               ` Peter Münster
@ 2014-04-29 13:57                 ` Eli Zaretskii
  2014-04-29 14:30                   ` Peter Münster
  0 siblings, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2014-04-29 13:57 UTC (permalink / raw)
  To: Peter Münster; +Cc: agustin.martin, 7781

> From: Peter Münster <pmlists@free.fr>
> Date: Tue, 29 Apr 2014 14:48:43 +0200
> Cc: 7781@debbugs.gnu.org
> 
> I've just tried unpatched hunspell: no problem with TeX-mode.
> It's the patch on sf.net that breaks the TeX-mode, the character
> position is always 0:
> https://sourceforge.net/p/hunspell/patches/57/#d425

That's what I thought.  If I invoke Hunspell like ispell.el does for a
LaTeX buffer, i.e.

  hunspell -a -d en_US -i UTF-8

and then type "^bla RET" into Hunspell, I get this as output:

  & bla 15 1: alb, bl, la, bola, blah, blab, lab, baa, ala, bra, boa, Ila, Ala, Ola, Ula

As you see, I get "15 1".  If you get 0 instead of 1, then that's the
cause of the problem, because the part of your debug output marked
below:

  ispell-process-line: Ispell misalignment error:
    [Word from ispell pipe]: [bla], actual (point,line,column): (41,2,16)
                                                                 ^^^^^^^
clearly shows that ispell.el is confused about where the word "bla"
begins in the buffer; the correct data is 42,3,0.  Also note that just
before reading Hunspell's output, ispell.el correctly identified both
the word and its location:

  ispell-region: string pos (42->45), eol: 45, [in-comment]: [nil], [add-comment]: [nil], [string]: [^bla
  ]

> I'll build hunspell with Eli's patch now.

I think that will solve the problem.

(I have no idea why visiting the same file in Text mode avoids the
problem.  The only difference is that in Text mode, ispell.el does not
skip the first 2 lines, but instead submits them to Hunspell.  Why
this makes the difference, I don't know, but probably the lone "^bla"
somehow triggers the bug in the patch you installed, whatever that bug
is.)





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

* bug#7781: hunspell and latex-mode
  2014-04-29 13:57                 ` Eli Zaretskii
@ 2014-04-29 14:30                   ` Peter Münster
  2014-04-29 15:25                     ` Eli Zaretskii
  0 siblings, 1 reply; 35+ messages in thread
From: Peter Münster @ 2014-04-29 14:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: agustin.martin, 7781

On Tue, Apr 29 2014, Eli Zaretskii wrote:

> (I have no idea why visiting the same file in Text mode avoids the
> problem.  The only difference is that in Text mode, ispell.el does not
> skip the first 2 lines, but instead submits them to Hunspell.

No. In latex-mode, emacs switches hunspell into TeX-mode with the "+".


> Why this makes the difference, I don't know, but probably the lone
> "^bla" somehow triggers the bug in the patch you installed, whatever
> that bug is.)

No. In normal mode, the "^bla" works fine. The patch on sf.net just
breaks the TeX-mode: every position becomes 0.

Your patch works nicely, thanks!

I should have tested hunspell on the command line, before reporting the
problem. Now I know, how to do that.

-- 
           Peter





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

* bug#7781: hunspell and latex-mode
  2014-04-29 14:30                   ` Peter Münster
@ 2014-04-29 15:25                     ` Eli Zaretskii
  2014-04-29 16:34                       ` Peter Münster
  0 siblings, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2014-04-29 15:25 UTC (permalink / raw)
  To: Peter Münster; +Cc: agustin.martin, 7781

> From: Peter Münster <pmlists@free.fr>
> Cc: agustin.martin@hispalinux.es,  7781@debbugs.gnu.org
> Date: Tue, 29 Apr 2014 16:30:07 +0200
> 
> On Tue, Apr 29 2014, Eli Zaretskii wrote:
> 
> > (I have no idea why visiting the same file in Text mode avoids the
> > problem.  The only difference is that in Text mode, ispell.el does not
> > skip the first 2 lines, but instead submits them to Hunspell.
> 
> No. In latex-mode, emacs switches hunspell into TeX-mode with the "+".

It does both, evidently.  Compare this part of your debug output (in
LaTeX buffer):

  ispell-region: First skip: \documentclass at (pos,line,column): (1,1,0).
  ispell-region: Continue spell-checking with hunspell and default dictionary...
  ispell-region: string pos (41->41), eol: 45, [in-comment]: [nil], [add-comment]: [nil], [string]: [nil]
  ispell-region: string pos (42->45), eol: 45, [in-comment]: [nil], [add-comment]: [nil], [string]: [^bla
  ]

with this (in Text buffer):

  ispell-region: string pos (1->24), eol: 24, [in-comment]: [nil], [add-comment]: [nil], [string]: [^\documentclass{article}
  ]
  ispell-region: string pos (24->24), eol: 41, [in-comment]: [nil], [add-comment]: [nil], [string]: [nil]
  ispell-region: string pos (25->41), eol: 41, [in-comment]: [nil], [add-comment]: [nil], [string]: [^\begin{document}
  ]
  ispell-region: string pos (41->41), eol: 45, [in-comment]: [nil], [add-comment]: [nil], [string]: [nil]
  ispell-region: string pos (42->45), eol: 45, [in-comment]: [nil], [add-comment]: [nil], [string]: [^bla
  ]
  ispell-region: string pos (45->45), eol: 60, [in-comment]: [nil], [add-comment]: [nil], [string]: [nil]
  ispell-region: string pos (46->60), eol: 60, [in-comment]: [nil], [add-comment]: [nil], [string]: [^\end{document}
  ]

As you see, in the second case, the TeX directives are also sent to
Hunspell for checking, while in the first case they are not.





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

* bug#7781: hunspell and latex-mode
  2014-04-29 15:25                     ` Eli Zaretskii
@ 2014-04-29 16:34                       ` Peter Münster
  0 siblings, 0 replies; 35+ messages in thread
From: Peter Münster @ 2014-04-29 16:34 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: agustin.martin, 7781

On Tue, Apr 29 2014, Eli Zaretskii wrote:

>> > The only difference is that in Text mode, ispell.el does not skip
>> > the first 2 lines, but instead submits them to Hunspell.
>> 
>> No. In latex-mode, emacs switches hunspell into TeX-mode with the "+".
>
> It does both, evidently.  Compare this part of your debug output (in
> LaTeX buffer):

Sorry. I just wanted to say: "No, it's not the *only* difference." ... ;)

-- 
           Peter





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

* bug#7781: Bug still present in hunspell 1.3.3; Eli's patch still works
  2011-01-03 23:14 bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file Reuben Thomas
                   ` (3 preceding siblings ...)
  2014-04-27 21:30 ` bug#7781: hunspell and latex-mode Peter Münster
@ 2014-09-25  9:54 ` Reuben Thomas
  2020-08-28 12:00 ` bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file Stefan Kangas
  5 siblings, 0 replies; 35+ messages in thread
From: Reuben Thomas @ 2014-09-25  9:54 UTC (permalink / raw)
  To: 7781

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

I have sent a message to the upstream maintainer informing him of the
situation and asking for the patch to be included in the next release.

-- 
http://rrt.sc3d.org

[-- Attachment #2: Type: text/html, Size: 287 bytes --]

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

* bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file
  2011-02-11 17:00   ` Agustin Martin
@ 2014-10-16 13:37     ` Agustin Martin
  2014-10-16 13:54       ` Eli Zaretskii
  0 siblings, 1 reply; 35+ messages in thread
From: Agustin Martin @ 2014-10-16 13:37 UTC (permalink / raw)
  To: Reuben Thomas, 7781

Control: tag 7781 + upstream fixed-upstream

On Fri, Feb 11, 2011 at 06:00:53PM +0100, Agustin Martin wrote:
> forwarded 7781 https://sourceforge.net/tracker/?func=detail&aid=3178449&group_id=143754&atid=756395
> thanks
> 
> 2011/1/7 Agustin Martin <agustin.martin@hispalinux.es>:
> > 2011/1/4 Reuben Thomas <rrt@sc3d.org>:
> >> With the following text, and using emacs -Q, I get the errors you can
> >> see in the messages log below when using hunspell to spell-check a UTF-8
> >> buffer with some extended characters in it.
> 
> > Do not worry about first number, is the number of suggestions. However
> > position in second number differ. Seems that hunspell is not
> > considering that apostrophe as a single (multibyte) char when
> > counting, but as three components
> >
> > Looks to me an hunspell bug. I found no reference to this problem in
> > hunspell sf site, but noticed that Hunspell 1.2.14 was released
> > yesterday. Need to check if that has some related new.
> 
> Opened an hunspell  bug report for bad count problem
> 
> https://sourceforge.net/tracker/?func=detail&aid=3178449&group_id=143754&atid=756395

Reuben Thomas wrote:
> I have sent a message to the upstream maintainer informing him of the
> situation and asking for the patch to be included in the next release.

Proposed patch has been integrated in hunspell upstream by caolan mcnamara.

Regards,

PS: My old hispalinux.es address is failing silently and I do not if I will
ever be able to get it fixed. Please use current gmail address for replies.

-- 
Agustin





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

* bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file
  2014-10-16 13:37     ` Agustin Martin
@ 2014-10-16 13:54       ` Eli Zaretskii
  2014-10-16 14:08         ` Agustin Martin
  0 siblings, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2014-10-16 13:54 UTC (permalink / raw)
  To: Agustin Martin; +Cc: 7781, rrt

> Date: Thu, 16 Oct 2014 15:37:24 +0200
> From: Agustin Martin <agustin6martin@gmail.com>
> 
> > Opened an hunspell  bug report for bad count problem
> > 
> > https://sourceforge.net/tracker/?func=detail&aid=3178449&group_id=143754&atid=756395
> 
> Reuben Thomas wrote:
> > I have sent a message to the upstream maintainer informing him of the
> > situation and asking for the patch to be included in the next release.
> 
> Proposed patch has been integrated in hunspell upstream by caolan mcnamara.

Do you mean there's now an official release of Hunspell with this bug
fixed?  If so, where can one find it?





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

* bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file
  2014-10-16 13:54       ` Eli Zaretskii
@ 2014-10-16 14:08         ` Agustin Martin
  0 siblings, 0 replies; 35+ messages in thread
From: Agustin Martin @ 2014-10-16 14:08 UTC (permalink / raw)
  To: rrt, 7781

On Thu, Oct 16, 2014 at 04:54:16PM +0300, Eli Zaretskii wrote:
> > Date: Thu, 16 Oct 2014 15:37:24 +0200
> > From: Agustin Martin <agustin6martin@gmail.com>
> > 
> > > Opened an hunspell  bug report for bad count problem
> > > 
> > > https://sourceforge.net/tracker/?func=detail&aid=3178449&group_id=143754&atid=756395
> > 
> > Reuben Thomas wrote:
> > > I have sent a message to the upstream maintainer informing him of the
> > > situation and asking for the patch to be included in the next release.
> > 
> > Proposed patch has been integrated in hunspell upstream by caolan mcnamara.
> 
> Do you mean there's now an official release of Hunspell with this bug
> fixed?  If so, where can one find it?

I am afraid it only means that fix has been pushed to upstream VCS. 

http://hunspell.cvs.sourceforge.net/viewvc/hunspell/hunspell/src/tools/hunspell.cxx?r1=1.60&r2=1.61

Another good new is that this is not the only bug just handled,

http://sourceforge.net/p/hunspell/bugs/228/
[hunspell:bugs] #228 Some problems with Emacs and init string in pipe mode

has been changed to closed-accepted and pushed to the repo (r1.62).

Regards,

-- 
Agustin





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

* bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file
  2011-01-03 23:14 bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file Reuben Thomas
                   ` (4 preceding siblings ...)
  2014-09-25  9:54 ` bug#7781: Bug still present in hunspell 1.3.3; Eli's patch still works Reuben Thomas
@ 2020-08-28 12:00 ` Stefan Kangas
  2020-08-28 12:36   ` Eli Zaretskii
  5 siblings, 1 reply; 35+ messages in thread
From: Stefan Kangas @ 2020-08-28 12:00 UTC (permalink / raw)
  To: Reuben Thomas; +Cc: 7781

Reuben Thomas <rrt@sc3d.org> writes:

> With the following text, and using emacs -Q, I get the errors you can
> see in the messages log below when using hunspell to spell-check a UTF-8
> buffer with some extended characters in it.
>
> I did test this with emacs -Q, but the current session, in which I
> reproduced the problem and am now composing this bug report, was not
> started with -Q (this is so submitting the bug report works properly!).
>
> I am running a freshly bzr-pulled build of the emacs-23 branch.
>
> Text follows

I tried this but couldn't reproduce the bug using current master and
Hunspell 1.7.0.  Having read the bug report, IIUC, this was a bug in
Hunspell and not in Emacs?

Are you still able to reproduce this using a recent Emacs and Hunspell?

If I don't hear back from you within a couple of weeks, I'll just
close this bug as unreproducible.

Best regards,
Stefan Kangas





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

* bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file
  2020-08-28 12:00 ` bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file Stefan Kangas
@ 2020-08-28 12:36   ` Eli Zaretskii
  2020-08-28 12:56     ` Stefan Kangas
  0 siblings, 1 reply; 35+ messages in thread
From: Eli Zaretskii @ 2020-08-28 12:36 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 7781, rrt

> From: Stefan Kangas <stefan@marxist.se>
> Date: Fri, 28 Aug 2020 05:00:11 -0700
> Cc: 7781@debbugs.gnu.org
> 
> Reuben Thomas <rrt@sc3d.org> writes:
> 
> > With the following text, and using emacs -Q, I get the errors you can
> > see in the messages log below when using hunspell to spell-check a UTF-8
> > buffer with some extended characters in it.
> >
> > I did test this with emacs -Q, but the current session, in which I
> > reproduced the problem and am now composing this bug report, was not
> > started with -Q (this is so submitting the bug report works properly!).
> >
> > I am running a freshly bzr-pulled build of the emacs-23 branch.
> >
> > Text follows
> 
> I tried this but couldn't reproduce the bug using current master and
> Hunspell 1.7.0.  Having read the bug report, IIUC, this was a bug in
> Hunspell and not in Emacs?
> 
> Are you still able to reproduce this using a recent Emacs and Hunspell?

Some (old) versions of Hunspell had a bug, whereby the mis-spelled
words were reported with offsets in bytes, not in characters.  When
this happens, ispell.el reports "misalignment" errors.

I don't remember when (or even if) Hunspell fixed that problem (in the
version I use I fixed it myself), but if 1.7.0 has that problem fixed,
you will not see the problem.





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

* bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file
  2020-08-28 12:36   ` Eli Zaretskii
@ 2020-08-28 12:56     ` Stefan Kangas
  0 siblings, 0 replies; 35+ messages in thread
From: Stefan Kangas @ 2020-08-28 12:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 7781, rrt

tags 7781 + notabug
close 7781
thanks

Eli Zaretskii <eliz@gnu.org> writes:

> Some (old) versions of Hunspell had a bug, whereby the mis-spelled
> words were reported with offsets in bytes, not in characters.  When
> this happens, ispell.el reports "misalignment" errors.
>
> I don't remember when (or even if) Hunspell fixed that problem (in the
> version I use I fixed it myself), but if 1.7.0 has that problem fixed,
> you will not see the problem.

Thanks, so this is not a bug in Emacs.  I'm therefore closing this bug report.

If this conclusion is incorrect, please reopen the bug report.

Best regards,
Stefan Kangas





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

end of thread, other threads:[~2020-08-28 12:56 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-03 23:14 bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file Reuben Thomas
2011-01-07 13:14 ` Agustin Martin
2011-01-07 14:30   ` Reuben Thomas
2011-02-11 17:00   ` Agustin Martin
2014-10-16 13:37     ` Agustin Martin
2014-10-16 13:54       ` Eli Zaretskii
2014-10-16 14:08         ` Agustin Martin
2012-01-01 21:42 ` bug#7781: ispell problem with hunspell and UTF-8 file (and other, related hunspell problems) Richard Wordingham
2013-04-13 19:12 ` bug#7781: [PATCH] Fix ispell problem with hunspell and UTF-8 file Николай Сущенко
2013-04-14  5:42   ` Eli Zaretskii
2013-04-14  6:33     ` Николай Сущенко
2013-04-14  7:08       ` Eli Zaretskii
2013-04-20 18:43         ` Николай Сущенко
2014-04-27 21:30 ` bug#7781: hunspell and latex-mode Peter Münster
2014-04-28 15:37   ` Eli Zaretskii
2014-04-28 16:18     ` Peter Münster
2014-04-28 16:48       ` Eli Zaretskii
2014-04-28 17:17         ` Peter Münster
2014-04-28 17:32           ` Eli Zaretskii
2014-04-28 18:27             ` Peter Münster
2014-04-29 10:03       ` Agustin Martin
2014-04-29 10:13         ` Peter Münster
2014-04-29 10:21           ` Agustin Martin
2014-04-29 10:20         ` Peter Münster
2014-04-29 10:39           ` Agustin Martin
2014-04-29 11:54             ` Peter Münster
2014-04-29 12:48               ` Peter Münster
2014-04-29 13:57                 ` Eli Zaretskii
2014-04-29 14:30                   ` Peter Münster
2014-04-29 15:25                     ` Eli Zaretskii
2014-04-29 16:34                       ` Peter Münster
2014-09-25  9:54 ` bug#7781: Bug still present in hunspell 1.3.3; Eli's patch still works Reuben Thomas
2020-08-28 12:00 ` bug#7781: 23.2.91; ispell problem with hunspell and UTF-8 file Stefan Kangas
2020-08-28 12:36   ` Eli Zaretskii
2020-08-28 12:56     ` Stefan Kangas

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).