From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reuben Thomas Newsgroups: gmane.emacs.bugs Subject: bug#13109: 24.1; flyspell highlights words containing curly quotes which ispell-buffer accepts Date: Fri, 3 May 2013 21:48:27 +0100 Message-ID: References: <87lidaenqo.fsf@sc3d.org> <83r4n2nzn0.fsf@gnu.org> <838v9anex9.fsf@gnu.org> <87d2yheb2k.fsf@mail.jurta.org> <87a9tkz1id.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b3433600b750604dbd679b0 X-Trace: ger.gmane.org 1367614172 9117 80.91.229.3 (3 May 2013 20:49:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 May 2013 20:49:32 +0000 (UTC) Cc: 13109@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 03 22:49:29 2013 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 1UYMv1-0005Hl-Ki for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 May 2013 22:49:27 +0200 Original-Received: from localhost ([::1]:60925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYMv1-0001tJ-Ap for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 May 2013 16:49:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYMuw-0001tE-GI for bug-gnu-emacs@gnu.org; Fri, 03 May 2013 16:49:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYMuu-00055h-SN for bug-gnu-emacs@gnu.org; Fri, 03 May 2013 16:49:22 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYMuu-00055d-OW for bug-gnu-emacs@gnu.org; Fri, 03 May 2013 16:49:20 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UYMvZ-0004uI-W0 for bug-gnu-emacs@gnu.org; Fri, 03 May 2013 16:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 May 2013 20:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13109 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13109-submit@debbugs.gnu.org id=B13109.136761415618767 (code B ref 13109); Fri, 03 May 2013 20:50:01 +0000 Original-Received: (at 13109) by debbugs.gnu.org; 3 May 2013 20:49:16 +0000 Original-Received: from localhost ([127.0.0.1]:57371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UYMup-0004sc-8Y for submit@debbugs.gnu.org; Fri, 03 May 2013 16:49:15 -0400 Original-Received: from exprod7og101.obsmtp.com ([64.18.2.155]:39661) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1UYMul-0004sN-TH for 13109@debbugs.gnu.org; Fri, 03 May 2013 16:49:13 -0400 Original-Received: from mail-wg0-f72.google.com ([74.125.82.72]) (using TLSv1) by exprod7ob101.postini.com ([64.18.6.12]) with SMTP ID DSNKUYQinFpTl/pfj/5zZaIErKF3wf2723sj@postini.com; Fri, 03 May 2013 13:48:29 PDT Original-Received: by mail-wg0-f72.google.com with SMTP id e11so3038434wgh.7 for <13109@debbugs.gnu.org>; Fri, 03 May 2013 13:48:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-received:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=6NGldO1diNidhPtqHXI8D7k+SUPW0had/FYDZVjO29o=; b=d+25fOa16C6WkJr3kFsC0H4jrx/jTo0yg/9n+FO1PMBD8bfTbdo2fsonG/UYqBYL1i ttgcUf1ZBTH6I/858qLdZbDdvkKmXXln9zhCyblI0m/+JOCniqRYNJwNlp/gv0K9A028 Rxz3xy1dhaCX5ymPo6b0pfskNEF2oKNvOuc8LHvI/Bt1kXVet/Sr0Tu5AuSKzJz9SwmO 63pv2EJuwbmvvRqqie9ZX+adm4W9Ro+CiwVaBDE6ft6opLKWR++OtRUXO0LwNbDIQDL3 ohlEz/b/qqB7loFrmB5g12JB58qILHRk0mYzXgi3u8mCBaetGU+qbvlYoforwoxihAzc A+XQ== X-Received: by 10.112.133.200 with SMTP id pe8mr4807754lbb.50.1367614107264; Fri, 03 May 2013 13:48:27 -0700 (PDT) X-Received: by 10.112.133.200 with SMTP id pe8mr4807752lbb.50.1367614107116; Fri, 03 May 2013 13:48:27 -0700 (PDT) Original-Received: by 10.152.19.2 with HTTP; Fri, 3 May 2013 13:48:27 -0700 (PDT) In-Reply-To: X-Gm-Message-State: ALoCoQmRrv5YouEWLGQP4caX0U7wnMrvPkgjSj+YyqaZzfcKWteRK5cd9moC7F/6xhW4S8wvrXW4SMiDsH0havx4q4mDH/oTqgvCbVa1+Q1aQo6b+Y+4Jr97u6x+588c1ZUNyYSY7ujCopB03R4epNbM8zgw435f5ikbcApfNgxDLifoqGkloQQ= 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:73934 Archived-At: --047d7b3433600b750604dbd679b0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 3 May 2013 21:20, Reuben Thomas wrote: > On 3 May 2013 21:15, Reuben Thomas wrote: > >> On 11 December 2012 23:07, Juri Linkov wrote: >> >>> >> `ispell-aspell-find-dictionary' reads the ispell data from >>> This fix means that aspell developers added a mapping from >>> 2019 (RIGHT SINGLE QUOTATION MARK) to 27 (APOSTROPHE) >>> in their character `compat' table. This explains why >>> `ispell-buffer' does work while `ispell-word' and `flyspell' don't. >>> >>> `ispell-word' and `flyspell' still use the information from >>> /usr/lib/aspell/en.dat to parse the buffer to find the next word to >>> check, >>> and fail because they don't use the `compat' mappings from >>> iso-8859-1.cmap. >>> >> >> This finally annoyed me sufficiently that I decided I wanted a >> workaround. Fortunately, this is easy, as it merely involves reapplying = a >> version of the fix I used to use when ispell-buffer didn't work. I now h= ave >> the following line in my custom.el: >> >> '(ispell-local-dictionary-alist (quote (("british" "[[:alpha:]]" >> "[^[:alpha:]]" "'=92" t ("-d" "en_GB") nil utf-8)))) >> >> I've copied the default settings and added a curly single quote to the >> list of permitted "other characters". I imagine one can do the same for >> other languages. It's ugly (principally because it copies rather than >> overwriting information) but that information (the other entries in the >> record) doesn't change often, so it'll do until a more comprehensive >> solution is applied. >> > > Belay that, it doesn't work. It seems I have to type a new word for > flyspell to complain; merely passing the cursor over an old one (which > suffices to remove a highlight in a word that has been added to the > dictionary) does not suffice. > > If anyone can offer a functioning workaround, I'd be most grateful. > I read the documentation for ispell-dictionary-alist more carefully, and came up with: '(ispell-local-dictionary-alist (quote (("british" "[[:alpha:]]" "[^[:alpha:]]" "['=92]" t ("-d" "en_GB") nil utf-8)))) where I made the "others" character set a character class. I checked the aspell command actually being run (with "ps") to ensure that it is indeed using "-d en_GB", and if I change the second argument to the (bizarre) setting of "fr_FR", this is used, so my settings in ispell-local-dictionary-alist are being used. If I run ispell-get-otherchars, I get ['=92] as expected. If I run "(looking-at (ispell-get-otherchars))" while sitting on a curly quote, I get: t Actually, now I see something weird is happening. I type: "didn=92", i.e. "didn" followed by a curly quote, and the word is highlight= ed as misspelt. If I then type "t" to finish the word, it is unhighlighted, after a pause. Is there some other part of flyspell that is more rough-and-ready which I also have to tweak? --=20 http://rrt.sc3d.org --047d7b3433600b750604dbd679b0 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
On 3 May 2013 21:20, Reuben Thomas <<= a href=3D"mailto:rrt@sc3d.org" target=3D"_blank">rrt@sc3d.org> wrote:
On 3 May 2013 21:15, Reuben Thomas = <rrt= @sc3d.org> wrote:


--
http://rrt.sc3d.org<= /a> --047d7b3433600b750604dbd679b0--