emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/dslide 1a8cc52ac6 178/230: ! minor hack to support hacky h


From: ELPA Syncer
Subject: [nongnu] elpa/dslide 1a8cc52ac6 178/230: ! minor hack to support hacky hidden babel from demo
Date: Sun, 7 Jul 2024 19:00:34 -0400 (EDT)

branch: elpa/dslide
commit 1a8cc52ac647b6545a315f098325f686f01c01e5
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>

    ! minor hack to support hacky hidden babel from demo
    
    Likely just going to bake hiding into the configuration API and get rid of 
this
    style because of it's challenges regardling lifecycle
    
    Signed-off-by: Psionik K <73710933+psionic-k@users.noreply.github.com>
---
 dslide.el | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/dslide.el b/dslide.el
index c97ec26140..ca93f4e57e 100644
--- a/dslide.el
+++ b/dslide.el
@@ -1629,11 +1629,17 @@ Child headings become independent slides.")
 
 (cl-defmethod dslide-end ((obj dslide-slide-action-child))
   (dslide-marker obj (org-element-property :end (dslide-heading obj)))
-  (if-let ((child (dslide-child-previous obj)))
-      (let ((child (dslide--make-slide child (oref dslide--deck slide))))
-        (oset obj child child)
-        (dslide-end child))
-    (dslide-narrow obj)))
+  (let ((point-min (point-min))
+        (point-max (point-max)))
+    ;; TODO existing hidden babel kind of a hack
+    (if-let ((child (dslide-child-previous obj)))
+        (let ((child (dslide--make-slide child (oref dslide--deck slide))))
+          (oset obj child child)
+          (dslide-end child)
+          (when (and (= point-min (point-min))
+                     (= point-max (point-max)))
+            (dslide-narrow obj)))
+      (dslide-narrow obj))))
 
 (cl-defmethod dslide-final :after ((obj dslide-slide-action-child))
   (when-let ((child (oref obj child)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]