From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 gID6EyNwLmYMawAAqHPOHw:P1 (envelope-from ) for ; Sun, 28 Apr 2024 17:49:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id gID6EyNwLmYMawAAqHPOHw (envelope-from ) for ; Sun, 28 Apr 2024 17:49:55 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=T+Vaz1uo; 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=1714319395; a=rsa-sha256; cv=none; b=grDn1zoiG9R+6jtI5Oej/Vy0g1vdae7JMvAghqrvrLbMgyWiq4Z7zAU9mT66g6c5EgZFPg MKnA6qb+wX64t4ZtgwNU4PPz1D/9GgYfdMKt4M38OIYohMW5HWjIG4OCr1CQbOBatfNXDJ 9o7sY976bEs9vOE3WwZ8HrHzuWH068XUkpeQDg8kYQ552lQxF80NZxad9kk0SCg6rBgTiG z2iKH49odMKH26sN6uN2Ce7JdzNGUfdZGeX0lRt35xW6oGtwxXT//AhUStoWUqAGteNZ9t VbztVm3hMNFsyJLiDoSEFKON0bQvZW3TOMH9wArewQQTnvy2dcujNIpkSmScAg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=T+Vaz1uo; 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=1714319395; 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=EIyO4jYSP0SBLbFFG9D3IRpWNByGfSdHLmmIBqr4oWg=; b=k5utGqPbeQum2WZ0SkOFdTmNTs61bqw/e/wsEYEQiTYSkCOvOZAc7G7n0X125UWF66VYf4 nuoV1HSPtlboBqJHxkxqLvVHvvCmxFjNush0Pi8EOwdks+SyxOqnLX69NySM3tsd8RHFqU 6rQvmh0XXdzYq7A7feaY6sgI8s8EN3u8y3IxGuf1u6WAvQfrub1ZXnmUVeLQUedm+mMnvC gpxH/XgIfBAfvtfgap9NMMVksHUdehNqSddsRIuCvJVcIZR1A9xJFGWS/u8MgrlNBt3dKo wdJwNgCcfLK/0pXloap5nTFw7jd05rjxl89YMkY+Adqan5vmuHcD2YhhUWAbaQ== 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 1AA4637C20 for ; Sun, 28 Apr 2024 17:49:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s16mC-0006tj-S0; Sun, 28 Apr 2024 11:49:16 -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 1s16m7-0006sX-VM for emacs-orgmode@gnu.org; Sun, 28 Apr 2024 11:49:15 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s16m6-0004Eo-Fn for emacs-orgmode@gnu.org; Sun, 28 Apr 2024 11:49:11 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-51b2f105829so4535786e87.3 for ; Sun, 28 Apr 2024 08:49:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714319348; x=1714924148; 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=EIyO4jYSP0SBLbFFG9D3IRpWNByGfSdHLmmIBqr4oWg=; b=T+Vaz1uoO8msUid1AKIJBKYfkt5vBsjtZwh5FTKEap9vyDN2VZ/P+xjcFsm/K85kIx yU7+tJJdaBCB6wjVINA+jTc3DqpgR8nEQxi+kfVX/U5T8288k1zwHR+5Q7B5d6H1gJTW 1Jni/a49I9dScrKFqbIPBqv3d/upyQb4O5Fyt3wkGstYr6Sbqrz5UR8VKAk61iCO/N6Y pJrMEQqq03BfTytCsn/SDIPPm4xVBWu+Z384q77Gsbb2NaVlag98W1AUgSsfDBoY5sAo JzgGSlkFIIrbjo8AL0zjjfoA9ihIjcFq+pIZ17o2l7+sElMd9rERCfQiusY7S5BikT95 TYRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714319348; x=1714924148; 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=EIyO4jYSP0SBLbFFG9D3IRpWNByGfSdHLmmIBqr4oWg=; b=GSPOihQ47qiB9XmVpIrJvAeLnjNeM4284BztUJa4IPG2eYgVuztQJsaY4URmCSuOLn 3t8JFB8PNQv8imIegDd8AcP+gIgRQC0IlpZpqTga5sH3i2qqRuLTGKP9uMs8OAT0diB/ qWLfI6utu7b5yMOZZerEVR+PNHGjl9iZ/1KnK2LtsKgK0DfsAarfEtswV1cOeSV+zfl1 Zw3mXS1c3ZGoK7aZSMysLJdm8Z0UxPFNltaG09OqxHEfjm+8XrgkQcscm8Bz5mdX7ezH 2GT3+5gQk1FL+uT98Y69L9G700Ymhc22inu2BSgnFgE5OpWJv3R0fP+jYUYIurKsqB+h LSpw== X-Gm-Message-State: AOJu0Yysnms47hzsSC7yai087n/l+PaKu++mOd4LYO8uB7qbQ9m1XIdf Rg0KdwGbRizxANlag9B4xs94DJQ97WOER22zd7934vYC/SDg8Soyb1F7Sh65v3D2Czv/hJ6yJXp K9ie2XqBBuDcIS5cdErS2ZOuHfq4Mdr5/ X-Google-Smtp-Source: AGHT+IHh/WJY+wkTHEBBK3nDl12URjrZPqTxzlNtdYUxHuStoqzzrd5AfXosHktQGFa7hr8fXDNetISD/beb+TmTNIs= X-Received: by 2002:ac2:4e93:0:b0:515:d1a6:1b07 with SMTP id o19-20020ac24e93000000b00515d1a61b07mr5638169lfr.15.1714319348246; Sun, 28 Apr 2024 08:49:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nafiz Islam Date: Sun, 28 Apr 2024 11:48:57 -0400 Message-ID: Subject: Re: [FR] Support headline as a function for file+headline target for org-capture-templates To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000c8b46206172a1301" Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=nafiz.islam1001@gmail.com; helo=mail-lf1-x135.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_HELO_NONE=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.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: 1AA4637C20 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.96 X-Spam-Score: -6.96 X-TUID: zzW5fi1oa4Xw --000000000000c8b46206172a1301 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Upon closer look at the `org-capture`, `org-capture-set-target-location` and `org-capture-place-entry`, I'm starting to realize that "file+function" can be used for what I'm looking for. I was just worried about the use of `(org-capture-put :exact-position (point))` On Sun, Apr 28, 2024 at 10:58=E2=80=AFAM Nafiz Islam wrote: > Right now, only the file name supports being either a string, symbol or > function, etc. Nonetheless, it would be nice if headline could be a > function that takes in as parameter a list of all headlines present in th= e > file so that we can dynamically pick a headline under which we want to ad= d > an entry. The function can also return a string to represent a > (potentially) new headline to insert. > > My use case for that is I have an org file in which each headline is a > specific time, and I want to reuse a headline that is only within 5 minut= es > behind the current time. > > --000000000000c8b46206172a1301 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Upon closer look at the `org-capture`, `org-capture-set-ta= rget-location` and `org-capture-place-entry`, I'm starting to realize t= hat "file+function" can be used for what I'm looking for. I w= as just worried about the use of `(org-capture-put :exact-position (point))= `

On Sun, Apr 28, 2024 at 10:58=E2=80=AFAM Nafiz Islam <nafiz.islam1001@gmail.com> wrote:
= Right now, only the file name supports being either a string, symbol or fun= ction, etc. Nonetheless, it would be nice if headline could be a function t= hat takes in as parameter a list of all headlines present in the file so th= at we can dynamically pick a headline under which we want to add an entry.= =C2=A0 The function can also return a string to represent a (potentially) n= ew headline to insert.

My use case for that is I h= ave an org file in which each headline is a specific time, and I want to re= use a headline that is only within 5 minutes behind the current time.

--000000000000c8b46206172a1301--