소스 검색

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>
Nicolas Goaziou 6 년 전
부모
커밋
075e79de4f
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      lisp/org-archive.el

+ 2 - 1
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