emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [RFC] The "c" Org macro


From: Nicolas Goaziou
Subject: Re: [O] [RFC] The "c" Org macro
Date: Mon, 22 May 2017 15:13:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Kaushal Modi <address@hidden> 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,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]