emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] org-capture is not reentrant [9.5.2 (9.5.2-gfbff08 @ /home/ign


From: Ihor Radchenko
Subject: Re: [BUG] org-capture is not reentrant [9.5.2 (9.5.2-gfbff08 @ /home/ignacio/.emacs.d/elpa/org-9.5.2/)]
Date: Thu, 20 Oct 2022 03:35:30 +0000

Ignacio Casso <ignaciocasso@hotmail.com> writes:

> ... I took a quick look at the code and it
> seems that a global property list is used internally for the capture
> process, which seems to be only initialized at the start of the capture
> process and therefore the inner capture would overwrite it in our
> case. I saw also that the global property list is copied to a buffer
> local property list for the case of starting a new capture process
> before typing C-c C-c in the indirect capture buffer.

Confirmed.

Your understanding is correct. Capture inside capture is not supported
because of the internal capture code design.

> Do you think it would be easy to recycle that code to also have a stack
> of property lists and allow reentrancy? Would yo consider it useful? I
> would, but not really worth it to implement unless it's a low hanging
> fruit. If it is, I'd volunteer to do so (although my elisp-fu may be a
> little bit lacking yet).

It will be definitely useful. We have bugs surfaced from time to time
because of nested captures. However, one will need to check the logic
inside org-capture first and identify how to switch from global
variables holding the capture state to something more robust.

A good first step could be looking through org-capture code and the
functions it calls and supplying comments to places in the code that are
not immediately clear. Such comments would be useful for others as well.

We can also help in the process, if you volunteer.

-- 
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>



reply via email to

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