[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `org-element-cache-map' misses elements at end of buffer
From: |
Morgan Smith |
Subject: |
Re: `org-element-cache-map' misses elements at end of buffer |
Date: |
Fri, 19 Apr 2024 07:39:15 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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).
I guess my next current step is to read the manual on breakpoints. I'm
getting a little tired of just shoving print statements everywhere.
#+BEGIN_SRC elisp
;; I get that this use case looks weird but in a more complicated
;; situation I also experienced freezing so I'm hoping solving this case
;; will also solve my other situation.
(require 'org-test)
(org-test-with-temp-text "* headline\nCLOCK: => 23:43\n"
(let ((headline (progn (goto-char (point-min)) (org-element-at-point))))
(org-element-cache-map
#'car
:granularity 'element
:next-re org-element-clock-line-re
:after-element headline)))
#+END_SRC