From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 6BtrLIEiIWagowAAe85BDQ:P1 (envelope-from ) for ; Thu, 18 Apr 2024 15:39:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 6BtrLIEiIWagowAAe85BDQ (envelope-from ) for ; Thu, 18 Apr 2024 15:39:13 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=outlook.com header.s=selector1 header.b=qyPo2MCM; 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=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed)" header.from=outlook.com (policy=none) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713447553; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9JDEZ0X3rVwft3olHOwPwvJLHBb0opLw+DHg5EJiXmM=; b=DkFVQ2awSDvyVqVoI8Mk5VqLKjmH2SGyKZ58KjjrCGRDfEsh9UBZUrX0YOhaRMRKDDwIL9 oNcbJacacDODMczedqiHZwTSMWBJfyUqCrIamtYt1Fq38QQcHfH+WkGqxUB+rDYcBE0ED0 Zq1IJM8ZNM3NzjCn/gYewT8vPlkDDIkjUq6a1OqHPFMvhtLKf6mxYGJKwJBHWIv07PDi6m jKfMeiDfSOpZDC/kbH/5h+bgnvs9l0Q0JnkITPRfacjHtz6cDDkYsC0WQqVUuxqm93H/S6 vvSbytgBh7atfGOdjUReICnHpDJIJwgRYFQw+X91twVu8S6bDKLo0M/9v1p9kQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1713447553; a=rsa-sha256; cv=fail; b=JyJJt/rFM2Bgmm33v/UtkeHqGT4XHQl+RoN6dhS4ekkta4x4vWlE2vOpIM9Zuo/pNB3KKG HV2nBa/KJdpQ9wv3XgI5N1Xklk9emwSOP3bD2CtXLtcZs8nVSAGS9ruoW9p0PQS/e1g1oc F17OBWLrCKf+tDX26bvHGQ7ooWsqrwU0x9Ehy/iVEEMKWvLJLHqKYrd/i54pKC58XoX6cx ITJPBU8bLBmr4bi/4HVnMsKjlNfUnmeZPR/4RIprDe4VdJsKP4GjH8vQ8mulfx6H3JShti N505Y8ynEYH+CR1oPHzO990sTuBxGdfvNZ8izzOhUpMnW3AIp0eSFYNq8D85qw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=outlook.com header.s=selector1 header.b=qyPo2MCM; 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=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed)" header.from=outlook.com (policy=none) 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 5F0831097C for ; Thu, 18 Apr 2024 15:39:13 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxRy1-0004LY-Jl; Thu, 18 Apr 2024 09:38:21 -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 1rxRxy-0004Kn-15 for emacs-orgmode@gnu.org; Thu, 18 Apr 2024 09:38:18 -0400 Received: from mail-bn8nam11olkn20800.outbound.protection.outlook.com ([2a01:111:f403:2c14::800] helo=NAM11-BN8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rxRxt-0001Wt-0x for emacs-orgmode@gnu.org; Thu, 18 Apr 2024 09:38:17 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mEn4qI4bg21INCWuF6cFrKSz8Gp+rjcrS/nYNvUgONQSOuSRQ/vYRI5UVBkhRJxto84Dvb7D96zJ+9lyjQ/HYQ/Yp0nbCmjbZFuSEicJ/pqJhK8Ggnya8FVZvWEQctWnQodgvl1DaN5+Ke4w0VHc2KbO8dliLSq6rHyZgZB7Lj7MTlpq7y21i0qL79WiNw2M9Y4vYTI6bog/mJ035p7rBJL5aqnipRf4VLybG34Y1Tlai28CKvHaEsiXYN9a46YuZ5m8TC15Z6uR44Aigvdpdve4SiFeoGDljJNR6L84lYmCg4gvDnKx18OEJ3Uu9dj5yvAe18fsVuSdjNBW5WkJTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZrruObAQywbz4yu5Vp55jUBwE1i5NnaLOVsj6nFufWw=; b=KDY6DJeMlGtPAU5QCwug7j4c8UCSgg5vhrtzm5TakYbQI5N2KoVULQUCu/DvbW+Ck70nQ8ZOqOMMVF5+WLVbH1k4tsmOp8UW6UXEZXQ/TcgBAxexlFasrREw+coRqXMp8mGITsD/adVewI07wRFe81CzWNZo8IOy3VKI2y346az62y5/fNl25nxMUJir0sqj67TYUCHe/bHZDIcpTaG4b5HVg8Uysu3jVacuAC0X7FkLH+byEVVM1YQHQtBiLePF0SlsEYlnAFF/BgMQZoO9wegU7fcacbz+uQFfp1FIWdv2QH+0e2ixDlgo9pmvtX82N/2FrOA3JcoQ2boONI7prw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZrruObAQywbz4yu5Vp55jUBwE1i5NnaLOVsj6nFufWw=; b=qyPo2MCMiyirG/G1ZzdYNnM8yCkY3D59MESyisZ74FMPWcQ6t44V5VShuxS7Go/4EtqnrG08r1Q7PIVW3KbnDOgWnFaGfjP2510XbEEpZ4SdYrC0+nU5hso4MJYGk6zyfOR7PdGJnYlBOlfPiPCWazLodWmMbI4wVYp+SiXYXYrrkqqoMimKYe86nuOkaAr8IJxjcALp5c5KUHhU6qX35aemWwUUw1YKKb92Wq4sZwwNWGJiuAZNzryINRxjSzJlaHDxnZEw5+B4GvZ6asJDhjUKKgr6lAZbdG0eXU4Gqsc5C37ofE6weBoS9auFVPiA1tua5UCiUocFPzlU32Q67g== Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) by PH7PR84MB3762.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:510:310::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.29; Thu, 18 Apr 2024 13:33:06 +0000 Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::178d:1518:8a49:2a45]) by CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::178d:1518:8a49:2a45%6]) with mapi id 15.20.7472.037; Thu, 18 Apr 2024 13:33:06 +0000 From: Morgan Smith To: emacs-orgmode@gnu.org Subject: `org-element-cache-map' misses elements at end of buffer X-Hashcash: 1:20:240418:emacs-orgmode@gnu.org::lMAY9bNLiGIOSMoj:ALRm Date: Thu, 18 Apr 2024 09:33:02 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Content-Type: multipart/mixed; boundary="=-=-=" X-TMN: [4zXIA9Vy7mxX7xxZgIl4B/JcuU27Yc2V] X-ClientProxiedBy: YQBPR0101CA0327.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:6c::7) To CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) X-Microsoft-Original-Message-ID: <87zftq23u9.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR84MB3424:EE_|PH7PR84MB3762:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f36ab9f-1475-4f1f-ab23-08dc5fac144d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cxqkJmr5sIfWnl8ux+Q1uHieFetrVbK9Hkn6tqBdVuTWHBBFPyvt5Pu1BUgpFVaOrrhEPKwY/xBiijf+s3GMm29n/ocm3xzw9x74wqEuDKkGQRnrr2R0dp2D9XwwF+C6SE4sOEzAU8wibcaxtAzj9Cw6suPFSKirRJr2jAG6NHdE//3TiG0yTSTh83buhvEgZKhiydsigWi7xqFv7+5pQVX84sNnpiZ9nrDioYFeJlsUERU79PaAURrhVm91uqNqEXlXTjqWUBiKpWcfXEYp/plnGcljS/aMSlhcbz0OQyMyUYuykwMhlejnVoifsPKM7DgTqC7DwImsENka7Ddg4WiqR4/scPj5OdMe4qMFjahkANQWEuEUz2iaRsFFw/uanGcrmO+U1ZtfRbjCM5g4J7U5g/dyzLKdLMSLwUqYFG3ZA1B03ZFGpc5bH07FBOApYnbJgYZdgBvbUBD9+eyGFlElLlpXJIu1HEzMhlzo71hh+KsqL2wdQLJRgSLKNfk6Nvo8u1hzgNIYh7ShlhFUIJITFbK1wG1h2BXRZYOL7qNYyG2smpXmfirHGT4OQro1YQ7I2rkKc2Exgq8v98qoTWCSGMQ+HWd1YtuZP8Drz8tgYvZnCQJvwxKgc+LAESTn X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?/nqf6IFwB3CPCbbRdJCU3eQiOLgTE7bvzJnV/tL0+L/yxTDclPZ8nxCAgioG?= =?us-ascii?Q?t6mfHCuGDYtGVu9gns7a53A8I1/Nv+y7CDF/+hXYhGuSbRxzuNHDNZb+Pz2u?= =?us-ascii?Q?EJuPf2o20uH8oasLOoag2JjjiaBLLUG96vUoyb+UBvqwUT9FqttRJQrhe/MW?= =?us-ascii?Q?y6ny7pBMMHwlNFbawawgKx6WWghTRyh/C+35euybWI+FS5NYep2uzYxG+m0w?= =?us-ascii?Q?CGOY4fWViIBhiFrbgAFJCf0QT55Ng6fXJsUlE64U4MiCctYPWcWwLPLmt8Xn?= =?us-ascii?Q?zpcjhERo0m3B0LjOuG92Sf27qWAfevAbwGPcCeLtMVm5ly1TzscTZT2Gvmv3?= =?us-ascii?Q?5jpEHveYFrhrtL8FXZJdPCK82kXkIOtx8+URuIPTB/t27oqvuHcebpDwtsMk?= =?us-ascii?Q?hOuOJYmIqF62ExclU6j27DyMCVuiUFe8p3SYiSy14bhr+7eT481oNu3Tg6w2?= =?us-ascii?Q?6B2vSi99ABBrzyW2d1wFz3jHwrTK1PrKHLXDjR4ZOgWO/ISk0KRHZ7hWgjRD?= =?us-ascii?Q?TnN605oMnfRaGnala2kGImt22FSlIh1I6PtBIxdjYk0+zowrv0Om15joXJRQ?= =?us-ascii?Q?B4rDlbdstjYdZOZaoapaEQ7LBACgoUjNNnq3Oerx9+6UY6j2aXUrRixYWOa6?= =?us-ascii?Q?ZAB/aEF2sOYhPdoQ5lm4b0YMRctz8X8WsVOGAUtGGAHs+8v54neCwF/AlT6u?= =?us-ascii?Q?6HeUMt33pOf5HQ19N382llPvlDe4PgGbRP9DCYH/B8oTjKi/2MPqXXoAySuk?= =?us-ascii?Q?2ILINp737qbWwbt5xJgqXwfgu0kLqVbeMcfiC8z5+iRIH2dB0CrD0g/TFxwB?= =?us-ascii?Q?zpTrkOv0WB0W7coAE6M/CUzce5NV6EKUx4qOcfSIqdqfUcAfQ9ywPpz+j0On?= =?us-ascii?Q?VqdAVNdfBGahSV7bMZjNUtqb7gBnMHZMuBoa2rRWuOA06c4r42KMvbBEZuZP?= =?us-ascii?Q?pNKKxy6wT1GqtT2sb331RYe0V4L5CCUhRClD6LZDyOQvV9GQ1MtmdviGlUkF?= =?us-ascii?Q?+AABdZbf6l23GC/ky3sA1CKzkIuZ5epBkIWZtZ5MOg8IRk437pqjEhKXDOs5?= =?us-ascii?Q?5XSOegeBnZfHYwK/piBUNG/Y8TnDwe6xc7zZNBb5uqwV2ThPQBmoWbZccGS/?= =?us-ascii?Q?ughG7ZtAgwgysrBU5ChGz6scvU4e1EQkz3M3h3ZArsAiVC/v0UDCUxAVjegL?= =?us-ascii?Q?A2I4nGvy4RfLUMCIjG4ZZSqvyY312M6+5VYG0oxiqqJ2HCKAkvRhuB02qndx?= =?us-ascii?Q?XW9iNT8+25OWFs+lYSdr?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f36ab9f-1475-4f1f-ab23-08dc5fac144d X-MS-Exchange-CrossTenant-AuthSource: CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2024 13:33:06.1710 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR84MB3762 Received-SPF: pass client-ip=2a01:111:f403:2c14::800; envelope-from=Morgan.J.Smith@outlook.com; helo=NAM11-BN8-obe.outbound.protection.outlook.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, SPF_HELO_PASS=-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-Spam-Score: -4.28 X-Spam-Score: -4.28 X-Migadu-Queue-Id: 5F0831097C X-Migadu-Scanner: mx13.migadu.com X-TUID: +VZB//W+bNke --=-=-= Content-Type: text/plain Hello! I may or may not have been trying to rewrite `org-clock-sum' for like the 5th time. Anyways I was wanting to parse a file using `org-element-cache-map' that looked roughly like this: ======== * clock :LOGBOOK: CLOCK: [2024-03-24 Sun 15:18]--[2024-03-24 Sun 15:39] => 0:21 :END: ======= However I couldn't get the clock element this way. After much trail and error I found that simply adding another heading on the end allowed me to get the clock element! I've attached a test so you can reproduce the problem. In the test it is a paragraph element that is not showing up. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-failing-test.patch >From 9deff2111b73bb2ceb9127db5d88486affa04f0b Mon Sep 17 00:00:00 2001 From: Morgan Smith Date: Thu, 18 Apr 2024 09:18:51 -0400 Subject: [PATCH] failing test --- testing/lisp/test-org-element.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index 8b2cf1642..313556f49 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -4983,6 +4983,19 @@ Text ;;; Test Cache. +(ert-deftest test-org-element/cache-map () + "Test `org-element-cache-map'." + (org-test-with-temp-text "* headline\n:DRAWER:\nparagraph\n:END:\n* headline 2" + (should + (equal + '(org-data headline section drawer paragraph headline) + (org-element-cache-map #'car :granularity 'element)))) + (org-test-with-temp-text "* headline\n:DRAWER:\nparagraph\n:END:" + (should + (equal + ;; This fails because paragraph isn't found! + '(org-data headline section drawer paragraph) + (org-element-cache-map #'car :granularity 'element))))) (ert-deftest test-org-element/cache () "Test basic expectations and common pitfalls for cache." -- 2.41.0 --=-=-=--