[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dslide 3a77163b15 188/230: ! hide markup action
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dslide 3a77163b15 188/230: ! hide markup action |
Date: |
Sun, 7 Jul 2024 19:00:36 -0400 (EDT) |
branch: elpa/dslide
commit 3a77163b1514fd85ed6fe2d3e56046372ef42a13
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>
! hide markup action
I didn't pretend the precedence or overrides are intact. They need to be
overhauled. To prevent the user from accidentally clobbering the default
actions, I made this always append for now. Too many actions is usually
less
bad than too few because actions are no-op if there's nothing to work on.
Signed-off-by: Psionik K <73710933+psionic-k@users.noreply.github.com>
---
dslide.el | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/dslide.el b/dslide.el
index 7b3e79b161..3a5f7ff1c5 100644
--- a/dslide.el
+++ b/dslide.el
@@ -305,7 +305,7 @@ keyword."
:group 'dslide)
;; TODO test the use of plist args
-(defcustom dslide-default-actions '()
+(defcustom dslide-default-actions '(dslide-action-hide-markup)
"Actions that run within the section display action lifecycle.
It's value is a list of symbol `dslide-action' sub-classes or (CLASS . ARGS)
forms where ARGS is a plist. Each subclass will be instantiated
@@ -1004,10 +1004,10 @@ Many optional ARGS. See code."
;; in an inline child versus an independent slide, even by looking
at
;; the restriction.
(section-action-classes
- (or (dslide--parse-classes-with-args
- (or (org-element-property :DSLIDE_ACTIONS heading)
- (cdr (assoc-string "DSLIDE_ACTIONS" keywords))))
- dslide-default-actions))
+ (append (dslide--parse-classes-with-args
+ (or (org-element-property :DSLIDE_ACTIONS heading)
+ (cdr (assoc-string "DSLIDE_ACTIONS" keywords))))
+ dslide-default-actions))
(section-actions
(mapcar
(lambda (c) (when c
@@ -1178,7 +1178,22 @@ for `dslide-contents-map'."
(when-let ((marker (oref obj marker)))
(set-marker marker nil)))
-;; ** Reveal items action
+;; ** Hide Markup Action
+(defclass dslide-action-hide-markup (dslide-action)
+ ((types
+ :initform '(drawer property-drawer keyword)
+ :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))))
+
+(cl-defmethod dslide-end ((obj dslide-action-hide-markup))
+ (dslide-begin obj))
+
+;; ** Item Reveal Action
;; Reveal items has a somewhat fun implementation. The end state is actually
;; simpler than the begin state. Going forward, we must remove overlays and
;; animate items. Going backward, we add overlays. When starting at the end,
- [nongnu] elpa/dslide 64dc89cd0f 156/230: allow explicit 'none for slide action class, (continued)
- [nongnu] elpa/dslide 64dc89cd0f 156/230: allow explicit 'none for slide action class, ELPA Syncer, 2024/07/07
- [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 <=
- [nongnu] elpa/dslide 04b2888a52 192/230: Hide markup action hides affiliated keywords, ELPA Syncer, 2024/07/07
- [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