[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-tree-slide 39a6039b18 023/144: Add an option to contro
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-tree-slide 39a6039b18 023/144: Add an option to control modeline display |
Date: |
Tue, 18 Jan 2022 08:58:56 -0500 (EST) |
branch: elpa/org-tree-slide
commit 39a6039b18eaa2be7aa91ef7bff197f909942cb7
Author: Takaaki ISHIKAWA <takaxp@ieee.org>
Commit: Takaaki ISHIKAWA <takaxp@ieee.org>
Add an option to control modeline display
---
ChangeLog | 4 ++++
org-tree-slide.el | 49 +++++++++++++++++++++++++++++++++----------------
2 files changed, 37 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c2e94a7be2..f6d146cd64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-12-09 Takaaki ISHIKAWA <takaxp@ieee.org>
+
+ * org-tree-slide.el: Add an option to control modeline display
+
2011-12-08 Takaaki ISHIKAWA <takaxp@ieee.org>
* org-tree-slide.el (ots-update-modeline): Reduce redundant processing
diff --git a/org-tree-slide.el b/org-tree-slide.el
index 32af62ce4a..f1aaca357d 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.4.1 (2011-12-09@11:46) # Add an option to control modeline display
;; v2.4.0 (2011-12-08@10:51) # Support TODO pursuit in a slideshow
;; v2.3.2 (2011-12-08@09:22) # Reduce redundant processing
;; v2.3.1 (2011-12-07@20:30) # Add a new profile to control narrowing status
@@ -60,7 +61,7 @@
(require 'org)
(require 'org-timer)
-(defconst org-tree-slide "2.4.0"
+(defconst org-tree-slide "2.4.1"
"The version number of the org-tree-slide.el")
(defgroup org-tree-slide nil
@@ -127,7 +128,16 @@
(defcustom org-tree-slide-skip-done t
"Specify to show TODO item only or not."
- :type'boolean
+ :type 'boolean
+ :group 'org-tree-slide)
+
+(defcustom org-tree-slide-modeline-display nil
+ "Specify how to display the slide number in modeline.
+ 'outside: shown in modeline outside of lighter
+ 'lighter: shown in lighter (slow)
+ nil: nothing to be shown
+"
+ :type 'symbol
:group 'org-tree-slide)
(defface org-tree-slide-heading-level-2-init
@@ -181,7 +191,7 @@ Profiles:
- Presentation
M-x org-tree-slide-presentation-profile
- - TODO Pursuit
+ - TODO Pursuit with narrowing
M-x org-tree-slide-narrowing-control-profile
M-x org-tree-slide-skip-done-toggle
"
@@ -199,9 +209,12 @@ Profiles:
(defvar ots-slide-number " TSlide")
(defun ots-update-modeline ()
- (if (and (ots-active-p) (org-on-heading-p))
- (setq ots-slide-number (format " %s" (ots-count-slide (point))))
- ots-slide-number))
+ (cond ((equal org-tree-slide-modeline-display 'lighter)
+ (if (and (ots-active-p) (org-on-heading-p))
+ (setq ots-slide-number (format " %s" (ots-count-slide (point))))
+ ots-slide-number))
+ ((equal org-tree-slide-modeline-display 'outside) "")
+ (t " TSlide")))
(defun org-tree-slide-play-with-timer ()
"Start slideshow with setting a count down timer."
@@ -361,7 +374,8 @@ Profiles:
(show-children)
(org-cycle-hide-drawers 'all)
(org-narrow-to-subtree)
- ;; (setq display-tree-slide-string (ots-count-slide (point)))
+ (when (equal org-tree-slide-modeline-display 'outside)
+ (setq display-tree-slide-string (ots-count-slide (point))))
(when org-tree-slide-slide-in-effect
(ots-slide-in org-tree-slide-slide-in-brank-lines))
(when org-tree-slide-header
@@ -402,7 +416,8 @@ Profiles:
((and org-tree-slide-skip-done
(not
(looking-at
- (concat org-outline-regexp-bol org-not-done-regexp))) 'skip))
+ ;; 6.33x does NOT suport org-outline-regexp-bol
+ (concat "^\\*+ " org-not-done-regexp))) 'skip))
(t nil)))
(defun ots-slide-in (brank-lines)
@@ -483,8 +498,8 @@ Profiles:
(defun ots-move-to-the-first-heading ()
(widen)
- (goto-char (point-min))
- (when (ots-before-first-heading-p)
+ (goto-char 1)
+ (unless (looking-at "^\\*+ ")
(outline-next-heading)))
(defun ots-apply-custom-heading-face (status)
@@ -507,13 +522,15 @@ Profiles:
(let
((count 0)
(previous-point 0)
- (current-slide 0))
- (while (/= (point) previous-point) ; convergence point
+ (current-slide 0)
+ (current-point (point)))
+ (while (/= current-point previous-point) ; convergence point
(setq count (1+ count))
- (when (<= (point) target-point)
- (setq current-slide count))
- (setq previous-point (point))
- (ots-outline-next-heading))
+ (when (<= current-point target-point)
+ (setq current-slide count)) ; FIXME
+ (setq previous-point current-point)
+ (ots-outline-next-heading)
+ (setq current-point (point)))
(format "[%d/%d]" current-slide count)))))
(defun ots-active-p ()
- [nongnu] elpa/org-tree-slide a85c6e2b9c 062/144: Added a new toggle to skip commented trees, (continued)
- [nongnu] elpa/org-tree-slide a85c6e2b9c 062/144: Added a new toggle to skip commented trees, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide b30805ac45 063/144: Fix typo, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide c9c413ba8b 064/144: Added a flag to control face setting, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 3e56b63ad1 024/144: Version 2.5.0, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 1687d83b18 046/144: Fix typo README.org, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 78a5c46e55 049/144: Add autoload magic comments, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 8dc16ab4ed 107/144: Revise `org-tree-slide-content`, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 2ff3a05844 109/144: Removed obsoleted hooks, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide a3b46848e4 111/144: org-tree-slide-content: Return to exact point in slide presentation (#30), ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 25a0936d0c 009/144: Version 2.0.1, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 39a6039b18 023/144: Add an option to control modeline display,
ELPA Syncer <=
- [nongnu] elpa/org-tree-slide 36fefc1a2f 038/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide faf9421439 041/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 5d4f714052 020/144: Change descriptions, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide e835028d43 051/144: Fix README.org, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 09e99877d7 045/144: Fix a bug for an org buffer without header, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 949c77146f 025/144: org-tree-slide-skip-done set nil as default, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 28975a4492 018/144: Support displaying a slide number in a mode-line., ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 996ed8cc6b 058/144: * README.org: update as el-get has recipe already included., ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide a3531738a8 059/144: Merge pull request #3 from yyr/master, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 6cf6e4ee84 065/144: Support buffers without headings, ELPA Syncer, 2022/01/18