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
48
lisp/org.el
48
lisp/org.el
|
@ -5219,29 +5219,31 @@ 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
|
||||||
(cond
|
(let ((e (car tags)))
|
||||||
((equal e "{")
|
(setq tags (cdr tags))
|
||||||
(push '(:startgroup) org-tag-alist)
|
(cond
|
||||||
(setq group-flag t))
|
((equal e "{")
|
||||||
((equal e "}")
|
(push '(:startgroup) org-tag-alist)
|
||||||
(push '(:endgroup) org-tag-alist)
|
(when (equal (nth 1 tags) ":") (setq group-flag t)))
|
||||||
(setq group-flag nil))
|
((equal e "}")
|
||||||
((equal e ":")
|
(push '(:endgroup) org-tag-alist)
|
||||||
(push '(:grouptags) org-tag-alist)
|
(setq group-flag nil))
|
||||||
(setq group-flag 'append))
|
((equal e ":")
|
||||||
((equal e "\\n") (push '(:newline) org-tag-alist))
|
(push '(:grouptags) org-tag-alist)
|
||||||
((string-match (org-re "\\`\\([[:alnum:]_@#%]+\\)\\(?:(\\(.\\))\\)?\\'")
|
(setq group-flag 'append))
|
||||||
e)
|
((equal e "\\n") (push '(:newline) org-tag-alist))
|
||||||
(let ((tag (match-string 1 e))
|
((string-match
|
||||||
(key (and (match-beginning 2)
|
(org-re "\\`\\([[:alnum:]_@#%]+\\)\\(?:(\\(.\\))\\)?\\'") e)
|
||||||
(string-to-char (match-string 2 e)))))
|
(let ((tag (match-string 1 e))
|
||||||
(cond ((eq group-flag 'append)
|
(key (and (match-beginning 2)
|
||||||
(setcar org-tag-groups-alist
|
(string-to-char (match-string 2 e)))))
|
||||||
(append (car org-tag-groups-alist) (list tag))))
|
(cond ((eq group-flag 'append)
|
||||||
(group-flag (push (list tag) org-tag-groups-alist)))
|
(setcar org-tag-groups-alist
|
||||||
(unless (assoc tag org-tag-alist)
|
(append (car org-tag-groups-alist) (list tag))))
|
||||||
(push (cons tag key) org-tag-alist)))))))
|
(group-flag (push (list tag) org-tag-groups-alist)))
|
||||||
|
(unless (assoc tag 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