From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#7781: hunspell and latex-mode Date: Tue, 29 Apr 2014 16:57:36 +0300 Message-ID: <83tx9cme5r.fsf@gnu.org> References: <87sjx9fula.fsf@sc3d.org> <87y4yqh34e.fsf@micropit.couberia.selfip.net> <83eh0ho482.fsf@gnu.org> <87mwf5fmwt.fsf@micropit.couberia.selfip.net> <20140429100325.GA13604@agmartin.aq.upm.es> <87r44ga131.fsf@micropit.roche-blanche.homenet.org> <20140429103949.GA28561@agmartin.aq.upm.es> <87fvkw9wq9.fsf@micropit.roche-blanche.homenet.org> <87bnvk9u8k.fsf@micropit.roche-blanche.homenet.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1398779906 8854 80.91.229.3 (29 Apr 2014 13:58:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Apr 2014 13:58:26 +0000 (UTC) Cc: agustin.martin@hispalinux.es, 7781@debbugs.gnu.org To: Peter =?UTF-8?Q?M=C3=BCnster?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 29 15:58:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wf8Y6-0007L1-Qs for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Apr 2014 15:58:18 +0200 Original-Received: from localhost ([::1]:49929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wf8Y6-0005pY-H5 for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Apr 2014 09:58:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wf8Xx-0005pI-G9 for bug-gnu-emacs@gnu.org; Tue, 29 Apr 2014 09:58:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wf8Xq-0007N8-Fy for bug-gnu-emacs@gnu.org; Tue, 29 Apr 2014 09:58:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wf8Xq-0007N4-CX for bug-gnu-emacs@gnu.org; Tue, 29 Apr 2014 09:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wf8Xp-0008K6-Rh for bug-gnu-emacs@gnu.org; Tue, 29 Apr 2014 09:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Apr 2014 13:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7781 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7781-submit@debbugs.gnu.org id=B7781.139877986031960 (code B ref 7781); Tue, 29 Apr 2014 13:58:01 +0000 Original-Received: (at 7781) by debbugs.gnu.org; 29 Apr 2014 13:57:40 +0000 Original-Received: from localhost ([127.0.0.1]:45083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wf8XU-0008JQ-45 for submit@debbugs.gnu.org; Tue, 29 Apr 2014 09:57:40 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:45282) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wf8XO-0008JD-VZ for 7781@debbugs.gnu.org; Tue, 29 Apr 2014 09:57:36 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N4S00K00P6NT000@a-mtaout22.012.net.il> for 7781@debbugs.gnu.org; Tue, 29 Apr 2014 16:57:28 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N4S00K3PPFRAZC0@a-mtaout22.012.net.il>; Tue, 29 Apr 2014 16:57:27 +0300 (IDT) In-reply-to: <87bnvk9u8k.fsf@micropit.roche-blanche.homenet.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:88413 Archived-At: > From: Peter Münster > 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.)