[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dslide 91652de16a 15/16: Bug fix for reverse-in-place (!)
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dslide 91652de16a 15/16: Bug fix for reverse-in-place (!) |
Date: |
Mon, 25 Nov 2024 01:00:03 -0500 (EST) |
branch: elpa/dslide
commit 91652de16ad5a17dcace61c149e70a84656be5ed
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>
Bug fix for reverse-in-place (!)
The manual section on progress tracking is must-read for working on this
stuff.
The scheme for reverse-in-place is supposed to use the :end property when
going
backwards. Instead, it was only comparing the :begin property, resulting in
bugs that would affect actions that were very particular.
The first pass of the new image action features, with its callbacks and
punching
the progress tracking marker, excited this failure mode.
---
dslide.el | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/dslide.el b/dslide.el
index 607a17fe23..f59db36fe0 100644
--- a/dslide.el
+++ b/dslide.el
@@ -2309,8 +2309,8 @@ and NO-RECURSION are described in `org-element-map'."
(defun dslide--section-next
(heading type after &optional pred inclusive info no-recursion)
"Return HEADING's next element of TYPE.
-By default, matches only after AFTER but with optional INCLUSIVE,
-also includes matches at AFTER.
+By default, matches only beginning after AFTER but with optional
+INCLUSIVE, also includes matches beginning exactly at AFTER.
PRED, INFO, FIRST-MATCH, and NO-RECURSION are described in
`org-element-map'."
@@ -2321,20 +2321,24 @@ PRED, INFO, FIRST-MATCH, and NO-RECURSION are described
in
(dslide--section-map
heading type combined-pred info t no-recursion)))
+;; ⚠️ Check the manual section on progress tracking! INCLUSIVE was used to
+;; implement reverse-in-place in the action methods.
(defun dslide--section-previous
(heading type before &optional pred inclusive info no-recursion)
"Return HEADING's previous element of TYPE.
-By default, matches only before BEFORE but with optional
-INCLUSIVE, also includes matches exactly at BEFORE.
+By default, matches only beginning before BEFORE but with optional
+INCLUSIVE, also includes matches ending exactly at BEFORE.
PRED, INFO, FIRST-MATCH, and NO-RECURSION are described in
`org-element-map'."
(let* ((combined-pred (dslide-and
pred
(lambda (e) (funcall (if inclusive #'<= #'<)
- (org-element-property :begin e)
before)))))
+ (org-element-property
+ (if inclusive :end :begin) e)
+ before)))))
;; We can't map in reverse, so just retrieve all matched elements and
- ;; return the last one.
+ ;; return the last one matched.
(car (last (dslide--section-map
heading type combined-pred info nil no-recursion)))))
- [nongnu] elpa/dslide updated (552e63c6ac -> 0d9a1f6c27), ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide 513b1109fb 06/16: Get rid of erroneous step padding in simple slide images, ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide 8b4336db4d 02/16: use the current slide's filter, ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide 6d9ebfb79a 08/16: clean up propertize action for showing off, ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide f59c85784c 11/16: Aha! image-keyword interplay fixed, ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide 10b1386cf4 03/16: Hide the newline after each affiliated keyword, ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide d2217bc74f 07/16: Quick fix for TODO and tag hiding in contents, ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide 91652de16a 15/16: Bug fix for reverse-in-place (!),
ELPA Syncer <=
- [nongnu] elpa/dslide 7949a5f337 09/16: Hiding filtered headings needs to collapse display completely, ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide ad7f189032 10/16: reverse action list when going backwards or starting at the end, ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide 0e027e0527 04/16: Clip newline from text property action overlay region, ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide 1aa45a2223 05/16: Only cleanup overlays in finish, only for this slide, ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide 0d9a1f6c27 16/16: Release 0.5.5, ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide 0c5b00b4ec 01/16: line noise, ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide 3aa8ea4bcc 12/16: Good things for the manual. Updates to generated., ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide 0a068013b3 13/16: Image feature cleanups. Good to go 👌, ELPA Syncer, 2024/11/25
- [nongnu] elpa/dslide 3fbc0a6cfb 14/16: implement peeking for section and child mapping, ELPA Syncer, 2024/11/25