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: Sun, 18 Jun 2017 01:24:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hello,

Kaushal Modi <address@hidden> writes:

> Revised patch is attached.

Thank you. LGTM. I only have nitpicks.

> +NAME is a string identifying the counter.
> +
> +When non-nil, optional argument ACTION is a string.
> +
> +If the string is \"-\", keep the NAME counter at its current
> +value, i.e. do not increment.
> +
> +If the string represents an integer, set the counter to this number.
> +
> +Any other non-empty string resets the counter to 1."

> +  (let ((action-trimmed (when (org-string-nw-p action)
> +                          (org-trim action)))

  (and (org-string-nw-p action) ...)

> +        (name-trimmed (when (org-string-nw-p name)
> +                        (org-trim name))))

  (and (org-string-nw-p name) ...)

However, NAME is always a string, so it could simply be

  (name-trimmed (org-trim-name))

and since you use it only once, I would simply do the suggestion below...

> +    (puthash name-trimmed

... which is

   (puthash (org-trim name))

You can push it whenever you think it is good enough.

Regards,

-- 
Nicolas Goaziou                                                0x80A93738



reply via email to

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