emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>, Matt Lundin <mdl@imapmail.org>
Cc: Nicolas Goaziou <mail@nicolasgoaziou.fr>
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	[thread overview]
Message-ID: <CAFyQvY1eP1KAo-Q8E4eg6kxTHfoYAJmJ8xMjUWBbxOQH32nYiQ@mail.gmail.com> (raw)
In-Reply-To: <87ftu8va0j.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 1669 bytes --]

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 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

[-- Attachment #2: Type: text/html, Size: 2670 bytes --]

  reply	other threads:[~2019-01-04 21:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-03 23:40 Change in order of tag collation from #+filetags plus heading tags [Regression 9.1 -> 9.2] Kaushal Modi
2019-01-04 13:15 ` Nicolas Goaziou
2019-01-04 21:43   ` Kaushal Modi [this message]
2019-01-08 16:41     ` 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=CAFyQvY1eP1KAo-Q8E4eg6kxTHfoYAJmJ8xMjUWBbxOQH32nYiQ@mail.gmail.com \
    --to=kaushal.modi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    --cc=mdl@imapmail.org \
    /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).