[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-tree-slide b0c36eb532 010/144: Add skip controll by he
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-tree-slide b0c36eb532 010/144: Add skip controll by heading level |
Date: |
Tue, 18 Jan 2022 08:58:54 -0500 (EST) |
branch: elpa/org-tree-slide
commit b0c36eb532c7a7b8cd02ffa42ea422eaa4b4ca57
Author: Takaaki ISHIKAWA <takaxp@ieee.org>
Commit: Takaaki ISHIKAWA <takaxp@ieee.org>
Add skip controll by heading level
---
ChangeLog | 6 ++++++
org-tree-slide.el | 51 +++++++++++++++++++++++++++++++++++++++++----------
2 files changed, 47 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c801ed8161..3870fdd9c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-05 Takaaki ISHIKAWA <takaxp@ieee.org>
+
+ * org-tree-slide.el (org-tree-slide-skip-outline-level):
+ Add skip control by heading level. Skip the current slide if the level
+ is higher than or equal to this variable.
+
2011-12-02 Takaaki ISHIKAWA <takaxp@ieee.org>
* org-tree-slide.el: Change function names, ots- is introduced.
diff --git a/org-tree-slide.el b/org-tree-slide.el
index ec818aac5e..dcdeada112 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.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
;; v1.2.5 (2011-10-31@18:34) # Add CONTENT view to see all the subtrees.
@@ -40,7 +41,7 @@
;; 1. Put this elisp into your load-path
;; 2. Add (requre 'org-tree-slide) in your .emacs
;; 3. Open an org-mode file
-;; 4. M-x org-tree-slide-play, now you in slide view
+;; 4. M-x org-tree-slide-play, now you are in slide view
;; 5. <right>/<left> will move slides, mode line will be changed
;; 6. M-x org-tree-slide-stop, return to normal view
;;
@@ -51,13 +52,26 @@
(require 'org)
(require 'org-timer)
-(defconst org-tree-slide "2.0.1"
+(defconst org-tree-slide "2.1.1"
"The version number of the org-tree-slide.el")
(defgroup org-tree-slide nil
"User variables for org-tree-slide."
:group 'org-structure)
+(defcustom org-tree-slide-skip-outline-level 0
+ "Skip the current slide if the level is higher than or equal to this
variable.
+ `0': never skip at any heading
+ e.g. set `4',
+ *** heading A ; display as a slide
+ entry
+ **** heading B ; skip! do not display as the next slide
+ **** heading C ; skip!
+ *** heading D ; display as the next slide
+"
+ :type 'integer
+ :group 'org-tree-slide)
+
(defcustom org-tree-slide-title nil
"Specify the title of presentation. The title is shown in a header area.
If this variable is nil, the name of current buffer will be displayed
@@ -220,14 +234,11 @@
(message " Next >>")
(cond ((or (and (ots-before-first-heading-p) (not (org-on-heading-p)))
(= (point-at-bol) 1)) ; support single top level tree
- (outline-next-heading))
+ (ots-outline-next-heading))
((or (ots-first-heading-with-narrow-p) (not (org-on-heading-p)))
(hide-subtree)
(widen)
- ;; (if (> 7.3 (string-to-number org-version)) ; for 6.33x
- ;; (ots-hide-slide-header)
- ;; (org-content))
- (outline-next-heading))
+ (ots-outline-next-heading))
(t nil))
(ots-display-tree-with-narrow)))
@@ -242,9 +253,9 @@
(cond ((ots-before-first-heading-p)
(message "The first slide!"))
((not (org-on-heading-p))
- (outline-previous-heading)
- (outline-previous-heading))
- (t (outline-previous-heading)))
+ (ots-outline-previous-heading)
+ (ots-outline-previous-heading))
+ (t (ots-outline-previous-heading)))
(ots-display-tree-with-narrow)
;; To avoid error of missing header in Emacs24
(if (= emacs-major-version 24)
@@ -272,6 +283,26 @@
(when org-tree-slide-header
(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!"))))
+
+(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!"))))
+
+(defun ots-outline-skip-p (has-target-outline current-level)
+ (cond ((not has-target-outline)
+ (message "End of slide")
+ nil)
+ ((and (> org-tree-slide-skip-outline-level 0)
+ (<= org-tree-slide-skip-outline-level current-level)) t)
+ (t nil)))
+
(defun ots-slide-in (brank-lines)
(while (< 2 brank-lines)
(ots-set-slide-header brank-lines)
- [nongnu] elpa/org-tree-slide a8dfaf5dd4 143/144: Revert "Allow empty date and author to save on-screen space", (continued)
- [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, 2022/01/18
- [nongnu] elpa/org-tree-slide b0c36eb532 010/144: Add skip controll by heading level,
ELPA Syncer <=
- [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
- [nongnu] elpa/org-tree-slide b8feee3b60 034/144: Update README, ELPA Syncer, 2022/01/18