From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id voViA3bUW2LPuAAAgWs5BA (envelope-from ) for ; Sun, 17 Apr 2022 10:48:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id WPcFAHbUW2JqtwAA9RJhRA (envelope-from ) for ; Sun, 17 Apr 2022 10:48:54 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9FCC82C570 for ; Sun, 17 Apr 2022 10:48:53 +0200 (CEST) Received: from localhost ([::1]:46534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ng0aS-0007e6-A6 for larch@yhetil.org; Sun, 17 Apr 2022 04:48:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng0ZL-0007di-6W for emacs-orgmode@gnu.org; Sun, 17 Apr 2022 04:47:43 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:36683) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ng0ZJ-0005sL-J3 for emacs-orgmode@gnu.org; Sun, 17 Apr 2022 04:47:42 -0400 Received: by mail-pg1-x52e.google.com with SMTP id r66so13865676pgr.3 for ; Sun, 17 Apr 2022 01:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=yZyeNXyOMr2yNYH4DxQy3GrolgQpfWvgF240EwjYBo0=; b=otECbnI2GWbKYE4u1CxsbVBglPYRUPhszZ6YOBqXY9SMd7xrHcJFd8scHbBFmGku1n XEIOa2MQufSWpn+AT6Ne9Sq94xRlKBhqlOn1ID3TacBmT/cs1WGsMF0Dq8qA40/mfiW/ u2LRgKFGHUIsy0y4vTbZcv+33cUN3jDs3iY9LyANIHFbZ6coRblonSzc45rkmOZYtomn n3ySY6Z8DYF+ARLpJTikjztKk4e3C99OZ4lKBBIFyYIbncMhzR9XCdg9kaZT9MYF5q5u 5U2YN/1NTkOnxpW4x8kNdECj0gOVSAlKHi23BHhOBzKNEyyqWJAe94bgvF8zKN8fA9Vz WLuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=yZyeNXyOMr2yNYH4DxQy3GrolgQpfWvgF240EwjYBo0=; b=G2W14nk7hFxr6ZFDobnIUv2REm4V+Cs64f1nkgXRKOWHbxAEOa2fDpFRGiP6GrM59M NEdywZQ8vYsDys0QubAPEhl3EMmnpNzGqzRkvPQbTPE/TjkZy+fFyZ2RftEmF5/Cc4Kp V7ZNSObsRRnvo4q0gAsrrOgsjOboQBvFzxusuGqI9jii4RivStRCg0dC9rFNICTWUhXf 7u7oMTv9jxoaDDVr+RZv0OWC5auvuU0cGO5WMvLONzYoLnfysUOatqRgoxLNUeWPV7kS 8QnyLJW44nyJdaZ4F7uflRg922zwNQ1n8MdCSe5yGhNEWhdq/O8K6i462NPaMl+eUFth QxEg== X-Gm-Message-State: AOAM5306wtLdrnZ3C9qXW6K3Wb6qADMY9FFnsdwNWM7Ubn5LvebqOu4w HUynaEVqAqZs/DxGFgGmOy61sDHk/rCv9w== X-Google-Smtp-Source: ABdhPJxgv7i3iAHhm4l/Jg0HsMCmr8GLkksP16IlfoUD/RgluYq9j346poQfCRpaV5/lBIhllzTNqw== X-Received: by 2002:a05:6a00:130c:b0:4bd:118:8071 with SMTP id j12-20020a056a00130c00b004bd01188071mr6773163pfu.28.1650185260060; Sun, 17 Apr 2022 01:47:40 -0700 (PDT) Received: from localhost ([63.143.61.57]) by smtp.gmail.com with ESMTPSA id h189-20020a636cc6000000b0039841f669bcsm9465882pgc.78.2022.04.17.01.47.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Apr 2022 01:47:39 -0700 (PDT) From: Ihor Radchenko To: Christophe Schockaert Subject: Re: Cascading Org-Capture templates In-Reply-To: <1add5505fd7731fb5feeda5806e98d7a@citadels.eu> References: <1add5505fd7731fb5feeda5806e98d7a@citadels.eu> Date: Sun, 17 Apr 2022 16:48:33 +0800 Message-ID: <87wnfop02m.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=yantar92@gmail.com; helo=mail-pg1-x52e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Emacs Orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650185333; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=yZyeNXyOMr2yNYH4DxQy3GrolgQpfWvgF240EwjYBo0=; b=OGqzTMmaxX+YR3rpW6ovDOV0RdN8nifvgil5iK0PynBqNjOTqMOgQ7Wsc57VVWG9rIsV2g h3QRM47KkzjYtgqsLhgYSNicAWBZO/lTqd+/pJ8iGh/HKQl2ngaHxnSWdHPq/x5rJGJoLr TmGD4moxsG+gaK7+mCN2HOc1pp6AuW110rI6Npmrwdb8rbc8G5CKLMi6HMDpzuraFU15eW q5ZQ+GXcO1qNRaaLuiFXZpKU4+wqFxFD12zJbVVD0qmXg5bBNoY5e/sNTkgd25WLjplxQx jbLo2ChEcQO+d3Tw7IbqUwMnFZZhdnDTLZTcI4UGG7GrgArkRcJQMUgyr2kk4g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650185333; a=rsa-sha256; cv=none; b=mhzLNE+E+DA8Nv2P6fiWNkfBs4wCs4mFs28/1hztmMUF81BWMOvQL9UV6tj1rX0/mUH5cD BkFwg4RHUQCvQQDOd576ksjCP3ATkF4uVt0MgHE+qpYDNVgccKqtyddcexlSMFIe/mzzwh 2jZ61kvLrAJPl+aqzhxi1cYmGa401q9RtuZCigH7XV87pj4sfVhBgb7qTqbxQ7qkLSDD2/ 6Ip6GK8ClUnFs6qaCh771/7Y2KOMAYLX4BJXoe9WCpPZ+jxAefuCDL/aOeuuWL0hHJVSh0 PRA24sXWUkfRGVis3M1oHZZ/jZouVdBIeUEsWG12zFypVZIHxynmEOp7YZnwow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=otECbnI2; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -8.64 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=otECbnI2; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9FCC82C570 X-Spam-Score: -8.64 X-Migadu-Scanner: scn0.migadu.com X-TUID: oOIFDJHnvh0U Christophe Schockaert writes: > ... > So, "gM" is related to the second case (2), and I end up with the=20 > following error : "Capture abort: Buffer is read-only: # As you see, I am using Doom Emacs, but I think it=E2=80=99s related with = what I=20 > am trying to do anyway. > ... > To me, this goes to the internals of Emacs, and how things work=20 > together, and this is beyond my understanding of the whole picture for=20 > now :) > Maybe, there is also another way to achieve that goal, which I don=E2=80= =99t=20 > 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