From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 0NhcGLydQmb0vwAAe85BDQ:P1 (envelope-from ) for ; Tue, 14 May 2024 01:09:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 0NhcGLydQmb0vwAAe85BDQ (envelope-from ) for ; Tue, 14 May 2024 01:09:48 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=QzCkAcXC; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715641788; a=rsa-sha256; cv=none; b=AMwZxW1k0S7aFcAgd6HuWLCKDnk6UxWjdgcoB0+B+hfvDTKLqxDahwEfNhnR4tE6ywvb2w ADJZ4LVnIhcuxC8rqrHyETJCtyLYLBGFLTYZUFVdhChr8D5hlafPhAJPQD63taQKbCffh1 8S/yRky/FC/m6i/pZY0yMHXrUI5hxk4CKo7/4Xvofkxm0MFi9wZsXEexKA85Bb1M9T/JLc oOxaV9GkZEH6TJ7Os8fAA1tf5FhV8aOq8CmFItxflzt25PEHOR20O9DbkUX5b3+of0oNxD WbZWnU/DbMioT1PaiRddBV1qGh1Ig/3NAn7gP7BjzIH1FNCX+APdW18U4fOTsQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=QzCkAcXC; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715641788; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=sZ8l1bXExqPKMze42UoyZdKLzKmWr8TBJ/gqxnizRx0=; b=IMVXYYSwei9AMn1Ld5ITDD5EKy+73+Dsv454sTwcRO2zSy/zpKAK0CR1OfhpknfHLWZRKU 1FLX37+aoghVRQnkNEYmI2bzgd5y9UylDdS6HvvzzY4Amh80HVYafheyBxGy9hxH6MhGav CaBD9Co3NH1ZS8G7pJ7C2EIYKIvtgSKarrhUfVvaOYLFSiMTsyZ6BlaNbKYUFXPpNzLUQk 9p6me4yP04crkCvk/HxkxX1D+px+9SzH9Z/607L0NAq4HMLv1hxQnUr5D+zIkZi4YAATC0 7kNgrseo37rRuxYzjyatAIYky/JbO3Jw/drdD8Lp1OBoeisARCfQnm9TGW0voA== 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 15FA025557 for ; Tue, 14 May 2024 01:09:47 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6emv-0008To-Ka; Mon, 13 May 2024 19:08:58 -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 1s6emu-0008Tg-C4 for emacs-orgmode@gnu.org; Mon, 13 May 2024 19:08:56 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s6emo-00056F-2B for emacs-orgmode@gnu.org; Mon, 13 May 2024 19:08:56 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a59a934ad50so1162446666b.1 for ; Mon, 13 May 2024 16:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715641728; x=1716246528; darn=gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=sZ8l1bXExqPKMze42UoyZdKLzKmWr8TBJ/gqxnizRx0=; b=QzCkAcXCnHPGCmTyW5CHKyHnMnbyD4xJWuyPDdYAfRH+uaVwwXNoK7+ggG2FVDO1Lj MweRu/Yu7+qfhEGNLXMVCeUPQ43tTqCNhqeJUS0bjcjhRAG1DT4S083TTQrTRhsYY14U LGh5+gs3SWixIP4NpO39wlcZEMY6NcjAhomeOvlVs3avVUtorfYaJwTZAf40IqwUb6si 1DeU/lj1hSlgyuRSwTvtXxf5gkR1+j+x7jt7JgZuSya4ty0IGyPekuQi3H86Wtle76aH 1kp7VqqWGMGO6ZNKpP0vk80VT83vVIgOqU8bqp2fRR91ZqI135vm70EyzGiAuLFa00gR CYTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715641728; x=1716246528; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sZ8l1bXExqPKMze42UoyZdKLzKmWr8TBJ/gqxnizRx0=; b=hGiBkVCl3P8jQ6kNKV+N2jheByt+FH2gKrtR+Oj/8wuQRv644P1qg98YLM0xIoq6fl ppQz6fwb78mQg7uCEhGoqe5MLZfQqov+9akqqjSwPT94sVMHi22wIhUf6+ohWmwmTwE1 7lQ7NO5vpXAaFDsdm5htPQH+ZLRyK30kuzVc0MVyLPynfc7pjw01X80UWG3NqlSMMger UctpY54yBaZffF2JF7jKbBN2oPnYu28KtHlxRQR9ezRBdf0/8hlQ5IqE1n6bXzOTUuuN tK4mg1VEL/AbE0fd/AGqwRa0UoKUi2VbaQVFMPPdhywIr2UBXKsf3N3kks1sddwjPIF3 CUmA== X-Gm-Message-State: AOJu0YwG02qQ6AfBal/9WmdGGbTSCmVOTSE6cfiiPgohJLcWG9DOUyV+ jax1+DZvC8erPSl9r7EvcidSrLIJr+DRwGLZ5uM/HsUulZcSdoYBSffInsgIBbg20+R5rp0s6Wc FvBWRJEzrNtVvfu27x2DgTDGEj20Jn7A1 X-Google-Smtp-Source: AGHT+IFexDngSHyIojGREHmeNVY7uPh0d54qCK+upwRPRt7LE0vXkaLqFmyJp/dNa7odcpe4AvR7RrvVZxw0mI1lb3g= X-Received: by 2002:a50:cd97:0:b0:56e:603:9fc9 with SMTP id 4fb4d7f45d1cf-5734d597e37mr8202323a12.3.1715641727973; Mon, 13 May 2024 16:08:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nafiz Islam Date: Mon, 13 May 2024 19:08:37 -0400 Message-ID: Subject: Re: [PATCH] function and symbol for headline and olp for org-capture-templates To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000c205f706185df79a" Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=nafiz.islam1001@gmail.com; helo=mail-ej1-x636.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=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: , 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 X-Migadu-Queue-Id: 15FA025557 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.68 X-Spam-Score: -9.68 X-TUID: 0GfxP32+gP82 --000000000000c205f706185df79a Content-Type: text/plain; charset="UTF-8" Oh dear, I shouldn't have used `atomic-chrome' to format the message in Gmail. So here's a revised version. Dear All, This patch adds the option to provide function and symbol for headline and olp for org-capture-templates. By that, I mean you can set the org-capture-templates in the following manner: (org-capture-templates `(("t" "Todo" entry (file+headline ,file (lambda () "A")) "** H1 %?"))) (org-capture-templates `(("t" "Todo" entry (file+headline ,file test-org-capture/entry/headline) "** H1 %?"))) Where `test-org-capture/entry/headline' is a variable/symbol. (org-capture-templates `(("t" "Todo" entry (file+olp ,file (lambda () '("A" "B"))) "* H1 %?"))) (org-capture-templates `(("t" "Todo" entry (file+olp ,file test-org-capture/entry/file+olp) "* H1 %?"))) Where `test-org-capture/entry/file+olp' is a variable/symbol. I also added a few more unit tests for the targets `file+olp' and `file+olp+datetree' to verify my new features and existing features. However, I just realized that the suggestion provided in https://lists.gnu.org/archive/html/emacs-orgmode/2024-05/msg00216.html might not work how I was hoping for. Basically, I wanted it to be possible to search for headlines and even outline paths in the buffer while in the function. But, by expanding outline-path before setting the buffer (by calling outside of `org-find-olp') that becomes infeasible. --000000000000c205f706185df79a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Oh dear, I shouldn't have used `= atomic-chrome' to format the message in Gmail. So here's a revised = version.

