Closed malb closed 1 year ago
sorry, I do not use this package long time ago, suggest a PR :-)
@malb I've added this to kill the frame, don't know if yours' better
(defun nx/is-pop-frame ()
(eq (cdr (assoc 'name (frame-parameters)))
(cdr (assoc 'name ocpf-frame-parameters))))
(defun nx/close-pop-frame-after-capture (&rest r)
(when (nx/is-pop-frame)
(delete-frame)))
(advice-add 'org-capture-finalize :after 'nx/close-pop-frame-after-capture)
I like yours better as it doesn't require patching, but I couldn't make it work for me (I didn't try very hard, though)
The code by @nico202 handle the use case where a capture template has been selected and either saved or aborted. But it does not address pressing q. @malb if you provide a complete file/function I can create a PR for it
Hi, thanks. The function that works for me is here: https://github.com/malb/emacs.d/blob/197be098ad50d8d7aca4513d63db8705b30017e4/malb.org#L3181-L3215
The functionality proposed in https://github.com/tumashu/org-capture-pop-frame/issues/4#issuecomment-417366277 has been supported since the beginning. That implementation reimplements ocpf--delete-frame
and the corresponding :after
hook.
I've created https://github.com/tumashu/org-capture-pop-frame/pull/8 based on https://github.com/tumashu/org-capture-pop-frame/issues/4#issuecomment-552093385. Thank you @malb :)
merged
I've patched
org-capture-pop-frame
so it handlesq
as well, i.e. the frame is also killed in that case: