emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Refactor org-set-tags arguments for clarity
Date: Thu, 13 Jul 2017 09:54:17 +0200	[thread overview]
Message-ID: <87pod4zs9i.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAFyQvY1aDNQgnwwtWaC00Z__okrDT_Y0RLbPko-_=tNc+pNZjA@mail.gmail.com> (Kaushal Modi's message of "Wed, 12 Jul 2017 02:46:05 +0000")

Hello,

Kaushal Modi <kaushal.modi@gmail.com> writes:

> I recently started looking at the org-set-tags function in org.el, but then
> quickly got confused with the doc-string.
>
>   "Set the tags for the current headline.
> With prefix ARG, realign all tags in headings in the current buffer.
> When JUST-ALIGN is non-nil, only align tags."
>
> The purpose of ARG and JUST-ALIGN seems to be the exact same from the
> doc-string. On reading the code, I realized that actually ARG should have
> been called JUST-ALIGN and the JUST-ALIGN should have been called
> ALIGN-ONLY-CURRENT.
>
> The attached patch contains the updated doc-string, refactoring of the
> argument names, and renaming of the argument symbol to :align-only-current
> from 'align and 'ignore-column in org-set-tag calls. I have left most of
> the org-set-tags calls untouched where the argument values are simply t
> instead of descriptive 'align or 'ignore-column.
>
> As the patch introduces no functional changes, I have based it off maint.
> "make test" is still passing with these changes.
>
> Can you please review the patch and let me know if it's good for
> committing?

Thank you. LGTM!

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.

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

Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2017-07-13  7:54 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 [this message]
2017-07-13 10:18   ` Kaushal Modi
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=87pod4zs9i.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=kaushal.modi@gmail.com \
    /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).