emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Change in order of tag collation from #+filetags plus heading ta


From: Kaushal Modi
Subject: Re: [O] 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

On Fri, Jan 4, 2019 at 8:15 AM Nicolas Goaziou <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]