[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
- Re: [O] [RFC] The "c" Org macro, Kaushal Modi, 2017/06/14
- [O] Add an optional HOLD argument to "n" Org macro (Was: [RFC] The "c" Org macro), Kaushal Modi, 2017/06/14
- Re: [O] Add an optional HOLD argument to "n" Org macro, Nicolas Goaziou, 2017/06/14
- Re: [O] Add an optional HOLD argument to "n" Org macro, Kaushal Modi, 2017/06/15
- Re: [O] Add an optional HOLD argument to "n" Org macro, Kaushal Modi, 2017/06/15
- Re: [O] Add an optional HOLD argument to "n" Org macro, Nicolas Goaziou, 2017/06/15
- Re: [O] Add an optional HOLD argument to "n" Org macro, Kaushal Modi, 2017/06/15
- Re: [O] Add an optional HOLD argument to "n" Org macro, Kaushal Modi, 2017/06/17
- Re: [O] Add an optional HOLD argument to "n" Org macro,
Nicolas Goaziou <=
- Re: [O] Add an optional HOLD argument to "n" Org macro, Kaushal Modi, 2017/06/18
- Re: [O] Add an optional HOLD argument to "n" Org macro, Nicolas Goaziou, 2017/06/18
- Re: [O] Add an optional HOLD argument to "n" Org macro, Kaushal Modi, 2017/06/18
- Re: [O] [RFC] The "c" Org macro, Nicolas Goaziou, 2017/06/14