From cf97dd81aa94510e5dcd5be478b515c732cd93d4 Mon Sep 17 00:00:00 2001 From: Alex Kosorukoff Date: Thu, 1 May 2014 18:50:43 -0700 Subject: [PATCH] org-capture: fix org-capture to make it save the point position * lisp/org-capture.el (org-capture-fill template) can change the point position in the buffer where capture was invoked, so user may not return to the same place after capture completion --- lisp/org-capture.el | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index c053640..1e3ae5b 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -584,7 +584,9 @@ of the day at point (if any) or the current HH:MM time." (org-current-time))) (org-capture-set-target-location) (condition-case error - (org-capture-put :template (org-capture-fill-template)) + (org-capture-put :template + (save-excursion + (org-capture-fill-template))) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" error))) -- 1.7.0.4