all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Peter Münster" <pmlists@free.fr>
Cc: agustin.martin@hispalinux.es, 7781@debbugs.gnu.org
Subject: bug#7781: hunspell and latex-mode
Date: Tue, 29 Apr 2014 16:57:36 +0300	[thread overview]
Message-ID: <83tx9cme5r.fsf@gnu.org> (raw)
In-Reply-To: <87bnvk9u8k.fsf@micropit.roche-blanche.homenet.org>

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





  reply	other threads:[~2014-04-29 13:57 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=83tx9cme5r.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=7781@debbugs.gnu.org \
    --cc=agustin.martin@hispalinux.es \
    --cc=pmlists@free.fr \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.