From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: [PATCH] Refactor org-set-tags arguments for clarity Date: Thu, 13 Jul 2017 12:21:32 +0000 Message-ID: References: <87pod4zs9i.fsf@nicolasgoaziou.fr> <87r2xkft0t.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c1cbeb2c241fa055431f91f" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVd8r-0001NQ-Rv for emacs-orgmode@gnu.org; Thu, 13 Jul 2017 08:22:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVd8n-0004OG-M0 for emacs-orgmode@gnu.org; Thu, 13 Jul 2017 08:22:49 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:34805) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVd8n-0004OC-9Q for emacs-orgmode@gnu.org; Thu, 13 Jul 2017 08:22:45 -0400 Received: by mail-lf0-f53.google.com with SMTP id t72so35748711lff.1 for ; Thu, 13 Jul 2017 05:22:45 -0700 (PDT) In-Reply-To: <87r2xkft0t.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: emacs-org list --94eb2c1cbeb2c241fa055431f91f Content-Type: text/plain; charset="UTF-8" On Thu, Jul 13, 2017 at 7:58 AM Nicolas Goaziou wrote: > > Calls in code base do not matter, since we can change them. The above > Sexp would be equivalent to > > (org-set-tags 'current) > Correct. I was just extrapolating based on that, that people could be making similar uses in their configs and packages. A search like this ( https://github.com/search?utf8=%E2%9C%93&q=%22org-set-tags+nil%22+language%3A%22Emacs+Lisp%22&type=Code ) shows that (org-set-tags nil t) is pretty viral in one org-settings.el out there. > > 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 don't think an user needs to distinguish between aligning all and > aligning only current. I think this is just confusing. > That's alright. I can see that it might not be that useful as org-set-tags anyways aligns the tags. (I am just used to abusing the free C-u C-u in my config :)) > > PS: Also, in addition, was thinking of calling JUST-ALIGN ALIGN-ALL > > instead. > > Sounds good. > Thanks. > > With: > > > > (defun org-set-tags (&optional ALIGN-ALL ALIGN-ONLY-CURRENT) .. > > > > it will be more apparent that they are mutually exclusive args. > > It still bugs me because (org-set-tags t t) doesn't make any sense. > Same sentiments here (I even fixed one case of (org-set-tags t t) in that patch). > WDYT? > The only concern is the one I presented above; doing this will break many personal configs. -- Kaushal Modi --94eb2c1cbeb2c241fa055431f91f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Jul 13= , 2017 at 7:58 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

Calls in code base do not matter, since we can change them. The above
Sexp would be equivalent to

=C2=A0 (org-set-tags 'current)

Corr= ect. I was just extrapolating based on that, that people could be making si= milar uses in their configs and packages.=C2=A0

A = search like this ( h= ttps://github.com/search?utf8=3D%E2%9C%93&q=3D%22org-set-tags+nil%22+la= nguage%3A%22Emacs+Lisp%22&type=3DCode=C2=A0) shows that (org-set-ta= gs nil t) is pretty viral in one org-settings.el out there.
=C2= =A0
> instances in the Org source it= self. I though just created a wrapper in my
> personal config to do ALIGN-ONLY-CURRENT when prefix is C-u C-u.

I don't think an user needs to distinguish between aligning all and
aligning only current. I think this is just confusing.

That's alright. I can see that it might not be that use= ful as org-set-tags anyways aligns the tags. (I am just used to abusing the= free C-u C-u in my config :))
=C2=A0
> PS: Also, in addition, was thinking of calling JUST-ALIGN ALI= GN-ALL
> instead.

Sounds good.

Thanks.
=C2=A0
> With:
>
>=C2=A0 =C2=A0 =C2=A0(defun org-set-tags (&optional ALIGN-ALL ALIGN-= ONLY-CURRENT) ..
>
> it will be more apparent that they are mutually exclusive args.

It still bugs me because (org-set-tags t t) doesn't make any sense.
=

Same sentiments here (I even fixed one cas= e of (org-set-tags t t) in that patch).
=C2=A0
WDYT?

The only concer= n is the one I presented above; doing this will break many personal configs= .
--

Kaushal Modi

--94eb2c1cbeb2c241fa055431f91f--