[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-tree-slide f08bc4012f 019/144: Add a new profile to co
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-tree-slide f08bc4012f 019/144: Add a new profile to control narrowing status |
Date: |
Tue, 18 Jan 2022 08:58:55 -0500 (EST) |
branch: elpa/org-tree-slide
commit f08bc4012fb55d374a8f13df342629df9ad85038
Author: Takaaki ISHIKAWA <takaxp@ieee.org>
Commit: Takaaki ISHIKAWA <takaxp@ieee.org>
Add a new profile to control narrowing status
---
ChangeLog | 9 +++++++-
org-tree-slide.el | 64 +++++++++++++++++++++++++++----------------------------
2 files changed, 39 insertions(+), 34 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8ee1315157..0af06065fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
2011-12-07 Takaaki ISHIKAWA <takaxp@ieee.org>
- * ort-tree-slide.el: Support displaying a slide number in a mode-line.
+ * org-tree-slide.el: Add a new profile to control narrowing status
+ - You can control a status of narrowing or not by this profile.
+ If you use <f5>/S-<f5>, toggle org-tree-slide-mode is an alternative
way.
+ (global-set-key (kbd "<f5>") 'org-tree-slide-mode) is recommended.
+ - Modify the way to display the current slide number.
+ Replace " TSlide" by slide number in mode-line, like [1/10].
+
+ * org-tree-slide.el: Support displaying a slide number in a mode-line.
* org-tree-slide.el: Adopt minor mode
org-tree-slide adopt a minor mode!
diff --git a/org-tree-slide.el b/org-tree-slide.el
index 5c7c930f25..117332d6ff 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.3.1 (2011-12-07@20:30) # Add a new profile to control narrowing status
;; v2.3.0 (2011-12-07@16:17) # Support displaying a slide number
;; v2.2.0 (2011-12-07@02:15) # Support minor mode
;; v2.1.7 (2011-12-06@00:26) # Support TITLE/AUTHOR/EMAIL in a header
@@ -57,7 +58,7 @@
(require 'org)
(require 'org-timer)
-(defconst org-tree-slide "2.3.0"
+(defconst org-tree-slide "2.3.1"
"The version number of the org-tree-slide.el")
(defgroup org-tree-slide nil
@@ -144,8 +145,6 @@
(defvar org-tree-slide-mode-map
(let ((map (make-sparse-keymap)))
- ;; (define-key map (kbd "<f5>") 'org-narrow-to-subtree)
- ;; (define-key map (kbd "S-<f5>") 'widen)
(define-key map (kbd "C-x s c") 'org-tree-slide-content)
(define-key map (kbd "C-x s a") 'org-tree-slide-auto-play-start)
(define-key map (kbd "<left>") 'org-tree-slide-move-previous-tree)
@@ -156,8 +155,11 @@
(defvar org-tree-slide-mode-hook nil)
(defvar display-tree-slide-string nil)
(define-minor-mode org-tree-slide-mode
- "A presentation tool for org-mode"
- :lighter " TSlide"
+ "A presentation tool for org-mode.
+
+"
+ :lighter (:eval (if (ots-active-p) (format " %s" (ots-count-slide (point)))
+ " TSlide"))
:keymap org-tree-slide-mode-map
:group 'org-tree-slide
:require 'org
@@ -193,6 +195,7 @@
(setq org-tree-slide-header nil)
(setq org-tree-slide-slide-in-effect nil)
(setq org-tree-slide-heading-emphasis nil)
+ (setq org-tree-slide-cursor-init t)
(message "simple profile: ON"))
(defun org-tree-slide-presentation-profile ()
@@ -201,8 +204,18 @@
(setq org-tree-slide-header t)
(setq org-tree-slide-slide-in-effect t)
(setq org-tree-slide-heading-emphasis nil)
+ (setq org-tree-slide-cursor-init t)
(message "presentation profile: ON"))
+(defun org-tree-slide-narrowing-control-profile ()
+ "Set variables for an alternative of narrowing/widen switch by <f5>/S-<f5>."
+ (interactive)
+ (setq org-tree-slide-header nil)
+ (setq org-tree-slide-slide-in-effect nil)
+ (setq org-tree-slide-heading-emphasis nil)
+ (setq org-tree-slide-cursor-init nil)
+ (message "narrowing control profile: ON"))
+
(defun org-tree-slide-display-header-toggle ()
"Toggle displaying the slide header"
(interactive)
@@ -283,17 +296,19 @@
(message "Hello! This is org-tree-slide :-)"))
(defun ots-stop ()
- "Stop the slide view, and redraw the org-mode buffer with OVERVIEW."
+ "Stop the slide view, and redraw the org-mode buffer with #+STARTUP:."
(widen)
- (org-overview)
- (cond ((equal "content" org-tree-slide-startup)
- (message "CONTENT: %s" org-tree-slide-startup)
- (org-content))
- ((equal "showall" org-tree-slide-startup)
- (message "SHOW ALL: %s" org-tree-slide-startup)
- (org-cycle '(64)))
- (t nil))
- (goto-char (point-min)) ; Always return to the head position
+ (org-show-siblings)
+ (when (or org-tree-slide-cursor-init (ots-before-first-heading-p))
+ (goto-char (point-min))
+ (org-overview)
+ (cond ((equal "content" org-tree-slide-startup)
+ (message "CONTENT: %s" org-tree-slide-startup)
+ (org-content))
+ ((equal "showall" org-tree-slide-startup)
+ (message "SHOW ALL: %s" org-tree-slide-startup)
+ (org-cycle '(64)))
+ (t nil)))
(ots-hide-slide-header)
(org-timer-pause-or-continue 'stop)
(ots-apply-custom-heading-face nil)
@@ -307,7 +322,7 @@
(show-children)
(org-cycle-hide-drawers 'all)
(org-narrow-to-subtree)
- (setq display-tree-slide-string (ots-count-slide (point)))
+ ;; (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
@@ -461,23 +476,6 @@
(ots-outline-next-heading))
(format "[%d/%d]" current-slide count)))))
-(defun ots-count-slide-old (&optional target-point)
- (save-excursion
- (save-restriction
- (widen)
- (unless target-point
- (setq target-point (point-max)))
- (ots-move-to-the-first-heading)
- (let
- ((count 0)
- (previous-point 0))
- (while (and (<= (point) target-point)
- (/= (point) previous-point))
- (setq count (1+ count))
- (setq previous-point (point))
- (ots-outline-next-heading))
- count))))
-
(defun ots-active-p ()
(and org-tree-slide-mode (equal major-mode 'org-mode)))
- [nongnu] elpa/org-tree-slide 52d67fc2a0 003/144: Add slide-in visual effect, (continued)
- [nongnu] elpa/org-tree-slide 52d67fc2a0 003/144: Add slide-in visual effect, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 79aec5bbab 006/144: Fix typo, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide d2739053a0 037/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 7daa23cc27 022/144: Support TODO pursuit in a slideshow, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 420342f50b 030/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 8228b14520 031/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide bc6650cbbb 027/144: Rename README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 6dfa0df7f9 002/144: Add start and stop function, display header, and change mode-line, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide bfbd4ddb5d 008/144: Add CONTENT view to see all the subtrees, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 26269ebd8e 016/144: Support TITLE/AUTHOR/EMAIL in a header, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide f08bc4012f 019/144: Add a new profile to control narrowing status,
ELPA Syncer <=
- [nongnu] elpa/org-tree-slide be2d679c35 028/144: Add a link, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 871d75f872 055/144: Merge branch 'master' of github.com:takaxp/org-tree-slide, ELPA Syncer, 2022/01/18
- [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