From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Refactor org-set-tags arguments for clarity Date: Thu, 13 Jul 2017 09:54:17 +0200 Message-ID: <87pod4zs9i.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVYx6-0003OZ-O4 for emacs-orgmode@gnu.org; Thu, 13 Jul 2017 03:54:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVYx5-0000H4-Tt for emacs-orgmode@gnu.org; Thu, 13 Jul 2017 03:54:24 -0400 Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:57519) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVYx5-0000GR-OK for emacs-orgmode@gnu.org; Thu, 13 Jul 2017 03:54:23 -0400 In-Reply-To: (Kaushal Modi's message of "Wed, 12 Jul 2017 02:46:05 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Kaushal Modi Cc: emacs-org list Hello, Kaushal Modi 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