[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Refactor org-set-tags arguments for clarity
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [PATCH] Refactor org-set-tags arguments for clarity |
Date: |
Thu, 13 Jul 2017 09:54:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hello,
Kaushal Modi <address@hidden> 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
- [O] [PATCH] Refactor org-set-tags arguments for clarity, Kaushal Modi, 2017/07/11
- Re: [O] [PATCH] Refactor org-set-tags arguments for clarity,
Nicolas Goaziou <=
- Re: [O] [PATCH] Refactor org-set-tags arguments for clarity, Kaushal Modi, 2017/07/13
- Re: [O] [PATCH] Refactor org-set-tags arguments for clarity, Nicolas Goaziou, 2017/07/13
- Re: [O] [PATCH] Refactor org-set-tags arguments for clarity, Kaushal Modi, 2017/07/13
- Re: [O] [PATCH] Refactor org-set-tags arguments for clarity, Nicolas Goaziou, 2017/07/13
- Re: [O] [PATCH] Refactor org-set-tags arguments for clarity, Kaushal Modi, 2017/07/13
- Re: [O] [PATCH] Refactor org-set-tags arguments for clarity, Kaushal Modi, 2017/07/13