Fix infloop with multiple tags

* lisp/org.el (org--setup-collect-keywords): Fix infloop when parsing
  multiple tags.

Reported-by: Kyle Meyer <kyle@kyleam.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/92245>
This commit is contained in:
Nicolas Goaziou 2014-11-01 11:53:46 +01:00
parent aa1fd698ec
commit 17d014ec65
1 changed files with 5 additions and 5 deletions

View File

@ -5134,7 +5134,7 @@ Return value contains the following keys: `archive', `category',
(new (apply #'nconc (new (apply #'nconc
(mapcar (lambda (x) (org-split-string x ":")) (mapcar (lambda (x) (org-split-string x ":"))
(org-split-string value))))) (org-split-string value)))))
(if old (setcdr old (nconc new (cdr old))) (if old (setcdr old (append new (cdr old)))
(push (cons 'filetags new) alist))))) (push (cons 'filetags new) alist)))))
((equal key "LINK") ((equal key "LINK")
(when (string-match "\\`\\(\\S-+\\)[ \t]+\\(.+\\)" value) (when (string-match "\\`\\(\\S-+\\)[ \t]+\\(.+\\)" value)
@ -5162,15 +5162,15 @@ Return value contains the following keys: `archive', `category',
(let ((startup (assq 'startup alist))) (let ((startup (assq 'startup alist)))
(if startup (if startup
(setcdr startup (setcdr startup
(nconc (cdr startup) (org-split-string value))) (append (cdr startup) (org-split-string value)))
(push (cons 'startup (org-split-string value)) alist)))) (push (cons 'startup (org-split-string value)) alist))))
((equal key "TAGS") ((equal key "TAGS")
(let ((tag-cell (assq 'tags alist))) (let ((tag-cell (assq 'tags alist)))
(if tag-cell (if tag-cell
(setcdr tag-cell (setcdr tag-cell
(nconc (cdr tag-cell) (append (cdr tag-cell)
'("\\n") '("\\n")
(org-split-string value))) (org-split-string value)))
(push (cons 'tags (org-split-string value)) alist)))) (push (cons 'tags (org-split-string value)) alist))))
((member key '("TODO" "SEQ_TODO" "TYP_TODO")) ((member key '("TODO" "SEQ_TODO" "TYP_TODO"))
(let ((todo (assq 'todo alist)) (let ((todo (assq 'todo alist))