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 ms1.migadu.com with LMTPS id eG2rFAD9JGYeTQAA62LTzQ:P1 (envelope-from ) for ; Sun, 21 Apr 2024 13:48:16 +0200 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 eG2rFAD9JGYeTQAA62LTzQ (envelope-from ) for ; Sun, 21 Apr 2024 13:48:16 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=DQ3bIFC3; dmarc=pass (policy=none) header.from=posteo.net; 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=1713700096; 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=yQ8MqFiWTvEZIpFPvxpfSvrp4l+TLt54iuDG2rP/gnc=; b=hgEx2soRzgmJFMEkjtgwhaNiwsWuj01YfA2QgVkatNs5GmyKjCbBE3cd0ew8bqcpkc22gi EAqUxNsmcj8dozKRrpY8M+Bacvg4mU7vr1iq4leVOuGLuM3ovMAdysntm2lJFM6p7GRjcy I1ZVH7Peq/OE47txo/mgjLmiy/Fjk0AuKPtpimhSiDNAQ2z+7v1NAhSQG56D4i1YUV6gIR 4cSV/cVDQ+7wFlIEJBxyWI17iBN+1zbuG2/to/gy/o67IJKlXHESbtEP905IpOu4Th3RPJ 1P77RnQp+aAy98DIwd6vD7laZNyNvOGPhcVW5n7Z6mDD4dAFpCR5LvtE+lFG2Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=DQ3bIFC3; dmarc=pass (policy=none) header.from=posteo.net; 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=1713700096; a=rsa-sha256; cv=none; b=L0fqD7XESkUUvVE+5ZhwdGaj/kNnNQEOBDG9IhJ2ePHL4vWGjjx5sx+LOp2O4iK50Vk3FV XAqUtA/vJnH1yKmjxSxT1h6ja75g7muC/tpiSllagv4qcvCAJogn7PNssz8AV4wbNE/nBI je+JdsL6IY3J06SwAfhz24sIH/u7OZMUnXa1UxiqbSznghv0uIYHjrkLYqf/KGw3B8G1Dt zeFLtxXuLkG6j0PU0M7uemrGRKVpHVbcJSB4K0v+7B5lsl+9u2CMLUR/8fOrD2GcwtoFpu wWYYLXGYXUo0Y85IOALAVQ/gsVlHIUa2FTvqVzxWPeoeUe1ccrh7Yl/ZbccYwg== 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 C5D0562B30 for ; Sun, 21 Apr 2024 13:48:15 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ryVfR-0005HH-IU; Sun, 21 Apr 2024 07:47:34 -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 1ryVfN-0005Gl-RK for emacs-orgmode@gnu.org; Sun, 21 Apr 2024 07:47:31 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ryVfK-0006sm-6q for emacs-orgmode@gnu.org; Sun, 21 Apr 2024 07:47:29 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 6F9DC240101 for ; Sun, 21 Apr 2024 13:47:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1713700043; bh=vr3ZOH2Q/SW4Tm6AzVqscow5Sl/irqBZLY4LZ/ykRgg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=DQ3bIFC3/a3TGXW4sAYLfvM4GwYlkrWz+yMah9/SrPlRc2f4ehyfIY4rMatGOH28x gGRYleI+ZzsB28zUWlpGCib7RScDl9XogdEmN93dxKd3nP5SYq8wbRXvEMBOu4Fr1M aKcFazk3EldOPCGD7xo1MYvEfz3dLnF9dPKlfZAMmL4//5vr3B+0Tql6ej65+j/pZf a8qC1jMAK26nHzqEJR2Nv2tZdCV+/sUC6FELgPr0HjlYIZGk5JOXkRMlzqiyQgN28c Znip6HW8sr4Fv96BZSXHcA07QD8yDKWNnqI4wqZpGEtAzQD5iISNY7VY8GTte/J//M rjrXp3+CS++Pw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VMmp24fddz6tvp; Sun, 21 Apr 2024 13:47:22 +0200 (CEST) From: Ihor Radchenko To: Morgan Smith Cc: emacs-orgmode@gnu.org Subject: Re: `org-element-cache-map' misses elements at end of buffer In-Reply-To: References: Date: Sun, 21 Apr 2024 11:48:12 +0000 Message-ID: <875xwbq6mb.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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-Spam-Score: -6.67 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -6.67 X-Migadu-Queue-Id: C5D0562B30 X-TUID: AfkYdw3++dpI Morgan Smith writes: > So I found another bug in `org-element-cache-map'. > > Executing the following code just freezes up. I am struggling to work > through the logic of `org-element-cache-map'. If no-one else magically > solves my issues, I'll figure it out eventually. But I would appreciate > some advice on how to debug this stuff (both my issue of missing > elements and freezing). Hmm. :after-element keyword logic is broken. It does not account for the case when :after-element is past the START point. It is the time to refactor this function yet again. (a tricky endeavour considering all the edge cases we can encounter when there are changes in buffer while `org-element-cache-map' is mapping over it). -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at