From a3490b140dd01b6737c0130651ba09ee5d0c8b21 Mon Sep 17 00:00:00 2001 From: John Foerch Date: Tue, 20 Nov 2012 15:25:04 -0500 Subject: [PATCH] org-store-log-note: access org-log-note-headings in org buffer This change allows org-mode to respect a buffer-local value of org-log-note-headings, by accessing its value in the org buffer instead of in the "*Org Note*" buffer. --- lisp/org.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index e3354c662..2ae3b90b9 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12732,10 +12732,10 @@ EXTRA is additional text that will be inserted into the notes buffer." (defvar org-note-abort nil) ; dynamically scoped (defun org-store-log-note () "Finish taking a log note, and insert it to where it belongs." - (let ((txt (buffer-string)) - (note (cdr (assq org-log-note-purpose org-log-note-headings))) - lines ind bul) + (let ((txt (buffer-string))) (kill-buffer (current-buffer)) + (let ((note (cdr (assq org-log-note-purpose org-log-note-headings))) + lines ind bul) (while (string-match "\\`# .*\n[ \t\n]*" txt) (setq txt (replace-match "" t t txt))) (if (string-match "\\s-+\\'" txt) @@ -12802,7 +12802,7 @@ EXTRA is additional text that will be inserted into the notes buffer." (insert (pop lines)))) (message "Note stored") (org-back-to-heading t) - (org-cycle-hide-drawers 'children))))) + (org-cycle-hide-drawers 'children)))))) (set-window-configuration org-log-note-window-configuration) (with-current-buffer (marker-buffer org-log-note-return-to) (goto-char org-log-note-return-to)) -- 2.11.4.GIT