[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dslide aea35ee8e7 073/230: line-noise renaming, comments.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dslide aea35ee8e7 073/230: line-noise renaming, comments... |
Date: |
Sun, 7 Jul 2024 19:00:17 -0400 (EDT) |
branch: elpa/dslide
commit aea35ee8e71a79a8f1ed56c5f8ab7793ef2abf27
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>
line-noise renaming, comments...
Signed-off-by: Psionik K <73710933+psionic-k@users.noreply.github.com>
---
macro-slides.el | 48 ++++++++++++++++++++++++++----------------------
1 file changed, 26 insertions(+), 22 deletions(-)
diff --git a/macro-slides.el b/macro-slides.el
index e06a9729c6..d6d3256854 100644
--- a/macro-slides.el
+++ b/macro-slides.el
@@ -506,9 +506,11 @@ point or else infinite loops will result.")
(cl-defgeneric ms-goto (obj point)
"Step forward until advancing beyond POINT.
This method can usually be implemented on top of
-`ms-step-forward' by advancing until POINT is exceeded. The
-default implementation calls init. You should call init if you
-override this method.")
+`ms-step-forward' by advancing until POINT is exceeded. Return
+nil if POINT was not exceeded. Return non-nil if the sense of progress exceeds
+POINT. Usually, child actions will be responsible for determining if the
+POINT belongs to this slide or one of its child slides, and the slide will
+just ask the child action.")
;; ** Stateful Sequence
(defclass ms-stateful-sequence ()
@@ -1184,8 +1186,7 @@ Many optional ARGS. See code."
;; backward methods. TODO TODO TODO 🚧
;; ** Base Action
-(defclass ms-action (ms-stateful-sequence
- ms-progress-tracking)
+(defclass ms-action (ms-stateful-sequence ms-progress-tracking)
((begin
:initform nil :initarg :begin
:documentation "Marker for beginning of heading. Used to
@@ -2001,7 +2002,7 @@ Does not modify the point."
(defun ms--any-heading ()
"Return any heading that can be found.
-Does not modifiy the point."
+Does not modify the point."
(save-excursion
(if (not (numberp (org-back-to-heading-or-point-min)))
(org-element-at-point)
@@ -2202,10 +2203,10 @@ and the value of `point-max' should contain a newline
somewhere."
(widen)
(buffer-substring headline-begin (1- headline-end)))))))
-(defun ms--clean-up-state ()
+(defun ms--cleanup-state ()
"Clean up states between contents and slides."
(ms--delete-header)
- (ms--delete-overlays)
+ (ms--delete-overlays)
(ms--animation-cleanup))
(defun ms--ensure-deck ()
@@ -2294,12 +2295,13 @@ hooks must occur in the deck's :slide-buffer."
(setq ms--animation-overlay nil
ms--animation-timer nil))
-(defun ms--ensure-slide-buffer (&optional display)
+(defun ms--ensure-slide-buffer (&optional display-action)
"Run in commands that must run in the slide buffer."
(unless (ms-live-p)
- (error "Live deck not found within buffer"))
- (if display
- (display-buffer (oref ms--deck slide-buffer))
+ (error "Live deck not found"))
+ (if display-action
+ (display-buffer (oref ms--deck slide-buffer)
+ display-action)
(set-buffer (oref ms--deck slide-buffer))))
(defun ms--keyword-value (key)
@@ -2435,7 +2437,7 @@ Optional ERROR if you want to process
`wrong-type-argument'."
#'ms-display-slides))
(run-hooks 'ms-start-hook))
(t
- (ms-stop))))
+ (ms--stop))))
(defun ms-live-p ()
"Check if a deck is associated so that commands can complete."
@@ -2446,7 +2448,7 @@ Optional ERROR if you want to process
`wrong-type-argument'."
;; TODO rename these functions to `switch-to'?
(defun ms-display-slides ()
(ms--ensure-slide-buffer t)
- (ms--clean-up-state)
+ (ms--cleanup-state)
(oset ms--deck slide-buffer-state 'slides)
(widen)
(org-fold-show-all)
@@ -2457,7 +2459,7 @@ Optional ERROR if you want to process
`wrong-type-argument'."
This is a valid `ms-start-function' and will start
each slide show from the contents view."
(ms--ensure-slide-buffer t)
- (ms--clean-up-state)
+ (ms--cleanup-state)
(oset ms--deck slide-buffer-state 'contents)
(widen)
@@ -2483,29 +2485,31 @@ each slide show from the contents view."
(unless ms--deck
(error "No deck exists"))
(oset ms--deck slide-buffer-state 'base)
- (switch-to-buffer (oref ms--deck base-buffer))) ; TODO unknown slot warning
+ ;; TODO display strategy
+ (switch-to-buffer (oref ms--deck base-buffer)))
-(defun ms-stop ()
+(defun ms--stop ()
"Stop the presentation entirely.
-Kills the indirect buffer, forgets the deck, and return to the
+Kills the indirect buffer, forgets the deck, and displays the
source buffer."
(interactive)
(when-let* ((deck ms--deck)
- (slide-buffer (oref deck slide-buffer)) ; TODO unknown slot
- (base-buffer (oref deck base-buffer))) ; TODO unknown slot
+ (slide-buffer (oref deck slide-buffer))
+ (base-buffer (oref deck base-buffer)))
;; TODO possibly finalize in state cleanup. Slides <-> contents switching
;; may require attention.
(with-demoted-errors "Deck finalization failed: %s"
- (ms-final ms--deck))
+ (ms-final ms--deck))
;; Animation timers especially should be stopped
;; TODO ensure cleanup is thorough even if there's a lot of failures.
;; TODO make the deck a child sequence of a presentation ;-)
- (ms--clean-up-state)
+ (ms--cleanup-state)
(setq ms--deck nil)
+ ;; TODO display strategy
(switch-to-buffer base-buffer)
(when slide-buffer
- [nongnu] elpa/dslide 1f02a2dfc0 205/230: line noise, no-op changes, (continued)
- [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
- [nongnu] elpa/dslide a58924cd8e 031/230: line noise, rearrangement, whitespace, minor tweaks, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 5cce77b4eb 032/230: some readme updates, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 86fb3a7e0d 056/230: Pass an :inline argument to every child action, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 280b028e11 065/230: !dirty, pre-refactor commit to comment on architecture, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide aea35ee8e7 073/230: line-noise renaming, comments...,
ELPA Syncer <=
- [nongnu] elpa/dslide 3945a6a759 061/230: assorted doc noise and one change to be consistent with docstring, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 3d52359eb9 066/230: Babel blocks can run multiple end, init, and final blocks, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 997fc0905a 106/230: results none is preferable during presentation, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 2650f33a78 100/230: success & error highlights for babel slides, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide a9052e5ae2 129/230: demo directions a bit more interactive and clear, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 56fde60604 120/230: dslide-contents-header -> dslide-header, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 98c9c95505 099/230: custom implementation of pulse, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 5c4728025e 111/230: dslide-backward -> dslide-presentation-backward, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide e38a7ff5ac 125/230: Introduction in demo, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 4a85855383 133/230: remove redundant :after, ELPA Syncer, 2024/07/07