From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Agustin Martin Newsgroups: gmane.emacs.bugs Subject: bug#12768: 24.1; flyspell highlights words which ispell accepts Date: Fri, 2 Nov 2012 02:19:51 +0100 Message-ID: References: <87zk3414cf.fsf@sc3d.org> <20121031123140.GA17066@agmartin.aq.upm.es> <20121031145318.GA16471@agmartin.aq.upm.es> <83625p758u.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1351819222 22024 80.91.229.3 (2 Nov 2012 01:20:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Nov 2012 01:20:22 +0000 (UTC) To: 12768@debbugs.gnu.org, rrt@sc3d.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 02 02:20:31 2012 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 1TU5vy-0003rs-G8 for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Nov 2012 02:20:30 +0100 Original-Received: from localhost ([::1]:52069 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TU5vp-0001OJ-UI for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Nov 2012 21:20:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TU5vm-0001O2-QC for bug-gnu-emacs@gnu.org; Thu, 01 Nov 2012 21:20:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TU5vl-0003Nv-Dy for bug-gnu-emacs@gnu.org; Thu, 01 Nov 2012 21:20:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TU5vl-0003M4-93 for bug-gnu-emacs@gnu.org; Thu, 01 Nov 2012 21:20:17 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TU5yQ-000417-7v for bug-gnu-emacs@gnu.org; Thu, 01 Nov 2012 21:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Agustin Martin Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Nov 2012 01:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12768 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12768-submit@debbugs.gnu.org id=B12768.135181936115415 (code B ref 12768); Fri, 02 Nov 2012 01:23:02 +0000 Original-Received: (at 12768) by debbugs.gnu.org; 2 Nov 2012 01:22:41 +0000 Original-Received: from localhost ([127.0.0.1]:43764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TU5y5-00040Z-3f for submit@debbugs.gnu.org; Thu, 01 Nov 2012 21:22:41 -0400 Original-Received: from mail-pb0-f44.google.com ([209.85.160.44]:59409) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TU5y2-00040P-EJ for 12768@debbugs.gnu.org; Thu, 01 Nov 2012 21:22:39 -0400 Original-Received: by mail-pb0-f44.google.com with SMTP id ro8so2112679pbb.3 for <12768@debbugs.gnu.org>; Thu, 01 Nov 2012 18:19:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=ZqZZ2cFdTa87/I0jqMrSNT2h5Z0ZBCsPI3WYswvKa+I=; b=WrSHz1V1T8Dr+YPcaFnU8kbpldk0MD18UibRVZwQ/sNYdKwo3f2Kep+vGFiHK0OfLE qf33FzDKCwNq3bu4T1sQRQrebqJN/FVsnV+RK5QhRAR/hhuOvxmwDjPLGHj9sT1fTnq5 L+4YWIcEZngYU7y8a0pYq7Qj0x83r0kHjy8/16rbb3UE4gNjl5M4kCSz+ClOhX6CdOtK pT/sb8xlowgashCAcAGOq92CKM2V7BSrcPwfaMS7a5CskKDfA5by+LMdWQbTRuHWVEqJ BOBg5UPuF5vVXKMJDy62FKVJxyskG+DM3ReoyIzOK6GUMsEhaOwcHQwtcYwI/zRHW+Xv JO7A== Original-Received: by 10.68.233.201 with SMTP id ty9mr1394005pbc.14.1351819191982; Thu, 01 Nov 2012 18:19:51 -0700 (PDT) Original-Received: by 10.68.43.167 with HTTP; Thu, 1 Nov 2012 18:19:51 -0700 (PDT) In-Reply-To: <83625p758u.fsf@gnu.org> X-Google-Sender-Auth: S1HAyTPjQmd0-Klg5LKtudTiuzQ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:66331 Archived-At: 2012/11/1 Eli Zaretskii : >> From: Agustin Martin >> >> Really strange. With your steps I can even reproduce the problem with >> something as simple as >> >> dnl -- D >> >> If I add something before dnl I still get the problem. >> >> sdfdsfsdnl -- D >> >> IIf I either break the double dash (no double dashes at all) or the >> dnl or remove the "D" after the dashes problem disappear >> >> dfnl -- D >> dnl - - D >> dnl -- >> >> autotest-mode.el is a small file, but II do not see any hint about >> what is happening here. Seems to do something strange with double >> dashes associated with dnl, but I am absolutely clueless, help >> welcome. > > If you step through ispell-region, you will see that it goes bananas > because ispell-skip-region-alist has "--+" as part of it, which > matches the dashes between "dnl" and the text of the comment. What > ispell-region does is remove the dashes, and then _prepend_ "dnl" > (because it's a comment-start string). The result is that we send > something like "^dnl FOO" to the speller, and the character positions > get screwed up, because the characters between "dnl" and "FOO" were > removed. Thanks a lot for debugging. I only had time to note that as you point put more that one dash is removed causing the misalignment. Was currently looking at the wrong site (autoconf.el). > FWIW, I really don't understand why ispell.el removes patterns that > pertain to email messages from buffers that have nothing to do with > mail-mode or its derivatives. No idea. I never looked before into ispell-region and friends for anything than trying to have a fallback behavior on misalignments, and that was beyond my skills. >> Dirty workaround in the meantime, avoid double dashes and try something like >> >> dnl - - - - Hi, whatever I want to add here >> >> But I really wonder what is happening here. > > See above. A single dash doesn't get removed, so the workaround works > around. > > Btw, WIBNI ispell.el had a debug option, which, if set, would collect > in a special buffer everything we send to the speller and its > responses. I find myself adding '(message "sent %s" strin)' > etc. every time I need to debug the communications between ispell.el > and the speller program. WDYT? I think you are right. I am also an extensive user of the (message ...) debugger and it is really useful, but needing to re-add things for every new debug is a pity. flyspell has some of such debug options sending things to a flyspell-debug buffer, something in the same line would be useful. Thanks again for the info. Will try to have a look at ispell-region to try understanding things better -- Agustin