From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aL7YHs42P2fHjwAA62LTzQ:P1 (envelope-from ) for ; Thu, 21 Nov 2024 13:34:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id aL7YHs42P2fHjwAA62LTzQ (envelope-from ) for ; Thu, 21 Nov 2024 14:34:06 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=PD9XzfOg; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1732196046; 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:dkim-signature; bh=ZXuv7gvYC4IDPjOIlCeiot1Db90W82Go0e8rEhLf+fQ=; b=RUY/hnOkWOEhBL0V5I5xM2vaTxsl0vVxEcJrfXXLQ1nwSM1OXnZRWm+J8JpngsR4KoC76v wGuLGF2A1zZtrsj0Pecav/Af1z3a+Q8yFsiORUYOMnLxbDPTG1A4OLwcojX40t7uJArw2V 3p2d4ReeKbGfp5IgkxgWPMTKT+lVCWTgJWSvnejDO6dFv7LfILr3PrrZan4GZVEyxvCT5M c5EhixRh7/iZhgvZxx0lRr3966L7V69LKQdLD4/DGzDcDtkPEivXyIRWiw9VvKGXgkRn08 lygsZy30zRlGjlGWz1ABdXv2/FdG28/VQJ0LT+ai0lW3Vm0Yyk+wEKH6JLN4cw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=PD9XzfOg; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1732196046; a=rsa-sha256; cv=none; b=Voayxu7LGOh8sNLQA/hFsfTLywcNlicpUOm1ZE+ydPXAjo51Kmx3V1jV+sYjtT57wrA/yS dvM4+iE5Wj6KWyoNDYUDWKd+dIoH1sVNs1f02Rjk5Ntd87JIF6Mhe8Mv+y9LAx6a2JGSH0 rrsx+1uSjGT3uu5za6k9xp2krleoLOemBnhD+7YzYOik2XwEeATj+tTsrcVaz7dQOnR/oh 3G1H6RITLAyZwQcNiEgx4OsY/5r03dgoKucXIsX6M5PTg1Thlh9Pbx9u9brTRx4qorYhVJ LAkyS8Xyrkg0ZMBhYX+Tgwia+Bh/1rV1jUHKSnChP7ZhS9TqMnknZ7fy8q2WBQ== 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 1E6FF7EECF for ; Thu, 21 Nov 2024 14:34:06 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE7J3-0000ks-Rb; Thu, 21 Nov 2024 08:33:13 -0500 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 1tE7J1-0000kT-9M for emacs-orgmode@gnu.org; Thu, 21 Nov 2024 08:33:11 -0500 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tE7Iz-00089a-Eb for emacs-orgmode@gnu.org; Thu, 21 Nov 2024 08:33:10 -0500 Received: by mail-pf1-x443.google.com with SMTP id d2e1a72fcca58-71e52582cf8so688828b3a.2 for ; Thu, 21 Nov 2024 05:33:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732195987; x=1732800787; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZXuv7gvYC4IDPjOIlCeiot1Db90W82Go0e8rEhLf+fQ=; b=PD9XzfOgE4tsNDgl7L5nVU0J0MTbmMJn0edrYYhuQA/pAx4s98KEUOeZzN8J1N2rZw mkpKy07ev+ZfQOgvbSyNzeAKwbRVpTakkn7jjvIzHJBbKrL/wunUWHvYMr9XmTn5WYhX vQyG8HZYA23xykyoRrVsCuwbkva2Fp0LDayrp/w1rK1tuR7/5dCZtcd1x5OlPpb9MQ2p OMPe9U3z9rVyH/COPmaSPqK/QEy0+nWlelTiKt8ll+N5YIZPKOlbhrj592khWpzFA9av yUkjsCb2lOT7VMtUqpk4TI8izyoETwL5/tlMW8GxyMlIqJun5zPcqUcfFp3eUUZUT+Hi NotQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732195987; x=1732800787; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ZXuv7gvYC4IDPjOIlCeiot1Db90W82Go0e8rEhLf+fQ=; b=AOOieXNmHw1bzrQK91Q0dR0Bj0JC15UOpoPAMs9cqeN8X/91aRWMbEG1jV83l25grR 9s4xPRZFrwTfGXjAVCO1IMpx1YoDXR3izyF8JZZ6ZxbTgvJPrfHwaV0Nki8qkkMWwDqD mmhQJCMfqjPBi4S4cQi8WJvIkuXZtNJwqmM41avXK2L5/G7UiwvvZqo0fgX3FYgY+vv1 KFBD2jKuD0zolvxtWTd2w2zldeS5dUz5czUPxw6WGFIIwlW5QD62lpq4ON+pSavURGZH XvNk8vC6HZazmMMP+YzHnoeUNofu3wRqmv7LRV7uw+FAxwBznOGmqX7G7JdUOyMvVMvw oLpA== X-Gm-Message-State: AOJu0Yx61cKYfdJdDL6xo1EIrQCIwT0LpPcn4BB8SsqT33+1fyEGz0YC FVc8AKv3Nhv/2Z9SfiKomnYbjQewnJZCX42r+C1Mpj4O6M1diqekukcQkyN4qTk= X-Google-Smtp-Source: AGHT+IG5mZW6IM2v+Li3sVw2Ft+Cfa7O8g3loGLeFQS9IqEcDJtx/wgksg0MM88dukdjxoT5nM2+LA== X-Received: by 2002:a05:6a00:1910:b0:71e:f4:dbc with SMTP id d2e1a72fcca58-724bed9962emr8688319b3a.25.1732195987307; Thu, 21 Nov 2024 05:33:07 -0800 (PST) Received: from localhost ([1.7.159.70]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724beeff3dbsm3737424b3a.62.2024.11.21.05.33.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2024 05:33:06 -0800 (PST) From: Visuwesh To: org-mode-email Subject: Re: Bad interaction between org-capture entry type and file+function target? In-Reply-To: <87h681b0l6.fsf@gmail.com> (Visuwesh's message of "Thu, 21 Nov 2024 11:16:45 +0530") References: <87h681b0l6.fsf@gmail.com> Date: Thu, 21 Nov 2024 19:03:02 +0530 Message-ID: <875xogbtkh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) 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::443; envelope-from=visuweshm@gmail.com; helo=mail-pf1-x443.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -1.35 X-Spam-Score: -1.35 X-Migadu-Queue-Id: 1E6FF7EECF X-TUID: Pe4wJnRnnzBy [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=A8= =E0=AE=B5=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 21, 2024] Visuwesh w= rote: > In the attached file "test.org", I want to capture new headings above > "Projects" always. To achieve this, I used a file+function target to > move the point above "Projects" like below > > [...] > > However, when evaluating this sexp, the heading "test" is always > appended to the end of file contrary to what the docstring says: > > (file+function "path/to/file" function-finding-location) > A function to find the right location in the file > > This is because of the 'else' clause in the cond form in > org-capture-place-entry: > > [...] > > Should this be here? Am I misunderstanding the documentation? After > all, it is too terse (the same text is in the Info manual too). The > documentation for the 'entry' type does not mention this quirk either: > > entry an Org node, with a headline. Will be filed > as the child of the target entry or as a=20=20 > top-level entry. Its default template is: > "* %?\n%a" > > The documentation for :prepend does mention that entries will be > inserted at the end if it is nil but I would think that using a function > would rule this out. > > Changing the type to 'plain' from 'entry' works as expected though. I just thought of a situation where this behaviour would be desired: a template could use FUNCTION-FINDING-LOCATION to ask the user to choose a heading (from a list, using org-ql, etc.) to capture the entry to go _under_ it. Here, the function would simply move the point to be on the heading. [ I am actually in the process of writing such a capture template. ] So perhaps an indicator to tell org-capture that I want to insert the heading exactly _at_point_ is required instead?