From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?S=C3=A9bastien?= Delafond Subject: Re: [patch] Do not run flyspell checks on org keywords Date: Tue, 31 May 2011 13:14:31 +0000 (UTC) Message-ID: <20110531151405.915@usenet.piggo.com> References: <20110524101004.681@usenet.piggo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QROma-0000fS-RD for emacs-orgmode@gnu.org; Tue, 31 May 2011 09:14:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QROmW-0006uP-UT for emacs-orgmode@gnu.org; Tue, 31 May 2011 09:14:52 -0400 Received: from lo.gmane.org ([80.91.229.12]:36413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QROmW-0006uJ-Kp for emacs-orgmode@gnu.org; Tue, 31 May 2011 09:14:48 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QROmS-0007yP-T3 for emacs-orgmode@gnu.org; Tue, 31 May 2011 15:14:44 +0200 Received: from 74.123.29.134 ([74.123.29.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 May 2011 15:14:44 +0200 Received: from sdelafond by 74.123.29.134 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 May 2011 15:14:44 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org No one interested in this one ? :) Cheers, --Seb On 2011-05-24, Sébastien Delafond wrote: > > Here is a small patch that prevents flyspelle from checking all the Org > keywords. This is especially useful when using a dictionary other than > english. > > Cheers, > > --Seb > > From 0a6493331f1d84a4c44533bdea1c3c9b41c997eb Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?S=C3=A9bastien=20Delafond?= > Date: Mon, 23 May 2011 18:16:57 +0200 > Subject: [PATCH] [flyspell] Do not run flyspell-checks on {todo,all-time,additional-option-like}-keywords > > * this is useful when using flyspell with a non-English dictionary, > or if some of your keywords are in another language > --- > lisp/org.el | 12 +++++++++--- > 1 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/lisp/org.el b/lisp/org.el > index 9f8fa92..676f08f 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -20135,9 +20135,15 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]." > > ;; Make flyspell not check words in links, to not mess up our keymap > (defun org-mode-flyspell-verify () > - "Don't let flyspell put overlays at active buttons." > - (and (not (get-text-property (max (1- (point)) (point-min)) 'keymap)) > - (not (get-text-property (max (1- (point)) (point-min)) 'org-no-flyspell)))) > + "Don't let flyspell put overlays at active buttons, or on > + {todo,all-time,additional-option-like}-keywords." > + (let ((pos (max (1- (point)) (point-min))) > + (word (thing-at-point 'word))) > + (and (not (get-text-property pos 'keymap)) > + (not (get-text-property pos 'org-no-flyspell)) > + (not (member word org-todo-keywords-1)) > + (not (member word org-all-time-keywords)) > + (not (member word org-additional-option-like-keywords))))) > > (defun org-remove-flyspell-overlays-in (beg end) > "Remove flyspell overlays in region."