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

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

[nongnu] elpa/org-tree-slide cc42137ed8 085/144: Merge pull request #17


From: ELPA Syncer
Subject: [nongnu] elpa/org-tree-slide cc42137ed8 085/144: Merge pull request #17 from bennati/presentation-end
Date: Tue, 18 Jan 2022 08:59:43 -0500 (EST)

branch: elpa/org-tree-slide
commit cc42137ed80a34775f89dd14b9b13e13afeaef8c
Merge: 3b020a663b ea33297150
Author: Takaaki ISHIKAWA <takaxp@ieee.org>
Commit: Takaaki ISHIKAWA <takaxp@ieee.org>

    Merge pull request #17 from bennati/presentation-end
    
    Show content after last slide
---
 org-tree-slide.el | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/org-tree-slide.el b/org-tree-slide.el
index c9004930c7..2b1c223ac5 100644
--- a/org-tree-slide.el
+++ b/org-tree-slide.el
@@ -409,19 +409,23 @@ Profiles:
     (unless (equal org-tree-slide-modeline-display 'outside)
       (message "   Next >>"))
     (cond
+     ((and (org-tree-slide--narrowing-p) ;displaying a slide, not the contents
+           (org-tree-slide--last-tree-p (progn (beginning-of-line) (point)))) 
;the last subtree
+      (org-tree-slide-content))
      ((or
        (or (and (org-tree-slide--before-first-heading-p)
                 (not (org-at-heading-p)))
            (and (= (point-at-bol) 1) (not (org-tree-slide--narrowing-p))))
        (or (org-tree-slide--first-heading-with-narrow-p)
            (not (org-at-heading-p))))
-      (run-hooks 'org-tree-slide-before-move-next-hook)      
+      (run-hooks 'org-tree-slide-before-move-next-hook)
       (widen)
-      (org-tree-slide--outline-next-heading))
+      (org-tree-slide--outline-next-heading)
+      (org-tree-slide--display-tree-with-narrow))
      ;; stay the same slide (for CONTENT MODE, on the subtrees)
-     (t nil))
+     (t nil (org-tree-slide--display-tree-with-narrow)))
     ;;    (when (and org-tree-slide-skip-done (looking-at (concat "^\\*+ " 
org-not-done-regexp))) (org-clock-in) )
-    (org-tree-slide--display-tree-with-narrow)))
+    ))
 
 (defun org-tree-slide-move-previous-tree ()
   "Display the previous slide"
@@ -810,9 +814,13 @@ Profiles:
 (defun org-tree-slide--beginning-of-tree ()
   "Return beginning point of the line, or t. If the position does not exist in 
the buffer, then return nil."
   (beginning-of-line)
-  (if (org-at-heading-p)
+  (if (and (not (org-tree-slide--heading-skip-p)) ;if the header has to be 
skipped
+           (org-at-heading-p))
       (point)
-    (outline-previous-heading))) ; return position or nil.
+      (progn
+        (outline-previous-heading)      ;go to previous heading
+        (org-tree-slide--beginning-of-tree)) ;recursion until a visible 
heading is found
+      )) ; return position or nil.
 
 (provide 'org-tree-slide)
 



reply via email to

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