瀏覽代碼

Merge branch 'maint'

Nicolas Goaziou 10 年之前
父節點
當前提交
5565645f75
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      lisp/org-capture.el

+ 5 - 2
lisp/org-capture.el

@@ -792,7 +792,10 @@ already gone.  Any prefix argument will be passed to the refile command."
      "Refiling from a capture buffer makes only sense for `entry'-type templates"))
   (let ((pos (point))
 	(base (buffer-base-buffer (current-buffer)))
-	(org-refile-for-capture t))
+	(org-refile-for-capture t)
+	(kill-buffer (org-capture-get :kill-buffer 'local)))
+    (org-capture-put :kill-buffer nil)
+    (org-capture-finalize)
     (save-window-excursion
       (with-current-buffer (or base (current-buffer))
 	(save-excursion
@@ -800,7 +803,7 @@ already gone.  Any prefix argument will be passed to the refile command."
 	    (widen)
 	    (goto-char pos)
 	    (call-interactively 'org-refile)))))
-    (org-capture-finalize)))
+    (when kill-buffer (kill-buffer base))))
 
 (defun org-capture-kill ()
   "Abort the current capture process."