Eduardo Suarez <[email protected]> writes:
> I have tried something simple like
>
> (defun my-org-capture-kill-buffer ()
> (when (equal current-prefix-arg '(16))
> (kill-buffer)))
>
> as an after-finalize hook. It seems to recognize the 'current-prefix-arg'
> variable.
>
> However,
>
> 1. it looks to me that org-capture-finalize jumps to the captured item if
> there
> are any number greater than zero of preffix arguments,
>
> 2. the code above tries to kill the buffer I was working before invoking the
> capture process.
>
> Any hint?
(defun my-org-capture-kill-buffer ()
(when (equal current-prefix-arg '(16))
(save-excursion
(org-capture-goto-last-stored)
(kill-buffer))))
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>