From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cEZyBPWDT2DqSQAA0tVLHw (envelope-from ) for ; Mon, 15 Mar 2021 15:57:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YF8sAPWDT2AwDgAAB5/wlQ (envelope-from ) for ; Mon, 15 Mar 2021 15:57:41 +0000 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 5F3B727D2F for ; Mon, 15 Mar 2021 16:57:40 +0100 (CET) Received: from localhost ([::1]:57202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLpb9-0003LD-G8 for larch@yhetil.org; Mon, 15 Mar 2021 11:57:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLpX5-0008Uc-3G for emacs-orgmode@gnu.org; Mon, 15 Mar 2021 11:53:27 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:50991) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLpX3-0002Vt-Ao for emacs-orgmode@gnu.org; Mon, 15 Mar 2021 11:53:26 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 0D24734C4 for ; Mon, 15 Mar 2021 11:53:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 15 Mar 2021 11:53:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= from:to:subject:date:message-id:mime-version:content-type; s= fm2; bh=QTKewsdQxc34cNXzGIdOkWEWXdV0UUZae2bygAUEqwY=; b=GavaH+iZ wse+tnUySVnTVhfEnaa/1KKiUVcVqwO0WFkvGE+GfrTruJaUMjHovJhNulnBDMSG ZyzQubFOjzvZZ32/wFgyna+li+AcRP91jNb1Id2Ac0fufauVVVctRYiKCBW/yEv7 JVEIy+ErjnRi1POuKGixpvpqyxWJEymSlkAqDpfu3JSz9RCy49goorUYYWoRL+qW zi0dVYEehqqsacH5Y2iFI/LzhMh/mH10RAa79ILQecaFGSW5gv6KXESflYjMNbUR XmqdFYdxe/oytwvQSdWJjThUbYIexzWkkR0EshVk6PJtJHlM7xQvYMi/u96rvrMc 5D1owhgae8Z8TA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=QTKewsdQxc34cNXzGIdOkWEWXdV0U UZae2bygAUEqwY=; b=Emm32yYfuzaU8sCr/PgycNP8TVz3/rUbCkYfkYGIJX1pP LZOx3YrayCmLcTcYEh7fdhFbaCBJkAm0mdP+PaeDfvDs0zBpkTNNDTHG9zvgTpBM /R/Db5yCwduCImEYGXxKMuGA/R89wMPLjYR4HTbpK0Kkz1sqEumF2n7FWVwwG3rV qHjQ3yjAYkdlqYvmUiYgQ4Fo6nE2CaBdd6lHWsL6abpbqYCR7Ee56hQAn945KhhY Xj/kp6KOUZFoMWbCBQ1QrPtZeoBEBXNYEoo/xqknQuVyGeqFnc2WMnOKqCyNRmJM n8iySAOl58hkhsL+1oqQupiDy/toS4jwXrxWLP62w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddvledgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpegfhffvufffkfggtgesthdtredttd ertdenucfhrhhomheplfhoohhsthcumfhrvghmvghrshcuoehjohhoshhtkhhrvghmvghr shesfhgrshhtmhgrihhlrdhfmheqnecuggftrfgrthhtvghrnhepudeufedttefgleekhe eihfegtdelvdeutddvvedukedtieffiefhgfdvhfdtudefnecukfhppeelhedrledurddu leejrdehjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehjohhoshhtkhhrvghmvghrshesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Received: from Lenovo.fastmail.com (ip5f5bc539.dynamic.kabel-deutschland.de [95.91.197.57]) by mail.messagingengine.com (Postfix) with ESMTPA id 456D81080057 for ; Mon, 15 Mar 2021 11:53:21 -0400 (EDT) User-agent: mu4e 1.5.8; emacs 27.1.91 From: Joost Kremers To: emacs-orgmode@gnu.org Subject: org-capture: question about function to create template Date: Mon, 15 Mar 2021 16:42:29 +0100 Message-ID: <87eeggh0r5.fsf@fastmail.fm> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=64.147.123.20; envelope-from=joostkremers@fastmail.fm; helo=wout4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615823860; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=QTKewsdQxc34cNXzGIdOkWEWXdV0UUZae2bygAUEqwY=; b=LQ/n7a5y7K6wuv026dfNdTehZs2yXeaT8LYNzhYgh4ZrJATnYRsI2KqBZJ9KgvELw5d83F Khr5kuzCUDJlsCpifbFgDXd00lvSVMtH8DplF+H3WE5RkV7MaBy/jDRBTKHM/4owerPTYD walQijRPHyQB95S/p+/sFiHl0Mdjhll03SdGuj61ENh37sLFJOca75GDKa3FuXs8VfxdYo blTyVaH/WzWrZSYiTjPZJdLC0o5h2MIf4teWUauokYZu0Bs92jnOv5fCdNwCNYe4Hs3vSe l8TP3NflSawAuOmO2SNYg1f7lAmUgrFtvnediM6KoUGAXmS7eTOeCy8JgDFRcw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615823860; a=rsa-sha256; cv=none; b=qsWO659C1axErcHwoAPNhltqS8Gmcr/x4DGBpUHYgfpI7xOqPeFi/FoIx7cLmGLgSJ8ia2 iPnPt2LkG/YSeItPNaOJBEIl3jQem4vMYCfNhIbnIzFIkqU3r78pN2/u6E+BqxZHMnfAwA oinCrblOOQYikxw4FDiVdoTwQYCruw/hbsczSWAo2P9JqZ4sol/C38HfZO0w7cmPgQuZ/L VOOh9YVuUhrPI80B98hSnFMUDxo/MpUPHKfZSrgm+6dLwnAPThxhXsvPPr/MomP/k/pMs1 tRAcGgoTJL1TDuwkdwJHdnd0QBWpfarFD+WM9lB6MXP6rCQcBRlgO9Xv4e0h4w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fastmail.fm header.s=fm2 header.b=GavaH+iZ; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=Emm32yYf; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.60 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fastmail.fm header.s=fm2 header.b=GavaH+iZ; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=Emm32yYf; dmarc=pass (policy=none) header.from=fastmail.fm; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 5F3B727D2F X-Spam-Score: -1.60 X-Migadu-Scanner: scn0.migadu.com X-TUID: UEhkdRv9dqd2 Hi list, I've been looking at the =org-capture= mechanism a bit more closely recently and noticed that in =org-capture-templates=, the template can also be a function. This looks like a potentially useful feature, but I was wondering if there's any way for this function to access the state of the ongoing capture process. Specifically, it would be useful for me if the function can find out the key of the template that the user selected. Of course I could have a different function for each template that I want to create dynamically, or use a lambda that calls my function with an appropriate argument, but that wouldn't be as useful to me. TIA Joost -- Joost Kremers Life has its moments