emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/breadcrumb acd014f226: Fix #22: Work around org trouble


From: ELPA Syncer
Subject: [elpa] externals/breadcrumb acd014f226: Fix #22: Work around org trouble when imenu-auto-rescan is t
Date: Tue, 7 Nov 2023 06:57:25 -0500 (EST)

branch: externals/breadcrumb
commit acd014f226e1f770e6f27c20c8d6eb99f557e970
Author: João Távora <capitaomorte@archlinux2022.linuxvmimages.local>
Commit: João Távora <capitaomorte@archlinux2022.linuxvmimages.local>

    Fix #22: Work around org trouble when imenu-auto-rescan is t
    
    Guess I can fix this, though imenu-auto-rescan is an absolutely
    dreadful idea anyway, at least for org.
    
    * breadcrumb.el (Version): Bumpt to 1.0.1
    (bc--ipath-plain): Convert some markers to points.
---
 breadcrumb.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/breadcrumb.el b/breadcrumb.el
index 2ab37459f7..cb051b8ea1 100644
--- a/breadcrumb.el
+++ b/breadcrumb.el
@@ -193,6 +193,12 @@ These structures don't have a `breadcrumb-region' property 
on."
                 (setq ipath (cons (car n) ipath))
                 (if (consp (cdr n))
                     (mapc (lambda (n2) (dfs n2 ipath (cdr n))) (cdr n))
+                  ;; FIXME: we convert markers to points via the `+'
+                  ;; down there.  But for siblings, no such conversion
+                  ;; happens, they might still point to invalid
+                  ;; markers.  Not worth doing another tree traversal
+                  ;; for that IMO, and siblings seems to be unused
+                  ;; anyway (github#22)
                   (put-text-property 0 1 'breadcrumb-siblings (cdr siblings) 
(car ipath))
                   (setq bc--ipath-plain-cache
                         (vconcat bc--ipath-plain-cache
@@ -202,7 +208,7 @@ These structures don't have a `breadcrumb-region' property 
on."
                                      ;; "overlay" edge case.
                                      (cl-etypecase (cdr n)
                                        (number (cdr n))
-                                       (marker (cdr n))
+                                       (marker (+ (cdr n) 0))
                                        (overlay (overlay-start (cdr n))))
                                      ipath)])))))
     (unless bc--ipath-plain-cache



reply via email to

[Prev in Thread] Current Thread [Next in Thread]