From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: [RFC] The "c" Org macro Date: Mon, 22 May 2017 13:10:55 +0000 Message-ID: References: <2ee94a64a94b46259b0da6e7d34675c9@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87y3u7o3dj.fsf@t3610> <87pofjtk4b.fsf@t3610> <2069df8c23bc43f3b04b6e203b96be9d@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87r2zvpyst.fsf@delle7240> <8760guib5i.fsf@nicolasgoaziou.fr> <87h90dh1pd.fsf@nicolasgoaziou.fr> <87tw4df6zr.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c19d2229229d205501c9ac4" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCn79-00017E-La for emacs-orgmode@gnu.org; Mon, 22 May 2017 09:11:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCn75-0004Ml-Qm for emacs-orgmode@gnu.org; Mon, 22 May 2017 09:11:11 -0400 Received: from mail-lf0-x234.google.com ([2a00:1450:4010:c07::234]:35906) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCn75-0004LC-KM for emacs-orgmode@gnu.org; Mon, 22 May 2017 09:11:07 -0400 Received: by mail-lf0-x234.google.com with SMTP id h4so30899175lfj.3 for ; Mon, 22 May 2017 06:11:07 -0700 (PDT) In-Reply-To: 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" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org --94eb2c19d2229229d205501c9ac4 Content-Type: text/plain; charset="UTF-8" This prevents false n-macro matches.. added \\b after "{{{n". diff --git a/lisp/org-element.el b/lisp/org-element.el index c60a56ead..2bee85ede 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -181,7 +181,9 @@ specially in `org-element--object-lex'.") (?\) ")") (?. "\\.") (_ "[.)]"))) (alpha (and org-list-allow-alphabetical "\\|[A-Za-z]"))) (concat "\\(?:[-+*]\\|\\(?:[0-9]+" alpha "\\)" term "\\)" - "\\(?:[ \t]\\|$\\)")) + "\\(?:[ \t]\\|$\\)")) "\\|" + ;; n Macro + "\\(?:{{{n\\b\\)" ;Don't allow auto-fill to put n macros at BOL "\\)\\)") org-element--object-regexp (mapconcat #'identity -- Kaushal Modi --94eb2c19d2229229d205501c9ac4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This prevents false n-macro matches.. added \\b after &quo= t;{{{n".

diff --git a/lisp/org-element.el b/li= sp/org-element.el
index c60a56ead..2bee85ede 100644
---= a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -18= 1,7 +181,9 @@ specially in `org-element--object-lex'.")
= =C2=A0 = =C2=A0 =C2=A0 =C2=A0(?\) ")") (?. "\\.") (_ "[.)]&= quot;)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(alpha (and org-list-allow-alphabetica= l "\\|[A-Za-z]")))
=C2=A0 =C2=A0(concat "\\(?:[-+*]\\|\\(?:= [0-9]+" alpha "\\)" term "\\)"
- =C2=A0"\\(= ?:[ \t]\\|$\\)"))
+ =C2=A0"\\(?:[ \t]\\|$\\)")) "\\|&= quot;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;;= n Macro
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0"\\(?:{{{n\\b\\)" ;Don't allow auto-fill to put n macros a= t BOL
=C2=A0 "\\)\\)")
=C2=A0 org-element--object-regexp
=C2=A0 (ma= pconcat #'identity

-- =

Kaushal Mo= di

--94eb2c19d2229229d205501c9ac4--