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

2017-06-18 Thread Kaushal Modi
Hello Nicolas, On Sun, Jun 18, 2017, 3:16 AM Nicolas Goaziou wrote: > > As I said, I was only nitpicking. Feel free to fix it, or not. > OK, thanks for confirming. I'll leave out this edit then. > -- Kaushal Modi

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

2017-06-18 Thread Nicolas Goaziou
Hello, Kaushal Modi writes: > Thanks. I pushed the patch, but I missed making the when -> and change. Do > you want me to fix that in another commit? Though, functionally they are > the same, and 'make test' is passing. As I said, I was only nitpicking. Feel free to fix it, or not. Regards, -

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

2017-06-17 Thread Kaushal Modi
On Sat, Jun 17, 2017 at 7:25 PM Nicolas Goaziou wrote: > Hello, > > Thank you. LGTM. I only have nitpicks. > Thanks! > > + (let ((action-trimmed (when (org-string-nw-p action) > > + (org-trim action))) > > (and (org-string-nw-p action) ...) > Ah! I forgot making th

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

2017-06-17 Thread Nicolas Goaziou
Hello, Kaushal Modi 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 incr

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

2017-06-17 Thread Kaushal Modi
Hello Nicolas, Just pinging to check if the patch in the previous email got missed. Apologies if you were already reviewing it. Thanks. On Thu, Jun 15, 2017, 2:07 PM Kaushal Modi wrote: > On Thu, Jun 15, 2017 at 12:07 PM Nicolas Goaziou > wrote: > >> We do not need this dependency. In partic

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

2017-06-15 Thread Kaushal Modi
On Thu, Jun 15, 2017 at 12:07 PM Nicolas Goaziou wrote: > We do not need this dependency. In particular, there is already > `org-trim'. > OK, switch from string-trim to org-trim. Thanks. > It is confusing to provide two ways to achieve the same action. I'd > rather have "-" only. > OK. > Co

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

2017-06-15 Thread Nicolas Goaziou
Hello, Kaushal Modi writes: > On Thu, Jun 15, 2017 at 9:10 AM Kaushal Modi wrote: > >> The patch based off latest master is attached. Please review. Thank you. Some comments follow. > This patch adds a dependency on subr-x library for string-trim function > that was added in emacs 24.4. We d

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

2017-06-15 Thread Kaushal Modi
On Thu, Jun 15, 2017 at 9:10 AM Kaushal Modi wrote: > The patch based off latest master is attached. Please review. > Here's the same patch with one fix.. support white space around the "-"/"hold" arg. This patch adds a dependency on subr-x library for string-trim function that was added in ema

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

2017-06-15 Thread Kaushal Modi
On Wed, Jun 14, 2017 at 3:47 PM Nicolas Goaziou wrote: > I think it is better since resetting, setting and holding are mutually > exclusive. Thanks. > With tests, please! :) > Of course :) The patch based off latest master is attached. Please review. -- Kaushal Modi 0001-Add-hold-action

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

2017-06-14 Thread Nicolas Goaziou
Kaushal Modi 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 bette

[O] Add an optional HOLD argument to "n" Org macro (Was: [RFC] The "c" Org macro)

2017-06-14 Thread Kaushal Modi
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. = * Week {{{n(wk)}}}: Python Basics # 1 ** {{{n}}}. Introduction to Python # 1 ** {{{n}}}. Core Elements of Programs # 2 *** {{{n(,,hold)}}}.{{{n(topic,rese