emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [ox-publish] handling of white space in arguments of macros, nam


From: Achim Gratz
Subject: Re: [O] [ox-publish] handling of white space in arguments of macros, named arguments?
Date: Thu, 28 Mar 2013 18:44:11 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130307 Thunderbird/17.0.4

Am 28.03.2013 17:22, schrieb Nicolas Goaziou:
My point is that macro templates have to fit in a single line, no
newline character allowed. As a consequence, macro arguments are
implicitly expected to fit in a single line. So a newline character in
an argument is probably wrong.

My point is that the form of the template really doesn't tell you much about the (possibly recursive) expansion and since the feature is relatively new there is absolutely no data to determine if such an assumption would restrict macros too much. I can certainly see good uses of linebreaks in macro expansions.

The current trend for macros is to be really simple so that advanced
(and not-so advanced) tasks are done with Babel instead. IOW, macros are
only useful if they are simpler than the simplest form of Babel usage.

In this case, you probly can't or how do you get linebreaks into arguments of a Babel call (not using escape sequences)?

In every other case, Babel is a superior choice.

I think that there is some middle ground to cover here. There is no reason to ask for confirmation in the example you gave for the vcard insertion, for example. All it does is a simple template expansion, in other words it acts like a multi-line macro definition with named parameters.

Your suggestion is interesting, but I think it would go backwards wrt
this.

Babel is very nice, but I don't think we should foist it onto everyone, there are good reasons to stick to plain Org in some situations. The evaluation confirmation should get a bit smarter, too, but I don't see how to do that easily (I've already looked). The way things work at the moment you have to globally switch off confirmation for all but the most simple uses of Babel.


Regards,
--
Achim.

(on the road :-)




reply via email to

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