Don't use counsel-org-capture for +org-capture/open-frame
This commit is contained in:
parent
80845954f1
commit
dbd0a84805
1 changed files with 4 additions and 10 deletions
|
@ -6,6 +6,9 @@
|
||||||
;;
|
;;
|
||||||
;;; External frame
|
;;; External frame
|
||||||
|
|
||||||
|
(defvar +org-capture-fn #'org-capture
|
||||||
|
"Command to use to initiate org-capture.")
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defvar +org-capture-frame-parameters
|
(defvar +org-capture-frame-parameters
|
||||||
`((name . "org-capture")
|
`((name . "org-capture")
|
||||||
|
@ -53,16 +56,7 @@ you're done. This can be called from an external shell script."
|
||||||
org-capture-entry)
|
org-capture-entry)
|
||||||
(when (and key (not (string-empty-p key)))
|
(when (and key (not (string-empty-p key)))
|
||||||
(setq org-capture-entry (org-capture-select-template key)))
|
(setq org-capture-entry (org-capture-select-template key)))
|
||||||
(if (or org-capture-entry
|
(call-interactively +org-capture-fn)))
|
||||||
(not (fboundp 'counsel-org-capture)))
|
|
||||||
(org-capture)
|
|
||||||
(unwind-protect
|
|
||||||
(counsel-org-capture)
|
|
||||||
(if-let (buf (cl-find-if (doom-partial #'buffer-local-value 'org-capture-mode)
|
|
||||||
(buffer-list)))
|
|
||||||
(with-current-buffer buf
|
|
||||||
(add-hook 'kill-buffer-hook #'+org-capture-cleanup-frame-h nil t))
|
|
||||||
(delete-frame frame))))))
|
|
||||||
('error
|
('error
|
||||||
(message "org-capture: %s" (error-message-string ex))
|
(message "org-capture: %s" (error-message-string ex))
|
||||||
(delete-frame frame))))))
|
(delete-frame frame))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue