Kaynağa Gözat

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 14 yıl önce
ebeveyn
işleme
f8e6119131
1 değiştirilmiş dosya ile 8 ekleme ve 0 silme
  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)