[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-tree-slide 7340f16266 012/144: Fix the end of slide fo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-tree-slide 7340f16266 012/144: Fix the end of slide for skip ccontrol |
Date: |
Tue, 18 Jan 2022 08:58:54 -0500 (EST) |
branch: elpa/org-tree-slide
commit 7340f162663b5c492576e11e1fb97d930198b580
Author: Takaaki ISHIKAWA <takaxp@ieee.org>
Commit: Takaaki ISHIKAWA <takaxp@ieee.org>
Fix the end of slide for skip ccontrol
---
org-tree-slide.el | 45 ++++++++++++++++++++++++++++++++-------------
1 file changed, 32 insertions(+), 13 deletions(-)
diff --git a/org-tree-slide.el b/org-tree-slide.el
index dcdeada112..7920f34ee7 100644
--- a/org-tree-slide.el
+++ b/org-tree-slide.el
@@ -28,6 +28,7 @@
;; The latest version of the org-mode at http://orgmode.org/ is recommended.
;;
;;; History:
+;; v2.1.3 (2011-12-05@15:08) # Fix the end of slide for skip ccontrol
;; v2.1.1 (2011-12-05@11:08) # Add skip control by heading level
;; v2.0.1 (2011-12-02@18:29) # Change function names, ots- is introduced.
;; v2.0.0 (2011-12-01@17:41) # Add profiles and support org 6.33x
@@ -52,7 +53,7 @@
(require 'org)
(require 'org-timer)
-(defconst org-tree-slide "2.1.1"
+(defconst org-tree-slide "2.1.3"
"The version number of the org-tree-slide.el")
(defgroup org-tree-slide nil
@@ -274,6 +275,7 @@
(defun ots-display-tree-with-narrow ()
"Show a tree with narrowing and also set a header at the head of slide."
(goto-char (point-at-bol))
+ (hide-subtree) ; support CONTENT (subtrees are shown)
(org-show-entry)
(show-children)
(org-cycle-hide-drawers 'all)
@@ -284,23 +286,40 @@
(ots-show-slide-header)))
(defun ots-outline-next-heading ()
- (let ((has-next (outline-next-heading)))
- (when (ots-outline-skip-p has-next (org-outline-level))
- (ots-outline-next-heading)
- (message "Skip!"))))
+ (ots-outline-select-method
+ (ots-outline-skip-p
+ (if (outline-next-heading) t 'last)
+ (org-outline-level))
+ 'next))
(defun ots-outline-previous-heading ()
- (let ((has-previous (outline-previous-heading)))
- (when (ots-outline-skip-p has-previous (org-outline-level))
- (ots-outline-previous-heading)
- (message "Skip!"))))
+ (ots-outline-select-method
+ (ots-outline-skip-p
+ (if (outline-previous-heading) t 'first)
+ (org-outline-level))
+ 'previous))
+
+(defun ots-outline-select-method (action direction)
+ (cond ((and (equal action 'skip) (equal direction 'next))
+ (ots-outline-next-heading))
+ ((and (equal action 'skip) (equal direction 'previous))
+ (ots-outline-previous-heading))
+ ((and (equal action 'last) (equal direction 'next))
+ (ots-outline-previous-heading)
+ (message "End of slide.")) ; Return back.
+ ((and (equal action 'first) (equal direction 'previous))
+ (ots-move-to-the-first-heading)
+ (message "Begining of slide.")) ; Stay the first heading
+ ;; (ots-outline-previous-heading))
+ (t nil)))
(defun ots-outline-skip-p (has-target-outline current-level)
- (cond ((not has-target-outline)
- (message "End of slide")
- nil)
+ (cond ((equal has-target-outline 'last)
+ 'last)
+ ((equal has-target-outline 'first)
+ 'first)
((and (> org-tree-slide-skip-outline-level 0)
- (<= org-tree-slide-skip-outline-level current-level)) t)
+ (<= org-tree-slide-skip-outline-level current-level)) 'skip)
(t nil)))
(defun ots-slide-in (brank-lines)
- [nongnu] elpa/org-tree-slide 0fc7d31d12 120/144: Update ChangeLog, (continued)
- [nongnu] elpa/org-tree-slide 0fc7d31d12 120/144: Update ChangeLog, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide a8dfaf5dd4 143/144: Revert "Allow empty date and author to save on-screen space", ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide b1ba1189f1 139/144: invisible org-meta-line (see README), ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 97e26e36f6 036/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 8aa567aa72 013/144: Fix typo, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 73182afa10 035/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide ed95fa6070 056/144: Update descriptions related to version 2.6.0, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 8a842ae48f 005/144: Add a variable to control slide-in duration, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 373c80edf8 007/144: Add CONTENT view to see all the subtrees, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 9e50d8faec 014/144: Fix an issue of title display, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 7340f16266 012/144: Fix the end of slide for skip ccontrol,
ELPA Syncer <=
- [nongnu] elpa/org-tree-slide b0c36eb532 010/144: Add skip controll by heading level, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 67d72e4a4c 015/144: Fix an issue of title display (fix typo), ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 6c6450776e 011/144: Fix the end of slide for skip ccontrol, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 3dc1064311 026/144: Add README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide cfe834cd38 044/144: Fix typo of README.org, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 40fe86fad2 039/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide a4bc8a67cb 048/144: Add a keybing, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide e22f05ce09 033/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 901b698c07 032/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 1ab152f87b 047/144: Fix typo README.org, ELPA Syncer, 2022/01/18