[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dslide e02862a177 5/8: Introducing Breadcrumb appending op
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dslide e02862a177 5/8: Introducing Breadcrumb appending options |
Date: |
Thu, 28 Nov 2024 06:59:38 -0500 (EST) |
branch: elpa/dslide
commit e02862a17763e7c7bb6f513300ed2ff7d072b0a9
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>
Introducing Breadcrumb appending options
---
dslide.el | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/dslide.el b/dslide.el
index 416815355c..2f271e2478 100644
--- a/dslide.el
+++ b/dslide.el
@@ -223,6 +223,11 @@ properties remain unless shadowed."
:type '(choice (const :tag "Don't display breadcrumbs" nil)
(string :tag "Delimiter")))
+(defcustom dslide-breadcrumb-separator-style 'append
+ "Where breadcrumb separators will be used.
+This helps distinguish the breadcrumbs from the slide headline."
+ :type '(choice (const :tag "After each breadcrumb" append)
+ (const :tag "Only between breadcrumbs" separate)))
(defcustom dslide-breadcrumb-hide-todo-state t
"If non-nil, hide TODO states in the breadcrumbs."
@@ -2564,10 +2569,22 @@ from existing state cleanup."
(defun dslide--breadcrumbs-reducer (delim)
(lambda (previous next)
- (if (not previous) next
- (let ((props (text-properties-at (1- (length previous)) previous)))
- (concat previous (apply #'propertize delim props)
- next)))))
+ (let* ((props (pcase dslide-breadcrumb-separator-style
+ ('append (text-properties-at (1- (length next))
+ next))
+ ('separate (when previous
+ (text-properties-at
+ (1- (length previous)) previous)))
+ (_ (display-warning '(dslide dslide-breadcrumb)
+ "Uknown separators style"))))
+ (delim (apply #'propertize delim props)))
+ (pcase dslide-breadcrumb-separator-style
+ ('append
+ (if (not previous) (concat next delim)
+ (concat previous next delim)))
+ ('separate
+ (if (not previous) next
+ (concat previous delim next)))))))
;; TODO use element API
(defun dslide--get-parents (delim)
- [nongnu] elpa/dslide updated (c2b4d2991a -> a374df8a56), ELPA Syncer, 2024/11/28
- [nongnu] elpa/dslide dbbe0c10dc 3/8: Cruft removals, ELPA Syncer, 2024/11/28
- [nongnu] elpa/dslide e6967c7501 2/8: Some manual changes to try to point towards 1.0 goals, ELPA Syncer, 2024/11/28
- [nongnu] elpa/dslide ab5163d5e9 4/8: naming consistency: breadcrumbs -> breadcrumb only, ELPA Syncer, 2024/11/28
- [nongnu] elpa/dslide a374df8a56 8/8: news file added, ELPA Syncer, 2024/11/28
- [nongnu] elpa/dslide 9b4171bd81 1/8: Update package commentary, ELPA Syncer, 2024/11/28
- [nongnu] elpa/dslide 9c0197f7b0 6/8: rearrangement, ELPA Syncer, 2024/11/28
- [nongnu] elpa/dslide e02862a177 5/8: Introducing Breadcrumb appending options,
ELPA Syncer <=
- [nongnu] elpa/dslide c0e4aff0ac 7/8: Catch errors in step callbacks, remove, warn user, ELPA Syncer, 2024/11/28