[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dslide 1f02a2dfc0 205/230: line noise, no-op changes
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dslide 1f02a2dfc0 205/230: line noise, no-op changes |
Date: |
Sun, 7 Jul 2024 19:00:39 -0400 (EDT) |
branch: elpa/dslide
commit 1f02a2dfc00e2ec7b06eccf116fcd049ff4e8709
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>
line noise, no-op changes
Signed-off-by: Psionik K <73710933+psionic-k@users.noreply.github.com>
---
dslide.el | 63 ++++++++++++++++++++++++++++++++---------------------------
test/demo.org | 6 ++++--
2 files changed, 38 insertions(+), 31 deletions(-)
diff --git a/dslide.el b/dslide.el
index b16ddff7cb..4cc5492c04 100644
--- a/dslide.el
+++ b/dslide.el
@@ -1245,8 +1245,7 @@ for `dslide-contents-map'."
(dslide-marker obj (org-element-property :end (dslide-heading obj))))
(cl-defmethod dslide-final :after ((obj dslide-action-item-reveal))
- (when-let ((overlays (oref obj overlays)))
- (mapc #'delete-overlay overlays)))
+ (mapc #'delete-overlay (oref obj overlays)))
;; TODO Overlay intersection could be consolidated for use in other actions.
(cl-defmethod dslide-forward ((obj dslide-action-item-reveal))
@@ -1286,14 +1285,15 @@ for `dslide-contents-map'."
;; to visit a block
(defclass dslide-action-babel (dslide-action)
((remove-results
- ;; TODO parsing list arguments from org properties
:initform t
:initarg :remove-results
- :description "Remove results when starting slides 🚧.
-Experimental. File an issue. There's a lot of behaviors that could
potentially
-react to this option. Currently only blocks with results set to replace are
-removed. Other options seem to suggest results should not be removed or will
-never be written to the buffer anyway."))
+ :description "Remove results when entering slides 🚧.
+Experimental. File an issue if you see something weird. There's
+a lot of behaviors that could potentially react to this option.
+Currently only blocks with results set to replace are removed and
+only when entering a slide. Other options seem to suggest
+results should not be removed or will never be written to the
+buffer anyway."))
"Execute source blocks as steps.
By default blocks execute one by one with forward. You can mark a block to
be special with the keyword:
@@ -1356,19 +1356,18 @@ Optional UNNAMED will return unnamed blocks as well."
(when unnamed
block))))
+;; Executing babel seems to widen and also creates messages, and this would
+;; result in flashing. Re-display is inhibited at the deck level to prevent
+;; these unpleasantries. The downside of just inhibiting re-display until
after
+;; the call is that if re-display is needed, such as if calling `sleep-for' in
a
+;; loop, then no updates will be visible. However, the user should really
+;; handle this with a timer or process output and process sentinel etc.
(defun dslide--block-execute (block-element)
(without-restriction
(save-excursion
(let ((block-begin (org-element-property :begin block-element))
(block-end (org-element-property :end block-element)))
(goto-char block-begin)
- ;; Executing babel seems to widen and also creates messages, and this
- ;; would result in flashing. Re-display is inhibited at the deck level
- ;; to prevent these unpleasantries. The downside of just inhibiting
- ;; re-display until after the call is that if re-display is needed,
such
- ;; as if calling `sleep-for' in a loop, then no updates will be
visible.
- ;; However, the user should really handle this with a timer or process
- ;; output and process sentinel etc.
(condition-case user-wrote-flaky-babel
;; t for don't cache. We likely want effects
(progn (org-babel-execute-src-block t)
@@ -1378,6 +1377,7 @@ Optional UNNAMED will return unnamed blocks as well."
(dslide--base-buffer-highlight-region
block-begin block-end 'dslide-babel-error-highlight)
;; TODO consolidate moving the point & window points in base buffer
+ ;; XXX out of step with other buffer movement
(set-buffer (oref dslide--deck base-buffer))
(goto-char block-begin)
(if-let ((windows (get-buffer-window-list)))
@@ -1572,10 +1572,10 @@ restriction, meaning no progress was made."
(dslide--section-end heading))))
(unless (and (<= (point-min) begin)
(>= (point-max) end))
+ (narrow-to-region begin end)
(when (and dslide-slide-in-effect
(not (oref obj inline)))
(dslide-animation-setup begin end))
- (narrow-to-region begin end)
(run-hooks 'dslide-narrow-hook)
(let ((dslide-header (oref obj header)))
(dslide--make-header (null (oref obj breadcrumbs))))
@@ -1758,18 +1758,19 @@ Child headings become independent slides.")
child-heading
:slide-action 'dslide-slide-action-inline
:inline t)))
- (progn (mapc #'delete-overlay
- (seq-intersection (oref obj overlays)
- (overlays-at (org-element-property
- :begin
- child-heading))))
- (dslide-begin child)
- (when dslide-slide-in-effect
- (dslide-animation-setup
- (org-element-property :begin child-heading)
- (org-element-property :end child-heading)))
- (setq progress child)
- (push child (oref obj children)))
+ (progn
+ (mapc #'delete-overlay
+ (seq-intersection (oref obj overlays)
+ (overlays-at (org-element-property
+ :begin
+ child-heading))))
+ (dslide-begin child)
+ (when dslide-slide-in-effect
+ (dslide-animation-setup
+ (org-element-property :begin child-heading)
+ (org-element-property :end child-heading)))
+ (setq progress child)
+ (push child (oref obj children)))
(setq exhausted t))))
progress))
@@ -2329,7 +2330,8 @@ assumes the buffer is restricted and that there is a
first tree."
(list timer overlay))
(timer-activate timer)))
-;; TODO move respect for animation variables into this function
+;; TODO move respect for animation variables into this function. Create a
+;; sensible integration between sliding and peeling animation. Add a
customize interface.
;; TODO Support non-graphical
;; TODO User-provided animation override function
(defun dslide-animation-setup (beg end)
@@ -2392,6 +2394,9 @@ and the value of `point-max' should contain a newline
somewhere."
(setq dslide--animation-overlays
(delq overlay dslide--animation-overlays)))))
+;; If you want to make a custom animation, just make sure that it is cleaned up
+;; by this function. Timers go in `dslide--animation-timers'. Overlays go in
+;; `dslide--animation-overlays'.
(defun dslide--animation-cleanup ()
(while dslide--animation-timers
(cancel-timer (pop dslide--animation-timers)))
diff --git a/test/demo.org b/test/demo.org
index 2667dbcaf5..6814fa2ef7 100644
--- a/test/demo.org
+++ b/test/demo.org
@@ -126,10 +126,12 @@ Positron is deeply committed to bringing you the finest
in:
- See more options in the ~dslide-action-narrow~ class slots:
=M-x describe-symbol dslide-action-narrow=
* Markup Hiding
+See ~dslide-hide-markup-types~. By default, property drawers, comments,
comment blocks, and keywords are hidden with overlays.
+
#+begin_comment
You can't see this during the presentation. Convenient for reminding yourself
to say something but not including it in the presentation.
#+end_comment
-See ~dslide-hide-markup-types~. By default, property drawers and keywords are
hidden with overlays. Comment blocks are also hidden. There is a comment
block above this paragraph.
+There is a comment block above this paragraph. There is a comment below this
paragraph. Neither are visible when using the defaults.
# There is a comment after this paragraph too.
* Babel Slide Integration
:PROPERTIES:
@@ -261,7 +263,7 @@ Our cleanup is always run, after everything
:PROPERTIES:
:DSLIDE_ACTIONS: dslide-action-babel
:END:
-- You need the ~master-of-ceremonies~ package installed to complete this slide.
+- You need the ~master-of-ceremonies~ package installed to complete this
slide. Use the contents navigation to skip this slide if you didn't install it.
- Let arbitrary buffers be shown while still completing steps within the
slide-show.
- Run babel against other buffers 😈.
- [nongnu] elpa/dslide 586082e591 165/230: set overlay initial height, (continued)
- [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, 2024/07/07
- [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 <=
- [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, 2024/07/07