[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dslide aed4afd84a 063/230: implement hiding children
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dslide aed4afd84a 063/230: implement hiding children |
Date: |
Sun, 7 Jul 2024 19:00:16 -0400 (EDT) |
branch: elpa/dslide
commit aed4afd84ae2209c2125e124056b2e5390c07e73
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>
implement hiding children
drive-by fixes on proximate docs
Signed-off-by: Psionik K <73710933+psionic-k@users.noreply.github.com>
---
macro-slides.el | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/macro-slides.el b/macro-slides.el
index 350330c55c..6c4b2033d2 100644
--- a/macro-slides.el
+++ b/macro-slides.el
@@ -1996,8 +1996,6 @@ Return the heading unless it's filtered."
;; `org-cycle-tree' before calling if strange behavior is observed.
;; TODO keep-lines seems kind of slow
-;; TODO move this up into the action class and pass through to these as private
-;; methods.
(defun ms-hide-region (beg end &optional keep-lines)
"Return overlay hiding region between BEG and END.
Optional KEEP-LINES will replace region with as many newlines as
@@ -2038,7 +2036,7 @@ the region contains, preserving vertical size."
"Return an overlay that hides the contents of ELEMENT.
Element is an org element. You should probably not use this on
headings because their contents includes the sections and the
-children.
+children. See `ms-hide-section' and `ms-hide-children'.
Optional KEEP-LINES will replace region with as many newlines as
the region contains, preserving vertical size."
@@ -2047,10 +2045,8 @@ the region contains, preserving vertical size."
keep-lines))
(defun ms-hide-section (heading &optional keep-lines)
- "Return an overlay that hides the section of ELEMENT.
-Element is an org element. You should probably not use this on
-headings because their section includes the sections and the
-children.
+ "Return an overlay that hides the section of HEADING.
+HEADING is a headline type org element.
Optional KEEP-LINES will replace region with as many newlines as
the region contains, preserving vertical size."
@@ -2059,6 +2055,17 @@ the region contains, preserving vertical size."
(ms--section-end heading)
keep-lines))
+(defun ms-hide-children (heading &optional keep-lines)
+ "Return an overlay that hides the children of HEADING.
+HEADING is a headline type org element.
+
+Optional KEEP-LINES will replace region with as many newlines as
+the region contains, preserving vertical size."
+ (ms-hide-region
+ (ms--section-end heading)
+ (org-element-end heading)
+ keep-lines))
+
;; * Element Mapping
;; Functions of headings are private so that corresponding slide methods can be
- [nongnu] elpa/dslide d6f732a080 145/230: collect animation code, use the centralized error indication, (continued)
- [nongnu] elpa/dslide d6f732a080 145/230: collect animation code, use the centralized error indication, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 9cc2872b4b 050/230: update readme to reflect reality, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide b8a70b893d 052/230: options for image action, include-linked, refresh, kill-buffer, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide af7169b85b 044/230: helpful package high-level comments, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 0d9518c64e 049/230: Include demo org for feedback on configuration markup, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 0016bc71aa 058/230: pushing some changes to the demo reflecting config API updates, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide d0a0678463 070/230: Removed face remapping (it was sent to master-of-ceremonies), ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 618b803f95 067/230: !refactor Telescopio, the parents now call through their children, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide bdd5fff8d6 064/230: moving some code for packaging, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide a462b0a4ba 062/230: babel blocks should only clear results when configured to do so, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide aed4afd84a 063/230: implement hiding children,
ELPA Syncer <=
- [nongnu] elpa/dslide 199bb5b68b 079/230: Properties standardized to MS_ prefix, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide ada6553434 080/230: missed a few updates to property names, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide fca6e33a6c 060/230: Properly declare generic methods, reconcile documentation, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 4af0c6b990 084/230: Remove vestigal push-* code, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 0cbd0b7bab 081/230: Remove vestigal ms-slide-hook, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 1d61b6ffc1 083/230: Codify the hooks and lifecycle feedback messages, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 31fc027f52 057/230: !temporary basic composition support, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 09b9e5bc63 071/230: keep-fill implementation for hiding, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 2c515e58d0 127/230: remove redundant actions in demo, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 5cf6e1d521 102/230: option to hide mode line when displaying images, ELPA Syncer, 2024/07/07