emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [PATCH] Refactor org-set-tags arguments for clarity


From: Kaushal Modi
Subject: Re: [O] [PATCH] Refactor org-set-tags arguments for clarity
Date: Thu, 13 Jul 2017 10:18:25 +0000

On Thu, Jul 13, 2017, 3:54 AM Nicolas Goaziou <address@hidden> wrote:
Thank you. LGTM!

Thanks. 

Actually, I think ALIGN-ONLY-CURRENT could be merged with JUST-ALIGN,
which would have three cases (e.g., t, nil, `current'). Perhaps
 the
incompatibility it introduces is not acceptable though.

I was itching to do that. But there are dozens of (org-set-tags nil t) instances in the Org source itself. I though just created a wrapper in my personal config to do ALIGN-ONLY-CURRENT when prefix is C-u C-u.

I can do the same in the source too, while keeping the argument order as it is. I can use current-prefix-arg to override the value of JUST-ALIGN to nil and ALIGN-ONLY-CURRENT to t internally for interactive use. The elisp use of this function will stay unchanged. I'll apply this piece just to the master if you like.  

While you're at it, what about throwing in some test in
"test-org/set-tags"? ;)

Will do. 

PS: Also, in addition, was thinking of calling JUST-ALIGN ALIGN-ALL instead. 

With:

    (defun org-set-tags (&optional ALIGN-ALL ALIGN-ONLY-CURRENT) ..

it will be more apparent that they are mutually exclusive args. 

WDYT?
--

Kaushal Modi


reply via email to

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