Merge pull request #3213 from wedens/org-capture-frame-refile
Prevent doom-capture frame from closing when refiling
This commit is contained in:
commit
af91af01fa
2 changed files with 6 additions and 1 deletions
|
@ -23,7 +23,8 @@
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +org-capture-cleanup-frame-h ()
|
(defun +org-capture-cleanup-frame-h ()
|
||||||
"Closes the org-capture frame once done adding an entry."
|
"Closes the org-capture frame once done adding an entry."
|
||||||
(when (+org-capture-frame-p)
|
(when (and (+org-capture-frame-p)
|
||||||
|
(not org-capture-is-refiling))
|
||||||
(delete-frame nil t)))
|
(delete-frame nil t)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
|
@ -353,6 +353,10 @@ relative to `org-directory', unless it is an absolute path."
|
||||||
(defun +org-init-capture-frame-h ()
|
(defun +org-init-capture-frame-h ()
|
||||||
(add-hook 'org-capture-after-finalize-hook #'+org-capture-cleanup-frame-h)
|
(add-hook 'org-capture-after-finalize-hook #'+org-capture-cleanup-frame-h)
|
||||||
|
|
||||||
|
(defadvice! +org-capture-refile-cleanup-frame (&rest _)
|
||||||
|
:after #'org-capture-refile
|
||||||
|
(+org-capture-cleanup-frame-h))
|
||||||
|
|
||||||
(when (featurep! :ui doom-dashboard)
|
(when (featurep! :ui doom-dashboard)
|
||||||
(add-hook '+doom-dashboard-inhibit-functions #'+org-capture-frame-p)))
|
(add-hook '+doom-dashboard-inhibit-functions #'+org-capture-frame-p)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue