From mboxrd@z Thu Jan 1 00:00:00 1970 From: Trevor Murphy Subject: Re: [PATCH] org.el: Don't flyspell check within source code blocks Date: Sat, 25 May 2013 03:24:59 -0400 Message-ID: References: <1369466246-5113-1-git-send-email-trevor.m.murphy@gmail.com> <1369466246-5113-2-git-send-email-trevor.m.murphy@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f647b0d56f69204dd85d16b Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ug8qz-0003QE-4y for emacs-orgmode@gnu.org; Sat, 25 May 2013 03:25:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ug8qt-0000O4-UQ for emacs-orgmode@gnu.org; Sat, 25 May 2013 03:25:25 -0400 Received: from mail-vb0-x230.google.com ([2607:f8b0:400c:c02::230]:46471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ug8qt-0000Ny-Qu for emacs-orgmode@gnu.org; Sat, 25 May 2013 03:25:19 -0400 Received: by mail-vb0-f48.google.com with SMTP id w8so2715245vbf.35 for ; Sat, 25 May 2013 00:25:19 -0700 (PDT) In-Reply-To: <1369466246-5113-2-git-send-email-trevor.m.murphy@gmail.com> 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 Cc: Trevor Murphy --e89a8f647b0d56f69204dd85d16b Content-Type: text/plain; charset=ISO-8859-1 Ack, what? Please disregard, I slipped a double negative in somehow. On Sat, May 25, 2013 at 3:17 AM, Trevor Murphy wrote: > * lisp/org.el (org-mode-flyspell-verify): Check if > `org-element-at-point' is of type `src-block', and don't flyspell if > that's the case. > > TINYCHANGE > --- > lisp/org.el | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lisp/org.el b/lisp/org.el > index 94078f9..81428f5 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -23596,7 +23596,8 @@ To get rid of the restriction, use > \\[org-agenda-remove-restriction-lock]." > (not (member-ignore-case word (org-get-export-keywords))) > (not (member-ignore-case > word (mapcar 'car org-element-block-name-alist))) > - (not (member-ignore-case word '("BEGIN" "END" "ATTR")))))) > + (not (member-ignore-case word '("BEGIN" "END" "ATTR"))) > + (not (not (eq (org-element-type (org-element-at-point)) > 'src-block)))))) > > (defun org-remove-flyspell-overlays-in (beg end) > "Remove flyspell overlays in region." > -- > 1.8.2.3 > > --e89a8f647b0d56f69204dd85d16b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Ack, what? =A0Please disregard, I slipped a double negativ= e in somehow.


On Sat, May 25, 2013 at 3:17 AM, Trevor Murphy <= trevor.m.mur= phy@gmail.com> wrote:
* lisp/org.el (org-mode-flyspell-verify): Ch= eck if
=A0 `org-element-at-point' is of type `src-block', and don't fl= yspell if
=A0 that's the case.

TINYCHANGE
---
=A0lisp/org.el | 3 ++-
=A01 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 94078f9..81428f5 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -23596,7 +23596,8 @@ To get rid of the restriction, use \\[org-agenda-re= move-restriction-lock]."
=A0 =A0 =A0 =A0 =A0(not (member-ignore-case word (org-get-export-keywords))= )
=A0 =A0 =A0 =A0 =A0(not (member-ignore-case
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0word (mapcar 'car org-element-block-name= -alist)))
- =A0 =A0 =A0 =A0(not (member-ignore-case word '("BEGIN" &quo= t;END" "ATTR"))))))
+ =A0 =A0 =A0 =A0(not (member-ignore-case word '("BEGIN" &quo= t;END" "ATTR")))
+ =A0 =A0 =A0 =A0(not (not (eq (org-element-type (org-element-at-point)) &#= 39;src-block))))))

=A0(defun org-remove-flyspell-overlays-in (beg end)
=A0 =A0"Remove flyspell overlays in region."
--
1.8.2.3


--e89a8f647b0d56f69204dd85d16b--