ox: Fix "wrong type argument listp" when filtering tags
* lisp/org.el (org--setup-process-tags): Fill `org-tag-groups-alist' only when group tags are defined. Reported-by: Elric Milon <emacs@whirm.eu> <http://permalink.gmane.org/gmane.emacs.orgmode/92406>
This commit is contained in:
parent
a2f8a48ab5
commit
f49833293a
12
lisp/org.el
12
lisp/org.el
|
@ -5219,11 +5219,13 @@ FILETAGS is a list of tags, as strings."
|
||||||
(org-set-local 'org-tag-groups-alist nil)
|
(org-set-local 'org-tag-groups-alist nil)
|
||||||
(org-set-local 'org-tag-alist nil)
|
(org-set-local 'org-tag-alist nil)
|
||||||
(let (group-flag)
|
(let (group-flag)
|
||||||
(dolist (e tags)
|
(while tags
|
||||||
|
(let ((e (car tags)))
|
||||||
|
(setq tags (cdr tags))
|
||||||
(cond
|
(cond
|
||||||
((equal e "{")
|
((equal e "{")
|
||||||
(push '(:startgroup) org-tag-alist)
|
(push '(:startgroup) org-tag-alist)
|
||||||
(setq group-flag t))
|
(when (equal (nth 1 tags) ":") (setq group-flag t)))
|
||||||
((equal e "}")
|
((equal e "}")
|
||||||
(push '(:endgroup) org-tag-alist)
|
(push '(:endgroup) org-tag-alist)
|
||||||
(setq group-flag nil))
|
(setq group-flag nil))
|
||||||
|
@ -5231,8 +5233,8 @@ FILETAGS is a list of tags, as strings."
|
||||||
(push '(:grouptags) org-tag-alist)
|
(push '(:grouptags) org-tag-alist)
|
||||||
(setq group-flag 'append))
|
(setq group-flag 'append))
|
||||||
((equal e "\\n") (push '(:newline) org-tag-alist))
|
((equal e "\\n") (push '(:newline) org-tag-alist))
|
||||||
((string-match (org-re "\\`\\([[:alnum:]_@#%]+\\)\\(?:(\\(.\\))\\)?\\'")
|
((string-match
|
||||||
e)
|
(org-re "\\`\\([[:alnum:]_@#%]+\\)\\(?:(\\(.\\))\\)?\\'") e)
|
||||||
(let ((tag (match-string 1 e))
|
(let ((tag (match-string 1 e))
|
||||||
(key (and (match-beginning 2)
|
(key (and (match-beginning 2)
|
||||||
(string-to-char (match-string 2 e)))))
|
(string-to-char (match-string 2 e)))))
|
||||||
|
@ -5241,7 +5243,7 @@ FILETAGS is a list of tags, as strings."
|
||||||
(append (car org-tag-groups-alist) (list tag))))
|
(append (car org-tag-groups-alist) (list tag))))
|
||||||
(group-flag (push (list tag) org-tag-groups-alist)))
|
(group-flag (push (list tag) org-tag-groups-alist)))
|
||||||
(unless (assoc tag org-tag-alist)
|
(unless (assoc tag org-tag-alist)
|
||||||
(push (cons tag key) org-tag-alist)))))))
|
(push (cons tag key) org-tag-alist))))))))
|
||||||
(setq org-tag-alist (nreverse org-tag-alist)))
|
(setq org-tag-alist (nreverse org-tag-alist)))
|
||||||
|
|
||||||
(defun org-file-contents (file &optional noerror)
|
(defun org-file-contents (file &optional noerror)
|
||||||
|
|
Loading…
Reference in New Issue