Dear All,

Th= is patch adds the option to provide function and symbol for headline and olp for org-capture-templates.

By that, I mean= you can set the org-capture-templates in the following manner:

(or= g-capture-templates `(("t" "Todo" entry (file+headline ,file (lambda= () "A")) "** H1 %?")))

(org-c= apture-templates `(("t" "Todo" entry (file+headline ,file test-or= g-capture/entry/headline) "** H1 %?")))
Where `test-org= -capture/entry/headline' is a variable/symbol.

(org-capture-templates `(("t" "Todo" entry (file+olp ,file (lambda () &= #39;("A" "B"))) "* H1 %?")))

(org-capture-templates `(("t" "Todo" entry (file+olp ,file test-org-cap= ture/entry/file+olp) "* H1 %?")))
Where `test-org-captu= re/entry/file+olp' is a variable/symbol.

I als= o added a few more unit tests for the targets `file+olp' and `file+olp+datetree' to verify my new features and existing features.

However, I just realized that the suggestion provide= d in https://lists.gnu.org/archive/html/emacs-orgmode/2024-05/msg00= 216.html
might not work how I was hoping for. Basically, I wa= nted it to be possible to search for headlines and even outline paths in th= e
buffer while in the function. But, by expanding outline-path b= efore setting the buffer (by calling outside of `org-find-olp') that
becomes infeasible.
--000000000000c205f706185df79a--