org-archive: Do not create multiple archive subtrees

* lisp/org-archive.el (org-archive-subtree): Fix regexp.

Reported-by: Bernt Hansen <bernt@norang.ca>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00056.html>
This commit is contained in:
Nicolas Goaziou 2018-06-19 13:44:38 +02:00
parent 9ff77b1e57
commit 075e79de4f
1 changed files with 2 additions and 1 deletions

View File

@ -325,7 +325,8 @@ direct children of this heading."
(if (and heading (not (and datetree-date (not datetree-subheading-p))))
(progn
(if (re-search-forward
(concat "^" (regexp-quote heading) org-tag-group-re)
(concat "^" (regexp-quote heading)
"\\([ \t]+:\\(" org-tag-re ":\\)+\\)?[ \t]*$")
nil t)
(goto-char (match-end 0))
;; Heading not found, just insert it at the end