[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dslide 645c555272 036/230: minor fixes and no-effect chang
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dslide 645c555272 036/230: minor fixes and no-effect changes |
Date: |
Sun, 7 Jul 2024 19:00:12 -0400 (EDT) |
branch: elpa/dslide
commit 645c5552726b7407ba7ac321b537d3da56e45567
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>
minor fixes and no-effect changes
Signed-off-by: Psionik K <73710933+psionic-k@users.noreply.github.com>
---
macro-slides.el | 50 ++++++++++++++++++++++++--------------------------
1 file changed, 24 insertions(+), 26 deletions(-)
diff --git a/macro-slides.el b/macro-slides.el
index 3f4769b37d..672f65ed4b 100644
--- a/macro-slides.el
+++ b/macro-slides.el
@@ -1025,11 +1025,13 @@ find the slide that displays that POINT."
(oset obj slide (ms--make-slide
(ms--document-first-heading) obj)))
((eq how 'point)
- ;; TODO implement looking inside the slides using `goto' and recover
- ;; the child with POINT
- (oset obj slide
- (ms--make-slide
- (ms--root-heading-at-point) obj)))))
+ (let ((base-point (with-current-buffer (oref obj base-buffer)
+ (point))))
+ ;; TODO implement looking inside the slides using `goto' and recover
+ ;; the child with POINT
+ (oset obj slide
+ (ms--make-slide
+ (ms--root-heading-at-point base-point) obj))))))
(cl-defmethod ms-deck-live-p ((obj ms-deck))
"Check if all the buffers are alive or can be recovered."
@@ -1339,7 +1341,6 @@ all display. TODO It should cooperate via hydration in
the
`make-slide' function."
(let* ((progress)
(heading (ms-heading obj))
- (length (buffer-size))
(begin (oref obj begin))
(end (if with-children
(org-element-end heading)
@@ -1471,7 +1472,8 @@ instantiated from children, so their configuration is
meaningless.")
;; ** Reveal items section action
(defclass ms-action-item-reveal (ms-action)
- (overlays :initform nil)
+ ((overlays :initform nil)) ; TODO see if this fixes the slot
+ ; unbound issues
"Hide all items and then reveal them one by one.")
;; TODO may try to read uninitialized slot...
@@ -1562,7 +1564,8 @@ Optional UNNAMED will return unnamed blocks as well."
(without-restriction
(save-excursion
(goto-char (org-element-begin block-element))
- (org-babel-execute-src-block))))
+ ;; t for don't cache. We likely want effects
+ (org-babel-execute-src-block t))))
(cl-defmethod ms--get-block
((obj ms-action) &optional method-name)
@@ -1853,12 +1856,10 @@ children.
Optional KEEP-LINES will replace region with as many newlines as
the region contains, preserving vertical size."
- (save-excursion
- (goto-char (org-element-begin heading))
- (ms-hide-region
- (ms--section-begin heading)
- (ms--section-end heading)
- keep-lines)))
+ (ms-hide-region
+ (ms--section-begin heading)
+ (ms--section-end heading)
+ keep-lines))
;; * Element Mapping
@@ -2081,7 +2082,8 @@ Does not modify the point."
element 'headline)))
(if (eq 'headline (org-element-type element))
element
- (ms--any-heading))))
+ (or parent
+ (ms--any-heading)))))
(defun ms--any-heading ()
"Return any heading that can be found.
@@ -2315,9 +2317,7 @@ and throw an error if it's not live.
This function sets up the deck and links the buffers together via
the deck object. Many operations such as calling hooks must
occur in the display buffer."
- (cond
- ((ms-live-p)) ; TODO maybe display something?
- (t
+ (unless (ms-live-p)
;; Prevent starting within indirect buffers
(when (buffer-base-buffer (current-buffer))
(error "Buffer is indirect but deck is already live"))
@@ -2343,13 +2343,11 @@ occur in the display buffer."
(slide-buffer (clone-indirect-buffer
slide-buffer-name
nil))
-
- ;; TODO no initial marker
- (deck (make-instance class
- :base-buffer base-buffer
- :slide-buffer slide-buffer
- :window-config window-config)))
- ;; Set the deck in both base and slide buffer
+ (deck (apply class
+ :base-buffer base-buffer
+ :slide-buffer slide-buffer
+ :window-config window-config
+ nil)))
(setq ms--deck deck)
(switch-to-buffer slide-buffer) ;; TODO display options?
@@ -2358,7 +2356,7 @@ occur in the display buffer."
;; Enter the state model
(ms--choose-slide deck
ms-start-from)
- (ms--remap-faces t))))))
+ (ms--remap-faces t)))))
(defun ms--showing-contents-p ()
"Return t if current buffer is displaying contents."
- [nongnu] elpa/dslide dd8fe96b10 033/230: Buffer slide -> Push steps, global presentation, (continued)
- [nongnu] elpa/dslide dd8fe96b10 033/230: Buffer slide -> Push steps, global presentation, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 66215639a5 047/230: Image action displays inline images in its init method, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 27e87a7c6d 003/230: Option to not show author and title in header even when present, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide f8aa534207 001/230: Fix compiler warnings. Obsolete functions, too long comment, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide e4beb23e57 002/230: Match breadcrumb separator to text properties from previous heading, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 597ed25aa2 022/230: hook cleanup, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 7fbe8db983 005/230: compiler warning, unused variable, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide cb31e38633 041/230: push-restriction uses markers, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 1766661399 037/230: comments & whitespace, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 14e4d670f3 045/230: !ugly Support arguments from heading properties =D, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 645c555272 036/230: minor fixes and no-effect changes,
ELPA Syncer <=
- [nongnu] elpa/dslide 57838970e8 059/230: Debug feedback when slides change, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 23cbefa7b8 053/230: clean up begin marker during slide finalization, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide ca778812bf 077/230: Start at beginning of heading to implement end, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 1fb1a599b7 074/230: Ensure buffer before running forward and backward commands, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 4dcdb243b0 055/230: Copy EIEIO style from transient, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 0af6dac584 076/230: contents highlight line, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 1a6fe7f61c 068/230: Just some readme and comment updates, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 198a80255b 072/230: move lifecycle & commands to end of package, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide f130bedeab 078/230: Update readme, rearrange some demo headlines, bump minor version, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 0a59731410 075/230: Navigation from contents to same heading, ELPA Syncer, 2024/07/07