[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-tree-slide 68779b8fe4 092/144: Add breadcrumbs (#23)
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-tree-slide 68779b8fe4 092/144: Add breadcrumbs (#23) |
Date: |
Tue, 18 Jan 2022 08:59:46 -0500 (EST) |
branch: elpa/org-tree-slide
commit 68779b8fe44cf6d09cb0829648d3a349fd663fda
Author: Matus Goljer <dota.keys@gmail.com>
Commit: Takaaki ISHIKAWA <takaxp@ieee.org>
Add breadcrumbs (#23)
* Add breadcrumbs
* Add an option to show/hide TODO from breadcrumbs.
---
org-tree-slide.el | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/org-tree-slide.el b/org-tree-slide.el
index 02554c6233..dcfead77b8 100644
--- a/org-tree-slide.el
+++ b/org-tree-slide.el
@@ -663,6 +663,20 @@ This is displayed by default if
`org-tree-slide-modeline-display' is `nil'.")
"If you have `#+AUTHOR:' line in your org buffer, it will be used as
a name of the slide author.")
+(defcustom org-tree-slide-breadcrumbs " > "
+ "Display breadcrumbs in the slide header.
+
+If non-nil, it should be a string used as a delimiter used to
+concat the headers."
+ :type '(choice (const :tag "Don't display breadcrumbs" nil)
+ (string :tag "Delimiter"))
+ :group 'org-tree-slide)
+
+(defcustom org-tree-slide-breadcrumbs-hide-todo-state t
+ "If non-nil, hide TODO states in the breadcrumbs."
+ :type 'boolean
+ :group 'org-tree-slide)
+
(defun org-tree-slide--apply-local-header-to-slide-header ()
(save-excursion
(org-tree-slide--move-to-the-first-heading)
@@ -689,6 +703,20 @@ This is displayed by default if
`org-tree-slide-modeline-display' is `nil'.")
(t (:bold t :foreground "black" :background "white")))
"Face for org-tree-slide--header-overlay")
+(defun org-tree-slide--get-parents (&optional delim)
+ "Get parent headlines and concat them with DELIM."
+ (setq delim (or delim " > "))
+ (save-excursion
+ (save-restriction
+ (widen)
+ (let ((parents nil))
+ (while (org-up-heading-safe)
+ (push (org-get-heading
+ 'no-tags
+ org-tree-slide-breadcrumbs-hide-todo-state)
+ parents))
+ (mapconcat 'identity parents delim)))))
+
(defun org-tree-slide--set-slide-header (blank-lines)
(org-tree-slide--hide-slide-header)
(setq org-tree-slide--header-overlay
@@ -707,6 +735,9 @@ This is displayed by default if
`org-tree-slide-modeline-display' is `nil'.")
(concat org-tree-slide-author " "))
(when org-tree-slide-email
(concat "<" org-tree-slide-email ">"))
+ (when org-tree-slide-breadcrumbs
+ (concat "\n" (org-tree-slide--get-parents
+ org-tree-slide-breadcrumbs)))
(org-tree-slide--get-blank-lines blank-lines)))
(overlay-put org-tree-slide--header-overlay 'display
(org-tree-slide--get-blank-lines blank-lines))))
- [nongnu] elpa/org-tree-slide 7983492eda 124/144: Fix minor typo in README (slip -> skip), (continued)
- [nongnu] elpa/org-tree-slide 7983492eda 124/144: Fix minor typo in README (slip -> skip), ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide d9fede1544 127/144: Merge pull request #36 from KaratasFurkan/create-variable-content-margin-top, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 5e5dbd908e 119/144: Update README.org, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 7126a43650 123/144: Fix typo, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 619fbb17a2 121/144: buffer-narrowed-p is applied, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 1fb3ecb637 132/144: Refine the default of header-overlay-face, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide daeb80986c 137/144: Fix face remap specifications, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 3faa042393 144/144: Merge pull request #49 from takaxp/revert-47-allow-empty-date-author, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide a0a03e75f4 083/144: Show content after last slide, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 2571cfe03b 017/144: Version 2.2.0 (adopt minor mode), ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 68779b8fe4 092/144: Add breadcrumbs (#23),
ELPA Syncer <=
- [nongnu] elpa/org-tree-slide 3a2d3733ba 091/144: Added Version header, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 4a895dec55 074/144: Merge branch 'master' of https://github.com/takaxp/org-tree-slide, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 6608f8d43b 096/144: Refine README and add a link to Moom, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 3f1d646eb1 098/144: Support faces for org-level-1, 4, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 603a383117 110/144: Revise docstring of org-tree-slide-skip-outline-level, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 80cb1ac6f9 116/144: Merge branch 'master' of github.com:takaxp/org-tree-slide, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 04b5a9dee1 131/144: Merge branch 'master' of github.com:takaxp/org-tree-slide, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 9d2ba1df45 134/144: Fix links in README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide b4650edc3f 135/144: Restore state more elegantly, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 8b44ae834f 073/144: Default keymap was changed, ELPA Syncer, 2022/01/18