[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dslide 04b2888a52 192/230: Hide markup action hides affili
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dslide 04b2888a52 192/230: Hide markup action hides affiliated keywords |
Date: |
Sun, 7 Jul 2024 19:00:37 -0400 (EDT) |
branch: elpa/dslide
commit 04b2888a529545d91acbd4f766b9013ce4c936c0
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>
Hide markup action hides affiliated keywords
Also removed old advice to use mc's mc-hide-markup-mode
Really wish the parser would just give me the affiliated keywords
Signed-off-by: Psionik K <73710933+psionic-k@users.noreply.github.com>
---
dslide.el | 15 +++++++++++++--
test/demo.org | 2 --
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/dslide.el b/dslide.el
index eadf21394d..44ebe7874c 100644
--- a/dslide.el
+++ b/dslide.el
@@ -1181,14 +1181,25 @@ for `dslide-contents-map'."
;; ** Hide Markup Action
(defclass dslide-action-hide-markup (dslide-action)
((types
- :initform '(drawer property-drawer keyword)
+ :initform '(drawer property-drawer)
:initarg :types
:description "Either org element or types that should be hidden."))
"Hides element based on type.")
(cl-defmethod dslide-begin ((obj dslide-action-hide-markup))
(dslide-section-map obj (oref obj types)
- (lambda (e) (push (dslide-hide-element e)
dslide--overlays))))
+ (lambda (e) (push (dslide-hide-element e)
dslide--overlays)))
+ ;; Ooooh! right, yeah, the element parser doesn't give you affiliated
keywords
+ ;; when you ask for keywords. As much sense as that would make, the only
+ ;; technique I've found for this is falling back to regex.
+ (save-excursion
+ (let ((bound (org-element-property :end (dslide-heading obj))))
+ (goto-char (oref obj begin))
+ (while (re-search-forward org-keyword-regexp bound t)
+ (let ((overlay (make-overlay (match-beginning 0)
+ (1+ (match-end 0)))))
+ (overlay-put overlay 'invisible t)
+ (push dslide--overlays overlay))))))
(cl-defmethod dslide-end ((obj dslide-action-hide-markup))
(dslide-begin obj))
diff --git a/test/demo.org b/test/demo.org
index fb6379dce9..efd52095a5 100644
--- a/test/demo.org
+++ b/test/demo.org
@@ -263,8 +263,6 @@ If a feature seems like it's missing, it can probably be
added. There is a babe
View customize variables by calling =M-x customize-group RET dslide=
** Slide Actions
Slide actions are configured using the heading's property drawer.
-** Hiding Markup
-Check out ~mc-hide-markup-mode~ in the
[[https://github.com/positron-solutions/master-of-ceremonies][master-of-ceremonies]]
package.
** Steezing Org
The setup used for the Positron's YouTube demos is not much more complex than
this well-documented setup by
[[https://systemcrafters.net/emacs-tips/presentations-with-org-present/][System
Crafters]]. Also see Prot's
[[https://protesilaos.com/codelog/2020-07-17-emacs-mixed-fonts-org/][further]]
documentation on customizing org mode faces and fonts.
- [nongnu] elpa/dslide 93585c9173 158/230: slide composition order change (soon to refactor), (continued)
- [nongnu] elpa/dslide 93585c9173 158/230: slide composition order change (soon to refactor), ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 00597b9770 155/230: customization reminders in the demo, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 77126167a3 159/230: remove extraneous method qualifiers, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 2ec658ec9e 162/230: reverse-in-place for children, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide a58a915104 163/230: understand progress from org elements, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 586082e591 165/230: set overlay initial height, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 6cf49d2625 181/230: Oh yeah, seq-find doesn't return the result, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 935224a638 182/230: ! introducing peel animation, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 217ddbe03e 185/230: a bit better display behavior, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 3a77163b15 188/230: ! hide markup action, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 04b2888a52 192/230: Hide markup action hides affiliated keywords,
ELPA Syncer <=
- [nongnu] elpa/dslide 7ae80ecdca 194/230: cleaning up light misinformation, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide df98f4e5c2 197/230: remove babel results, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide cdf8d97eb6 198/230: hide non-exporting babel, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide b95576d460 201/230: Remove flickering caused by animation float / int behavior mismatch, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 1f02a2dfc0 205/230: line noise, no-op changes, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide f2ef90a2bd 209/230: document various results / exports behaviors in babel demos, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 0326d4d115 217/230: Fix mode check for dslide-develop command, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 5d1c50be3d 225/230: Add default to the header face specification, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 4be48e907b 228/230: dslide--overlays now public, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 45e93c645a 223/230: respect customize header option on slide narrow, ELPA Syncer, 2024/07/07