org.el (org-set-regexps-and-options-for-tags): Fix the setting of tag groups when relying on `org-tag-alist'

* org.el (org-set-regexps-and-options-for-tags): Fix the
setting of tag groups when relying on `org-tag-alist', not on
tags directly set in the buffer with the #+TAGS option.

Thanks to Maurice for reporting this.
This commit is contained in:
Bastien Guerry 2013-07-06 16:15:18 +02:00
parent 0aa0fdd971
commit 4269178827
1 changed files with 41 additions and 33 deletions

View File

@ -4834,8 +4834,16 @@ Support for group tags is controlled by the option
(mapcar 'org-add-prop-inherited ftags)))
(org-set-local 'org-tag-groups-alist nil)
;; Process the tags.
;; FIXME
(when tags
(when (and (not tags) org-tag-alist)
(setq tags
(mapcar
(lambda (tg) (cond ((eq (car tg) :startgroup) "{")
((eq (car tg) :endgroup) "}")
((eq (car tg) :grouptags) ":")
(t (concat (car tg)
(if (characterp (cdr tg))
(format "(%s)" (char-to-string (cdr tg))) "")))))
org-tag-alist)))
(let (e tgs g)
(while (setq e (pop tags))
(cond
@ -4868,7 +4876,7 @@ Support for group tags is controlled by the option
(assoc (car e) org-tag-alist))
(push e org-tag-alist)))
;; Return a list with tag variables
(list org-file-tags org-tag-alist org-tag-groups-alist))))))
(list org-file-tags org-tag-alist org-tag-groups-alist)))))
(defvar org-ota nil)
(defun org-set-regexps-and-options ()