From f8e611913144830cb60a2af545a9b7f1515fc7fd Mon Sep 17 00:00:00 2001 From: "Allen S. Rout" Date: Thu, 18 Nov 2010 22:32:53 +0000 Subject: [PATCH] New hook to run after finalizing capture, suitable for deleting a frame * lisp/org-capture.el (org-capture-after-finalize-hook): New hook. (org-capture-finalize): Run the new hook. TINYCHANGE --- lisp/org-capture.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index c707e9c26..a5c6a4d8e 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -319,6 +319,12 @@ The remember buffer is still current when this hook runs." :group 'org-capture :type 'hook) +(defcustom org-capture-after-finalize-hook nil + "Hook that is run right after a capture process is finalized. + Suitable for window cleanup" + :group 'org-capture + :type 'hook) + ;;; The property list for keeping information about the capture process (defvar org-capture-plist nil @@ -554,6 +560,8 @@ bypassed." ;; Restore the window configuration before capture (set-window-configuration return-wconf)) + + (run-hooks 'org-capture-after-finalize-hook) (when abort-note (cond ((equal abort-note 'clean)