From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id aI7tB6h5xmWUVQAA62LTzQ:P1 (envelope-from ) for ; Fri, 09 Feb 2024 20:14:48 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id aI7tB6h5xmWUVQAA62LTzQ (envelope-from ) for ; Fri, 09 Feb 2024 20:14:48 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=verilab.com header.s=v202012 header.b=j6npouFC; dkim=pass header.d=verilab.com header.s=gv202012 header.b=YQBrX0n3; 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=verilab.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707506088; 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=6CNYiHvrbhK8IDGJEGm/N+OtvMSBMnWOnU5+TCONFP0=; b=RFjprQaNsJPJnKlnUuc7fGhDlYtwQYPiMdtDMihSuKYYeSKiEzMBiyExuGocmQMtElDntv eIRplyejn75/S2kdKyT59jUwIASm8vZLY3DOCey/aFe5Gx/P5un+eoLuu1cbOkuPlihbB0 SVH6LnTPuSZ/Vi7/twWDOmYbbHXUYeIvyqYCHEG8ONdPzJ7IBq9XJKXVRGF8kOQrtZjZ1I XvJ72rqsHXpkSnPdHjFnfqB8pqGhx7K9QvTyc2BC0jVEmi8WTmTuhjEXpsQelMsL8ah8Lr 4D8LqdKLT2mhAWq6SMsBjEIKdx+pmWiEQ3Bhrz5E3N8DnvVqOQT263RK7kfVFA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=verilab.com header.s=v202012 header.b=j6npouFC; dkim=pass header.d=verilab.com header.s=gv202012 header.b=YQBrX0n3; 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=verilab.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707506088; a=rsa-sha256; cv=none; b=ZZ7Hymwp35tCaK0GxxEfaxtEybIEaP5lnEqsXGxJlsqmx+u3Ilsy5Ck9TWhzsWWSYiEcsw ckwvaGg5JGeh/9RXpoXBcxVlxdkDrTiHXELpYkx9IUKhCHYyymv6jNAGlAgaw385shn493 V5ZlEHkFyOZrRtDbfVfrJd0MMq3dar7pI2S6IuiSjK7oCBLLJSR6Me0+3WHOkwDDUyDxbf w9IPN/GE0ob8Qih5op6Zj0kPiDCnC5z7krdv+/VEoCeWaJEQAEmoPXnoe1v0bsZ7eJiPek zyHHvVxPjM2+ty5Fm/3GDYmeww2jgUHbT9MsWZrT9CTe0tyuleH7iL+II3tlmw== 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 BF51A569BA for ; Fri, 9 Feb 2024 20:14:47 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYWJt-0007Yg-4j; Fri, 09 Feb 2024 14:13:53 -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 1rYWJq-0007YL-Ji for emacs-orgmode@gnu.org; Fri, 09 Feb 2024 14:13:50 -0500 Received: from cather.verilab.com ([64.20.234.125]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYWJo-00068v-Bb for emacs-orgmode@gnu.org; Fri, 09 Feb 2024 14:13:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verilab.com; s=v202012; t=1707506024; bh=6CNYiHvrbhK8IDGJEGm/N+OtvMSBMnWOnU5+TCONFP0=; h=References:In-Reply-To:From:Date:Subject:To; b=j6npouFCQfEw9cOfdL0KoZPiwyxFIxvYYY6M2WB7MBpVd68by7Bi2+YqGFbTHrObn GxsXDOcUGd6uJgC9VWYwdGBze5ImFWCsa0O/3RmRsXZE3YU3ekf05xMMiDIM0h1Ugk jIi44OEbtLLZoaJK0wCakDKmQrRQC7s/EVJoJR47AJv6fnxzGbm5RZseq8RAjo3n16 Hn8TevM3VMgylopaaSDe2m0doeA486R3g/p55FAy7cF9rnrgR/cDwtsYDXAZFsCWQB 9ZBPSEm0LUL5FuxXSM5Y6ViEUfg66pLIQnaoVsDgcQaPGr5Z4r1K6+o4Cgf4sA4Ftg bLjxYb9UT5wgg== Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by cather.verilab.com (Postfix) with ESMTPS id 48CBF20FBC for ; Fri, 9 Feb 2024 19:13:44 +0000 (UTC) Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-55ffcfed2ffso2682745a12.0 for ; Fri, 09 Feb 2024 11:13:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verilab.com; s=gv202012; t=1707506022; x=1708110822; 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=6CNYiHvrbhK8IDGJEGm/N+OtvMSBMnWOnU5+TCONFP0=; b=YQBrX0n3XwBsbRv0r3RMOkLNko3gQvTRyNTBOf8d2+1jLo6oS+G0dFKzILnFBqEd+s t/YMGZL56cwpJFMNo2MthBcGVuU9V2aAp0f7PLEh2uk0eq3srtgKlWQlGx0I34prjqC+ 9Y7iCC9+w/E1N0Itwx+nKzs6ThDlGdyal1htI5da8k3hOXcKKq8i8sCsRcTaSKgVWqUz go89gmrG62hKbRb3KY+4CHLFAoLgxwPfsuALxBbQ9QoEbQ08wCpZ9uPXe6ekN+q1RRJd CUD8q3fQA9H7mw9aoEgsHyWMf+7DaA4IIFo7LiFxwGSifhelZau2MECBi3ynFZ0Wofrv Lszg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707506022; x=1708110822; 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=6CNYiHvrbhK8IDGJEGm/N+OtvMSBMnWOnU5+TCONFP0=; b=j5xi8XSW9ELUT6+muOU0NtJfK3YTccbTvggAEYw/fq5vhT749FMfZjTPyeXXPJ4GJe 80LSJfL72k2+MNexIt7ARYxMHAfwvDfz7ebK9wQ3M6JPdBA1/+R9CKmyi/e0pDOD8gRA xW/zqHBiXeXbQJEG1VElUsCxnEiPTPaSY52+OQwWMo1V1Xysk8Jl3rIhZM+nzPsh2hYn rV/CjP7jxb0dKvrn3p4+SFup6ftkwIdTZO7xxtnqQwxZw1qYM5LFoC/Nu3wXNqGle+QK 6sycbckkQD9McDEaTRPbZII5A5v/xK0P1Rs0UAWtyCbdq8/06FR3XLUcGjtO6nSe02Z+ jlCg== X-Gm-Message-State: AOJu0Yyfc020UDVfIxThy4qDKWmlgKFZ5Sq9vL4Zor2KcGAK2zaswa89 Anx3GaEMeB6jQT8nPBVEY0H3EbqOcIjU4XM7hRnqWHGNL2TJ+hcDpQaDzjFGkAiX/fDua0BrNw0 G/W/r5ps422jr8Fmi08gYft47AXz53zVxbz83R9iwJ3xvMSQKweg9JVs8JxzaMyj4E3cBPpI89q 0e5wkDZE7QRexLaui+WiF59IFQEWv5UwZMjyGPmLh8 X-Received: by 2002:a05:6402:5406:b0:561:3b53:d0af with SMTP id ev6-20020a056402540600b005613b53d0afmr1790873edb.12.1707506022421; Fri, 09 Feb 2024 11:13:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHcFQN+0k9iiKtxU+rOCjx6ANfRw6ClD6STlnSDFBTSZrFlCx0PIPI031VVjeTEj9HoBRLp5QmzfLGggldBh/I= X-Received: by 2002:a05:6402:5406:b0:561:3b53:d0af with SMTP id ev6-20020a056402540600b005613b53d0afmr1790854edb.12.1707506021867; Fri, 09 Feb 2024 11:13:41 -0800 (PST) MIME-Version: 1.0 References: <87zfwccpvs.fsf@gmail.com> <87h6ik49eb.fsf@localhost> In-Reply-To: <87h6ik49eb.fsf@localhost> From: Tommy Kelly Date: Fri, 9 Feb 2024 13:13:05 -0600 Message-ID: Subject: Re: [BUG] Invalid capture datetree capture templates (newly introduced) [9.7-pre (release_9.6.18-1145-g10d286 @ /home/jds6696/.emacs.d/straight/build/org/)] To: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=64.20.234.125; envelope-from=tommy.kelly@verilab.com; helo=cather.verilab.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.87 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -7.87 X-Migadu-Queue-Id: BF51A569BA X-TUID: ED4HEdur7uW9 Justin Silverman writes: js > Org no longer allows the third argument in (file+olp+datetree ... And Ihor Radchenko replied: ir > Duplicate of https://list.orgmode.org/878r3xfm90.fsf@localhost/T/#t ir > Canceled. The initial problem has certainly been fixed in that the headline(s) arguments to file+olp+datetree (f+o+d) are now optional as the doc implies should be the case. But I don't think the new behavior is fully correct either, and the problem affects not just the situation where no headline arguments are given. It seems to be connected with how the location of the datetree is chosen in general. My expectation (going by prior behaviors as well as current documentation) is that the location is fully specified by the capture template. For example, suppose you have the following: A) entry (file+olp+datetree "test-datetree.org") ;; i.e. filename only B) entry (file+olp+datetree "test-datetree.org" "H1") ;; filename plus heading C) entry (file+olp+datetree "test-datetree.org" "H1 "H2") ;; filename plus heading and sub-heading Then I'd expect A) to use a datetree rooted at the file top level; B) to use one underneath heading "* H1"; and C) to use one underneath ** H2" (which itself is underneath "* H1"). And in each case I'd expect it to create a new datetree at the specified location if one didn't already exist. HOWEVER, it looks like that can break if there is already one or more datetrees anywhere in the file AT A LEVEL BELOW THAT specified by the template. In that case, the position specified by the template is simply ignored. Instead, the captured item is filed at first occurring datetree of the above kind. To be clear, that's even if there is also a pre-existing datetree at the correct, template-specified location but further down the file. I tested the situation with all three of the above types available as capture types, and starting with an empty target file (other than the two headings "* H1" and "** H2"). I first captured to type A) and I got what I expected: a datetree with the "2004" root entry being at the file top level. That was positioned (textually, not hierarchically) beneath the two "H" headings I'd prepared the file with in the first place. Then I captured to type C), and also got what I expected; a second datetree, now with the root being "*** 2004", under "** H2". But from that point on, all captures, of any of the three types all went to the one created by that type C) capture -- i.e. to "*** 2004", under "** H2". under "* H1". I don't think that's expected/correct behavior. As to my version of Org: I'm doing all this in my own git copy, refreshed ("pull"ed?) last night, but I'm still very new to that approach so this may not be what is usually looked for (and I'd appreciate the correction if needed), but 'org-version' reports: - Org mode version 9.7-pre (release_N/A-N/A-ee395b @ /home/tommyk/my/git/org-mode/lisp/) And if it matters, here's emacs-version: - GNU Emacs 28.2 (build 2, aarch64-unknown-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2023-05-13, modified by Debian --