Browse Source

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
Allen S. Rout 11 years ago
parent
commit
f8e6119131
1 changed files with 8 additions and 0 deletions
  1. 8 0
      lisp/org-capture.el

+ 8 - 0
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)