From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [RFC] The "c" Org macro Date: Mon, 22 May 2017 15:13:07 +0200 Message-ID: <87d1b1f318.fsf@nicolasgoaziou.fr> 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: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCn96-0002lZ-Fs for emacs-orgmode@gnu.org; Mon, 22 May 2017 09:13:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCn95-0004v0-JT for emacs-orgmode@gnu.org; Mon, 22 May 2017 09:13:12 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:40684) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dCn95-0004um-Cm for emacs-orgmode@gnu.org; Mon, 22 May 2017 09:13:11 -0400 In-Reply-To: (Kaushal Modi's message of "Mon, 22 May 2017 13:00:54 +0000") 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: Kaushal Modi Cc: emacs-orgmode@gnu.org Kaushal Modi writes: > I just tried this out and it works: > > diff --git a/lisp/org-element.el b/lisp/org-element.el > index c60a56ead..4f4fc1e2c 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\\)" ;Don't allow auto-fill to put n macros at This is a wrong approach. A macro doesn't separate paragraphs, but belongs to them. IOW, you get the desired side-effect, but break underlying syntax. A better way to solve this would to add a function to `fill-nobreak-predicate', like we already do for `org-fill-line-break-nobreak-p' or `org-fill-paragraph-with-timestamp-nobreak-p'. I will add it to the "n" macro patch. Thank you. Regards,