emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request: kill-buffer for org-capture-finalize


From: Eduardo Suarez
Subject: Re: Feature request: kill-buffer for org-capture-finalize
Date: Sat, 9 Sep 2023 15:11:53 +0100

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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]