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 ms13.migadu.com with LMTPS id AAbxK4/Icmd0DAEAqHPOHw:P1 (envelope-from ) for ; Mon, 30 Dec 2024 16:21:35 +0000 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 AAbxK4/Icmd0DAEAqHPOHw (envelope-from ) for ; Mon, 30 Dec 2024 17:21:35 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ILCS3bgf; 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=1735575695; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=eLYFOMCGjd77zYqwCMRkqTRrFIGQtoW1R16N0Znlrl8=; b=szUl38nDKYj9ajL6s04vFkcO09sRYD5StIgtErVkcFJnS/2OBcFC8Jv/9QcD4gbwkcWI0m mqn2kdiP9L9OaE8x4CTdiswVdTd4eIm8C1kJUi2is21fpgPqwBBt2hQ0d7vi5Ijs7YllvK qN+w+rrFqL/QJGARJALsDpnvCDA5ADue9A4d+JrxjYEeX8yZr9Gjq1qB8YE47F38gRnbgl 5PgC0xbcFF/b9zT/B14fUjaGFjWkpuP4MLPtDmXm6LfK/zfD94Lej4/m0kAJjYcYxI059B u1BKF5XByneS54aS5EzwkMPtOcwvw5WD8NP/ebm1Bc7C0z8a9PJI3I0OENOizQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ILCS3bgf; 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=1735575695; a=rsa-sha256; cv=none; b=aiBPRNg4PlyUXM+qwle1v9hMG1yQ5Q1SRooR3laHihcvZJkScCViKQnhCPrs13TUhYi7w6 0d+lo1uS5KWT5ZLopQOr9ddFmHG/73jpl0NMSOZ9ZQguOpiimBg3AipDGKZOkoxPjMC+P1 7iNOVaYfCUJJDxVKlMjtSg6S1frwBqSXKn1Lg6snMCaD78jTKo6qszE9eJG/WochDq63y5 TIKoGEjALOmZrybsDaZQrJMM9cR7FmgN2VCRnOyYSACAcIVibLa+fK52qRSupRVU22CPfk /e/t9v9mPMNVN60e5vc9/p69wyXB2eCs+NbLvMTFlesCJzs9X5xDTrSoI0I1uA== 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 70F863694E for ; Mon, 30 Dec 2024 17:21:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSIVW-0005jY-6m; Mon, 30 Dec 2024 11:20:42 -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 1tSIVO-0005jF-HT for emacs-orgmode@gnu.org; Mon, 30 Dec 2024 11:20:34 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tSIVN-0007Il-0c for emacs-orgmode@gnu.org; Mon, 30 Dec 2024 11:20:34 -0500 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-21634338cfdso174991895ad.2 for ; Mon, 30 Dec 2024 08:20:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735575631; x=1736180431; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=eLYFOMCGjd77zYqwCMRkqTRrFIGQtoW1R16N0Znlrl8=; b=ILCS3bgfG6L+bTYkMcdNT2gIqmfBEOUfICm8m1JOd2hvj9QcsbuUvruH6QulW097VH LKHWCsS3d7sxYaPbkLb0L5ZepuodySk7SNWvjjr1flZoenKf0GHKn99Gy6Hbne00NmB4 16Gpf8HKZoe0bBgxj1R8M799qckApDcZfWsrFWkf6PU5fsTcyjPqn89vB78kXpqCvseR WeavxYTUml1TY28g40jQOxTmkKeyLL0kbIVV51e7GfIZzbiYS7oQSFCtY4ylnAK3BGRZ 2wN+PNYURDaTvgrltBLJyAR9Z9D6gw0yBvERk3BsbPLqhPh7woDve0dDzi8UjLXq5ZUN gnMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735575631; x=1736180431; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eLYFOMCGjd77zYqwCMRkqTRrFIGQtoW1R16N0Znlrl8=; b=asEP92P1H7w2CuTC++e+rfB+VKVrZaBcdtasRwm08aaNGAD3C/QCE46MKQYdjNoJC+ ubAD3ldbC23S0XicEqIBLOzK7/PSl+r3baLeWJripy2qyQ7vWf/BCDsv+UJAbSoOGBPv 3MS247bk3nrKnpYN3w8AtpwIfwTM9EwxkddiudYOydzFKZ6m/WMQu5SfxB+GQeZ1tEXV 29A2Xq/jAMuDlwqMzpzwEFpL5LqnHI+c28lrn8LT1/RkpVdVAVG7lDn+JteXvtZwNdy2 KUf7f8AuJCTpx3095rZ+zItNaCnP5gXWYgBSs4wFT/vRPGQkiwgI2uXe6uN1R0/d3Cc6 4U0A== X-Gm-Message-State: AOJu0Yw4b/kkYx6Bx/0bHaG5Iske1MDBj6+QdIp9YRzl2bfNa859inXP eg2/P+4Ra93/JWXC9KUU49GE20t/NCYzXPd/RseJpOiHj/AhB+dU X-Gm-Gg: ASbGncshuc09tFHv9IcbZc/aLvXC21M845z4Ljw8LzkMrjzjfBDPWBu8eMj4T2VedIL yTV3f7xb7WnPka8FXH6A0y7TWFFzJQBHIoqPFNc7a5VbFEj4PPRhqaqzW41BLPjZO84vj8I1+GD htU2VBfvuzBnCjAV+vRbtZyNMFkCbJNQ5uYmge8LNJpLruY8IopI1Yj5Aan6wjonSUHMzMxOkOD qRbC+kNr9Av5MN86LyjG1UHInPjORaX99V1eEFwBIsm64h83nSsib8Cq9IV5RiNDLrwyzbJ8Duq A3PbnWUVUQ72IosrYpY= X-Google-Smtp-Source: AGHT+IHB2mcgsTCs69hfV/1P0qtLyQ2eXR0rSzjMG+swh28Xtvjam64VQj7nWdoyGLiFZCaOzEuoCg== X-Received: by 2002:a05:6a00:944b:b0:72a:aa0f:c86e with SMTP id d2e1a72fcca58-72abdd20f48mr47729304b3a.4.1735575630515; Mon, 30 Dec 2024 08:20:30 -0800 (PST) Received: from localhost (157-131-77-158.fiber.dynamic.sonic.net. [157.131.77.158]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-842abd5920bsm17591321a12.6.2024.12.30.08.20.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2024 08:20:29 -0800 (PST) From: Jack Kamm To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: Month-week and quarter-week datetrees (RFC and package announcement) In-Reply-To: <871pxqhj85.fsf@localhost> References: <878r5b1nr2.fsf@gmail.com> <87o7e677ex.fsf@localhost> <87y1daz186.fsf@gmail.com> <87msgvcvku.fsf@localhost> <87ttametje.fsf@gmail.com> <871pxqhj85.fsf@localhost> Date: Mon, 30 Dec 2024 08:20:28 -0800 Message-ID: <87ldvx3zxv.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=jackkamm@gmail.com; helo=mail-pl1-x62a.google.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, FREEMAIL_FROM=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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.46 X-Spam-Score: -6.46 X-Migadu-Queue-Id: 70F863694E X-TUID: l76QUhh5A8f8 Ihor Radchenko writes: >> + ;; Support the old way of tree placement, using a property >> + (let ((prop (and legacy-prop (org-find-property legacy-prop)))) >> + (if prop >> + (progn >> + (goto-char prop) >> + (org-narrow-to-subtree) >> + (setq tree (car (org-element-contents (org-element-parse-buffer 'headline))))) >> + (setq tree (org-element-parse-buffer))))) > > Why do you need object granularity by default (second call to > `org-element-parse-buffer')? > Also, more importantly, do you have to run the full parsing here? Maybe > utilize `org-element-cache-map' instead? Full parsing is going to be > much slower. We don't need object granularity, that was an oversight on my part -- should have specified headline granularity. Does `org-element-cache-map' traverse elements in the order they're in the buffer? That is something we need for this. On my working branch I have an earlier commit that implements many of the improvements here but using the old regexp search way instead of the org-element way. Would it be worth reverting to that point? Specifically, the new `org-datetree-find-create-entry' that allows for nested years/quarters/months/weeks/days is still pretty straightforward to implement in the regexp approach. The more general `org-datetree-find-create-hierarchy' (that allows elisp hackers to build new kinds of datetrees) might be trickier without org-element, but we could also defer that for future work.