[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dslide 015796186f 048/230: !fixme Not sure if this is nece
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dslide 015796186f 048/230: !fixme Not sure if this is necessary. Shipping my last tested. |
Date: |
Sun, 7 Jul 2024 19:00:14 -0400 (EDT) |
branch: elpa/dslide
commit 015796186f399817faa047aca6565870810f6920
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>
!fixme Not sure if this is necessary. Shipping my last tested.
Signed-off-by: Psionik K <73710933+psionic-k@users.noreply.github.com>
---
macro-slides.el | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/macro-slides.el b/macro-slides.el
index 55f721f1ca..9bd9ee2373 100644
--- a/macro-slides.el
+++ b/macro-slides.el
@@ -1065,7 +1065,7 @@ their init."
(reached-beginning
(user-error "No more previous slides!")))))
-(cl-defmethod ms--choose-slide ((obj ms-deck) how &optional point)
+(cl-defmethod ms--choose-slide ((obj ms-deck) how)
"Set the current slide, according to HOW.
Optional POINT allows resolving a slide by walking the tree to
find the slide that displays that POINT."
@@ -2118,16 +2118,19 @@ TYPE is a list or type symbol."
(goto-char (match-beginning 0))
(org-element-at-point))))))))
-(defun ms--root-heading-at-point ()
+(defun ms--root-heading-at-point (&optional point)
"Return the root heading if the point is contained by one.
Does not modify the point."
- (let* ((element (org-element-at-point))
- (parent (ms--element-root
- element 'headline)))
- (if (eq 'headline (org-element-type element))
- element
- (or parent
- (ms--any-heading)))))
+ (save-excursion
+ (when point
+ (goto-char point))
+ (let* ((element (org-element-at-point))
+ (parent (ms--element-root
+ element 'headline)))
+ (if (eq 'headline (org-element-type element))
+ element
+ (or parent
+ (ms--any-heading))))))
(defun ms--any-heading ()
"Return any heading that can be found.
- [nongnu] elpa/dslide f130bedeab 078/230: Update readme, rearrange some demo headlines, bump minor version, (continued)
- [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
- [nongnu] elpa/dslide dc5d0b965e 119/230: disinformation cleanup, a few lingering ms symbols, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide a8f7174ef3 095/230: dead expression, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide f24e5b8538 088/230: Rename argument, display-action -> display, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 18e079c83f 113/230: Clean up misinformation & propagate naming, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 4af6955e23 090/230: missing feedback on last slide, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 8bc5783536 051/230: Sorry taka. It's been a good 13 years of org-tree-slide, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 45a9620a54 054/230: babel blocks can now be used in both directions, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide f3ae2af0cc 039/230: changed sequence-callbacks to not include sequence as a key, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 015796186f 048/230: !fixme Not sure if this is necessary. Shipping my last tested.,
ELPA Syncer <=
- [nongnu] elpa/dslide 4e2086e49e 034/230: rename display-state -> slide-buffer-state, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 30196efe70 010/230: The header overlay should be buffer local, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide e75488d7ac 018/230: rearrange, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide cf56e034ff 008/230: Overlays for selective display of contents, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 39a9045682 011/230: Simplify blank-lines expression using make-string, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 0316764255 006/230: moving a comment, automatic formatting, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 3969814eb4 015/230: rearrangement, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide a0460d4070 012/230: Return early by user-error when not in org-tree-slide-mode, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 0732479ac8 019/230: rearrange, ELPA Syncer, 2024/07/07
- [nongnu] elpa/dslide 393985506a 021/230: After-narrow-hook, ELPA Syncer, 2024/07/07