[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: |
Sun, 10 Sep 2023 11:48:31 +0100 |
On Sun, Sep 10, 2023 at 08:19:25AM +0000, Ihor Radchenko wrote:
> (defun my-org-capture-kill-buffer ()
> (when (equal current-prefix-arg '(16))
> (save-excursion
> (org-capture-goto-last-stored)
> (kill-buffer))))
Thanks for the proposed solution. I have tried it and it didn't work for me. Or
it worked somehow. If it kills the buffer, then the buffer is opened again
right after it is killed, jumping to the last stored position. I think this is
because of the way the 'org-capture-finalize' function is implemented:
...
(cond
(abort-note
(cl-case abort-note
(clean
(message "Capture process aborted and target buffer cleaned up"))
(dirty
(error "Capture process aborted, but target buffer could not be \
ned up correctly"))))
(stay-with-capture ;; <- this cond is executed
(org-capture-goto-last-stored)))
...
It seems that the 'org-capture-goto-last-stored' function is called after the
hooks so the buffer is opened again.
This is just my interpretation. I'm not an expert in elisp.
- Feature request: kill-buffer for org-capture-finalize, Eduardo Suarez, 2023/09/08
- Re: Feature request: kill-buffer for org-capture-finalize, Ihor Radchenko, 2023/09/08
- Re: Feature request: kill-buffer for org-capture-finalize, Eduardo Suarez-Santana, 2023/09/08
- Re: Feature request: kill-buffer for org-capture-finalize, Ihor Radchenko, 2023/09/08
- Re: Feature request: kill-buffer for org-capture-finalize, Eduardo Suarez-Santana, 2023/09/08
- Re: Feature request: kill-buffer for org-capture-finalize, Ihor Radchenko, 2023/09/09
- Re: Feature request: kill-buffer for org-capture-finalize, Eduardo Suarez, 2023/09/09
- Re: Feature request: kill-buffer for org-capture-finalize, Ihor Radchenko, 2023/09/10
- Re: Feature request: kill-buffer for org-capture-finalize,
Eduardo Suarez <=
- Re: Feature request: kill-buffer for org-capture-finalize, Ihor Radchenko, 2023/09/10
- Re: Feature request: kill-buffer for org-capture-finalize, Eduardo Suarez, 2023/09/10