From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Change in order of tag collation from #+filetags plus heading tags [Regression 9.1 -> 9.2] Date: Fri, 4 Jan 2019 16:43:03 -0500 Message-ID: References: <87ftu8va0j.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c50879057ea8c575" Return-path: Received: from [208.118.235.92] (port=58318 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfXG5-0000ew-AI for emacs-orgmode@gnu.org; Fri, 04 Jan 2019 16:44:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfXFv-0007QR-I1 for emacs-orgmode@gnu.org; Fri, 04 Jan 2019 16:43:53 -0500 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:45926) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gfXFr-0007Nl-LE for emacs-orgmode@gnu.org; Fri, 04 Jan 2019 16:43:49 -0500 Received: by mail-lf1-x134.google.com with SMTP id b20so26351807lfa.12 for ; Fri, 04 Jan 2019 13:43:42 -0800 (PST) In-Reply-To: <87ftu8va0j.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: emacs-org list , Matt Lundin Cc: Nicolas Goaziou --000000000000c50879057ea8c575 Content-Type: text/plain; charset="UTF-8" On Fri, Jan 4, 2019 at 8:15 AM Nicolas Goaziou wrote: > > The order of tags is unspecified, either in the docstring, in the > manual, or in the syntax. So it doesn't really matter. > This regression was caught by one of the ox-hugo tests. I'd to like to fix it to the former tag order because I think it makes sense to have the #+filetags tags in the very beginning instead of embedding it between the parent heading tags and local tags. > Feel free to provide a patch if it bothers you. > Here is the proposed rough patch; locally I also have a test ready that tests this regression. ===== diff --git a/lisp/org.el b/lisp/org.el index 2273a6997..15744704a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -14607,11 +14607,11 @@ Inherited tags have the `inherited' text property." (org-back-to-heading t) (let ((ltags (org--get-local-tags)) itags) (if (or local (not org-use-tag-inheritance)) ltags - (setq itags org-file-tags) (while (org-up-heading-safe) (setq itags (append (mapcar #'org-add-prop-inherited (org--get-local-tags)) itags))) + (setq itags (append org-file-tags itags)) (delete-dups (append (org-remove-uninherited-tags itags) ltags)))))))) ===== I am also copying Matt Lundin as I believe that this commit[1] caused this regression. If above looks good, I will go ahead the commit this patch with test, proper commit log, etc. Thanks for reviewing. [1]: https://code.orgmode.org/bzg/org-mode/commit/5e27b2fd326810e4ed876b094df852338909c1f8 --000000000000c50879057ea8c575 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Jan 4, 2019 at 8:15 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:=

The order of tags is unspecified, either in the docstring, in the
manual, or in the syntax. So it doesn't really matter.
=

This regression was caught by one of the ox-hugo tests.= I'd to like to fix it to the former tag order because I think it makes= sense to have the #+filetags tags in the very beginning instead of embeddi= ng it between the parent heading tags and local tags.
=C2=A0<= /div>
Feel free to provide a patch if it bothers you.

Here is the proposed rough patch; locally I also have a test ready= that tests this regression.

=3D=3D=3D=3D=3D
=
diff --git a/lisp/org.el b/lisp/org.el
index 2273a6997..15744704a 1= 00644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14607,11 +14607,11 @= @ Inherited tags have the `inherited' text property."
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (org-back-to-heading t)
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (let ((ltags (org--get-local-tag= s)) itags)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = (if (or local (not org-use-tag-inheritance)) ltags
-=C2=A0=C2=A0=C2=A0 = =C2=A0=C2=A0=C2=A0 (setq itags org-file-tags)
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (while (org-up-heading-saf= e)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 (setq itags (append (mapcar #'org-add-prop-inherited=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (org--get-local-tags))
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 itags)))
+=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (setq itags (append org-file-tag= s itags))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (delete-dups
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (append (org-remove-uninherited-tags itag= s) ltags))))))))
=3D=3D=3D=3D=3D

I am also copy= ing Matt Lundin as I believe that this commit[1] caused this regression.

If above looks good, I will go ahead the commit this= patch with test, proper commit log, etc.

Thanks f= or reviewing.


--000000000000c50879057ea8c575--