From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id cNFRF1xDNmQNIAEASxT56A (envelope-from ) for ; Wed, 12 Apr 2023 07:36:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id uHJKF1xDNmSq/QAAauVa8A (envelope-from ) for ; Wed, 12 Apr 2023 07:36:28 +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 E58632AFAB for ; Wed, 12 Apr 2023 07:36:27 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmT8r-0004g2-9f; Wed, 12 Apr 2023 01:35:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmT8f-0004fn-FU for emacs-orgmode@gnu.org; Wed, 12 Apr 2023 01:35:25 -0400 Received: from mx0.riseup.net ([198.252.153.6]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmT8d-0007I4-L6 for emacs-orgmode@gnu.org; Wed, 12 Apr 2023 01:35:25 -0400 Received: from fews01-sea.riseup.net (unknown [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx0.riseup.net (Postfix) with ESMTPS id 4PxBHr0xppz9t41; Wed, 12 Apr 2023 05:35:20 +0000 (UTC) X-Riseup-User-ID: D0FC09D5FDEE54F840BE42B42C7C0DF79100AEDC747450A001C93A049B3F411E Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4PxBHX4t0yzJqky; Wed, 12 Apr 2023 05:35:04 +0000 (UTC) Date: Wed, 12 Apr 2023 07:29:29 +0200 From: Hanno Perrey To: Marcin Borkowski , Org-Mode mailing list Subject: Re: Can a post-capture hook know which capture template I used? In-Reply-To: <875ya12268.fsf@mbork.pl> References: <875ya12268.fsf@mbork.pl> Message-ID: <2794F6DB-7D2D-4843-81B7-779A9D6EB18B@hoowl.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: none client-ip=198.252.153.6; envelope-from=hanno@hoowl.se; helo=mx0.riseup.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681277788; a=rsa-sha256; cv=none; b=nEriLZlMYSaOBIE0zbZ14qjLV1HPnzAUQufl1OaDmDTZiGRMJKqP9Vkc/B5yQhwsZBjCn6 SzBA+k1tvr9CBSgDkxahT/qJ1QpcRtkgncMK2EmLFA+UB/Ucj6TTxsNLEvlNnDQzBmQ+ID s7DguuRTLGPOQ+iH+5KTZOhwIpZZptyzhXvqssNvIjFc910zZDkZFXVfTDh/WuWrlB3sFh t2CbOEH+P6sSs2b1qCs3FPlTLnRdR+D2CW6Y8GBCGfSfj6PxNJDDxeoH6Lb2olpZVHE50b sSuGe7WgxggEfMIRM7HlAMoTQQAx2iN6m6yzYDa1wVEUgllHsNY0TsUs1AALcA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681277788; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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; bh=IRrtwp8HgLSIOqD1u7CUuop/id+TKQOvIYQWksDIkZA=; b=EAUrq+vJ4d2Alys0PsHU0fDNOPQV7z8WlTLmWrdkJ0/roqcGHyCyryGWAiL5QHPF8YMXpd BTUK7EozqIvWIVxSGJzQjNmDi4LcJ3bgTAogD/dyvihUICj/iJxX3AMPukDZVdTRcPvUL5 6CKfAACUvbNvJMl1YNPBMW0MzQyFPQpCjVz8OwcAgsBjKzT4R9us5L1/endIz7u7F5DXxe kJnCvFHddspEfpkINUKUFNSt4BoiU2aIH2wL38ugfU0EQE+ZMjcojEEMns+zHHg9nNqEpK rgF4HkhjgKB+gbGWApWzW8XG/8tLzaFC5HhXPtNAbxGpBHRUj12Y7wHcdM7U6w== X-Migadu-Spam-Score: -2.12 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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-Spam-Score: -2.12 X-Migadu-Queue-Id: E58632AFAB X-TUID: 6/y2NxjboFZx Marcin Borkowski skrev: (12 april 2023 05:46:07 CEST) >Hi all, > >I'd like to perform some actions after a successful capture=2E I know >about `org-capture-=2E*-finalize-hook's, and I think >`org-capture-after-finalize-hook' is the one I need, but I need to >decide what action to take depending on the capture template used=2E How >can I access it? > >TIA, > >--=20 >Marcin Borkowski >http://mbork=2Epl > Hej Marcin, you can call `(plist-get org-capture-plist :key)' to get the template key = that was used=2E For an example with `org-capture-before-finalize-hook', se= e https://gitlab=2Ecom/hperrey/khalel/-/blob/master/khalel=2Eel#L502 Hope that helps! Best wishes, Hanno