emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] Possibility of using alternative separators in macros


From: Maxim Nikulin
Subject: Re: [PATCH] Possibility of using alternative separators in macros
Date: Sun, 16 May 2021 23:48:09 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 16/05/2021 19:17, Bastien wrote:

Juan Manuel Macías writes:

(On the other hand, maybe better than an alternate separator, some kind of
warning for unescaped commas might be more useful, as Maxim commented
here: https://orgmode.org/list/s7gfc6@ciao.gmane.io/)

Yes, probably -- feel free to propose a patch for this.  Thanks!

Such warnings should be property of particular macros. Sometimes ignoring of arguments may be handy. So no patch is required. The trick could be documented somewhere, but I am unsure concerning proper place. Actually, I do not think, fatal error is user-friendly behavior. I am not aware if export already have convenient facilities to report warnings. Currently I do not feel I am ready to implement such feature if it does not exist yet.

However the point of that message was that extra commas may be made "transparent" for macros by introducing additional substitution, e.g. "$_" that expands into "rest" arguments. I consider "$@" or "$*" as worse variant since it rather mean "all arguments", so it is less flexible. For "eval" lisp macros, it is just replacing "_" by "$_" in argument list. Simple text macros require a bit more work but it is still comparable with documenting the feature.

We need a decision if "rest arguments" feature should be introduced. Once added, it will be harder to discard it due to compatibility issues.






reply via email to

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