emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Add an optional HOLD argument to "n" Org macro


From: Nicolas Goaziou
Subject: Re: [O] Add an optional HOLD argument to "n" Org macro
Date: Wed, 14 Jun 2017 21:47:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Kaushal Modi <address@hidden> writes:

> I was writing something along the lines of this when I needed to specify
> the n macro to hold its previous value and not increment at all.

[...]

> I haven't yet created a proper formatted patch, because I don't know if
> this is the best implementation. Would it be better to rename the RESET
> option to something more generic, like ARG? That way,
>
> - If ARG is a "-" string, the counter value will be held and not
> incremented.
> - If ARG is a number represented as a string, it set the NAME counter to
> that value (like now).
> - Else if ARG is a non-empty string, it resets the NAME counter to 1 (like
> now).

I think it is better since resetting, setting and holding are mutually
exclusive. With tests, please! :)

Regards,



reply via email to

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