diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-06-19 13:44:38 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-06-19 13:44:38 +0200 |
commit | 075e79de4fb372027137297ec0505c6b5caec011 (patch) | |
tree | af91a7c3a52ae135d0dc2317747dfd8793a8731f | |
parent | 9ff77b1e579b78c06a3923ef7b710562fdb98614 (diff) | |
download | org-mode-075e79de4fb372027137297ec0505c6b5caec011.tar.gz |
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>
-rw-r--r-- | lisp/org-archive.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-archive.el b/lisp/org-archive.el index 94579f6..3214d09 100644 --- a/lisp/org-archive.el +++ b/lisp/org-archive.el @@ -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 |