emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Christophe Schockaert <R3vLibre@citadels.eu>
Cc: Emacs Orgmode <emacs-orgmode@gnu.org>
Subject: Re: Cascading Org-Capture templates
Date: Sun, 17 Apr 2022 16:48:33 +0800	[thread overview]
Message-ID: <87wnfop02m.fsf@localhost> (raw)
In-Reply-To: <1add5505fd7731fb5feeda5806e98d7a@citadels.eu>

Christophe Schockaert <R3vLibre@citadels.eu> writes:

> ...
> So, "gM" is related to the second case (2), and I end up with the 
> following error : "Capture abort: Buffer is read-only: #<buffer *doom*".
> As you see, I am using Doom Emacs, but I think it’s related with what I 
> am trying to do anyway.
> ...
> To me, this goes to the internals of Emacs, and how things work 
> together, and this is beyond my understanding of the whole picture for 
> now :)
> Maybe, there is also another way to achieve that goal, which I don’t 
> think about.

An important thing you need to know about org-capture is that it is
using a global capture state. If you call capture inside capture,
unexpected things are going to happen because the recursive call will
modify current capture data.

I would try to save the value `org-capture-plist' in
lisp/cascading-capture and restore it after calling recursive capture.

Best,
Ihor


      reply	other threads:[~2022-04-17  8:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-16 21:44 Cascading Org-Capture templates Christophe Schockaert
2022-04-17  8:48 ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnfop02m.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=R3vLibre@citadels.eu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).