emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Refactor org-set-tags arguments for clarity
Date: Thu, 13 Jul 2017 10:18:25 +0000	[thread overview]
Message-ID: <CAFyQvY1ECiNyyRTUi-AQH-8H8-Xu=sU_S-fW2iurgVWwm-fB0w@mail.gmail.com> (raw)
In-Reply-To: <87pod4zs9i.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]

On Thu, Jul 13, 2017, 3:54 AM Nicolas Goaziou <mail@nicolasgoaziou.fr>
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

[-- Attachment #2: Type: text/html, Size: 2215 bytes --]

  reply	other threads:[~2017-07-13 10:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12  2:46 [PATCH] Refactor org-set-tags arguments for clarity Kaushal Modi
2017-07-13  7:54 ` Nicolas Goaziou
2017-07-13 10:18   ` Kaushal Modi [this message]
2017-07-13 11:58     ` Nicolas Goaziou
2017-07-13 12:21       ` Kaushal Modi
2017-07-13 12:31         ` Nicolas Goaziou
2017-07-13 12:37           ` Kaushal Modi
2017-07-13 12:39             ` Kaushal Modi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFyQvY1ECiNyyRTUi-AQH-8H8-Xu=sU_S-fW2iurgVWwm-fB0w@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).