ソースを参照

Widen to remove possible restrictions in target buffer

* org-capture.el (org-capture-place-template): Widen to remove
possible restrictions in target buffer.

Jules Bean wrote:
>If I run org-capture with the template:

>("t" "Todo" entry (file+headline
>"/Users/jules/work/TODO.org" "Tasks") "* TODO %?
>  (Captured at %u)
>  %i
>  %a
>")

>whilst I have narrowed (using, e.g., org-narrow-to-subtree) the buffer
>that contains TODO.org, a new "* Tasks" headline is inserted at the
>end of my narrowing and the new entry is added there, which messes up
>the hierarchy of the file.
David Maus 14 年 前
コミット
215749b3d8
1 ファイル変更1 行追加0 行削除
  1. 1 0
      lisp/org-capture.el

+ 1 - 0
lisp/org-capture.el

@@ -681,6 +681,7 @@ already gone."
   (delete-other-windows)
   (delete-other-windows)
   (org-switch-to-buffer-other-window
   (org-switch-to-buffer-other-window
    (org-capture-get-indirect-buffer (org-capture-get :buffer) "CAPTURE"))
    (org-capture-get-indirect-buffer (org-capture-get :buffer) "CAPTURE"))
+  (widen)
   (show-all)
   (show-all)
   (goto-char (org-capture-get :pos))
   (goto-char (org-capture-get :pos))
   (org-set-local 'org-capture-target-marker
   (org-set-local 'org-capture-target-marker