On Sat, Sep 09, 2023 at 09:18:27AM +0000, Ihor Radchenko wrote: > For personal use-case, you can utilize > `org-capture-after-finalize-hook', checking `current-prefix-arg' and > killing the target org buffer according to the prefix argument passed. > Then, for example, you can make C-u C-u C-c C-c unconditionally kill the > target org buffer.
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?