[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-tree-slide fe51f9ecfb 057/144: Added hooks for start a
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-tree-slide fe51f9ecfb 057/144: Added hooks for start and stop presentation |
Date: |
Tue, 18 Jan 2022 08:59:21 -0500 (EST) |
branch: elpa/org-tree-slide
commit fe51f9ecfbe35599bd5994f5fabcc32dc53d8f24
Author: Takaaki ISHIKAWA <takaxp@ieee.org>
Commit: Takaaki ISHIKAWA <takaxp@ieee.org>
Added hooks for start and stop presentation
---
ChangeLog | 4 ++++
README.org | 61 ++++++++++++++++++++++++++++++-------------------------
org-tree-slide.el | 29 +++++++++++++++-----------
3 files changed, 54 insertions(+), 40 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a048a03e2e..a614c237e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-01-27 Takaaki ISHIKAWA <takax@ieee.org>
+
+ * org-tree-slide.el: Added hooks for start and stop presentation
+
2012-11-21 Takaaki ISHIKAWA <takaxp@ieee.org>
* org-tree-slide.el: Support dark color theme (by @uk-ar)
diff --git a/README.org b/README.org
index ecf85ad14c..b31dee8058 100644
--- a/README.org
+++ b/README.org
@@ -2,7 +2,7 @@
#+AUTHOR: Takaaki Ishikawa
#+EMAIL: takaxp@ieee.org
#+STARTUP: content
-#+Last Update: 2012-11-21@02:16
+#+Last Update: 2013-01-27@22:39
* 1. What's this?
@@ -204,39 +204,44 @@ These functions will toggle =org-tree-slide-mode= ON,
automatically.
- org-tree-slide-presentation-profile
- org-tree-slide-narrowing-control-profile
+** Hooks
+
+ - org-tree-slide-mode-play-hook
+ - org-tree-slide-mode-stop-hook
+
* 7. History
see also ChangeLog
-|---------+------------------+-----------------------------------------------|
-| Version | Date | Description |
-|---------+------------------+-----------------------------------------------|
-| v2.6.0 | 2012-11-21@02:14 | Support dark color theme (by @uk-ar) |
-| v2.5.4 | 2012-01-11@23:02 | Add autoload magic comments |
-| v2.5.3 | 2011-12-18@00:50 | Fix a bug for an org buffer without header |
-| v2.5.2 | 2011-12-17@17:52 | Set presentation profile as the default |
-| v2.5.1 | 2011-12-17@13:34 | org-tree-slide-skip-done set nil as default |
-| v2.5.0 | 2011-12-12@18:16 | Remove auto-play function (TBD) |
-| v2.4.1 | 2011-12-09@11:46 | Add an option to control mode line 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 |
-| 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 |
-| v2.1.5 | 2011-12-05@17:08 | Fix an issue of title display |
-| v2.1.3 | 2011-12-05@15:08 | Fix the end of slide for skip control |
-| 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. |
-| v1.2.3 | 2011-10-30@20:42 | Add a variable to control slide-in duration |
-| v1.2.1 | 2011-10-30@16:10 | Add slide-in visual effect |
-| v1.1.1 | 2011-10-28@16:16 | Add functions to start and stop slide view |
-| v1.0.0 | 2011-09-28@20:59 | Release the initial version |
+|---------+------------------+-------------------------------------------------|
+| Version | Date | Description
|
+|---------+------------------+-------------------------------------------------|
+| v2.6.2 | 2013-01-27@21:21 | Added hooks for start and stop the presentation
|
+| v2.6.0 | 2012-11-21@02:14 | Support dark color theme (by @uk-ar)
|
+| v2.5.4 | 2012-01-11@23:02 | Add autoload magic comments
|
+| v2.5.3 | 2011-12-18@00:50 | Fix a bug for an org buffer without header
|
+| v2.5.2 | 2011-12-17@17:52 | Set presentation profile as the default
|
+| v2.5.1 | 2011-12-17@13:34 | org-tree-slide-skip-done set nil as default
|
+| v2.5.0 | 2011-12-12@18:16 | Remove auto-play function (TBD)
|
+| v2.4.1 | 2011-12-09@11:46 | Add an option to control mode line 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
|
+| 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
|
+| v2.1.5 | 2011-12-05@17:08 | Fix an issue of title display
|
+| v2.1.3 | 2011-12-05@15:08 | Fix the end of slide for skip control
|
+| 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.
|
+| v1.2.3 | 2011-10-30@20:42 | Add a variable to control slide-in duration
|
+| v1.2.1 | 2011-10-30@16:10 | Add slide-in visual effect
|
+| v1.1.1 | 2011-10-28@16:16 | Add functions to start and stop slide view
|
+| v1.0.0 | 2011-09-28@20:59 | Release the initial version
|
* 8. Contact
The author is Takaaki ISHIKAWA (takaxp@ieee.org).
Feel free to email me or use a mention of twitter
([[https://twitter.com/#!/takaxp][@takaxp]])
-
diff --git a/org-tree-slide.el b/org-tree-slide.el
index 69c4436123..996ea907b6 100644
--- a/org-tree-slide.el
+++ b/org-tree-slide.el
@@ -1,6 +1,6 @@
;;; org-tree-slide.el --- A presentation tool for org-mode
;;
-;; Copyright (C) 2011 Takaaki ISHIKAWA
+;; Copyright (C) 2011-2013 Takaaki ISHIKAWA
;;
;; Author: Takaaki ISHIKAWA <takaxp at ieee dot org>
;; Maintainer: Takaaki ISHIKAWA <takaxp at ieee dot org>
@@ -66,7 +66,7 @@
(require 'org-timer)
(require 'org-clock) ; org-clock-in, -out, -clocking-p
-(defconst org-tree-slide "2.6.0"
+(defconst org-tree-slide "2.6.2"
"The version number of the org-tree-slide.el")
(defgroup org-tree-slide nil
@@ -160,7 +160,11 @@
"Level 3."
:group 'org-tree-slide)
-(defvar org-tree-slide-mode-hook nil)
+(defvar org-tree-slide-mode nil)
+(defvar org-tree-slide-mode-play-hook nil
+ "A hook run when ots-play is evaluated to start the slide show")
+(defvar org-tree-slide-mode-stop-hook nil
+ "A hook run when ots-stop is evaluated to stop the slide show")
(defvar display-tree-slide-string nil)
;;;###autoload
@@ -212,9 +216,7 @@ Profiles:
(setq display-tree-slide-string "")
(or global-mode-string (setq global-mode-string '("")))
(if org-tree-slide-mode
- (progn
- (ots-setup)
- (run-hooks 'org-mode-slide-mode-hook))
+ (ots-setup)
(ots-abort)))
;;;###autoload
@@ -382,12 +384,13 @@ Profiles:
;;; Internal functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar ots-slide-number " TSlide")
(defun ots-update-modeline ()
- (cond ((equal org-tree-slide-modeline-display 'lighter)
- (if (and (ots-active-p) (org-at-heading-p))
- (setq ots-slide-number (format " %s" (ots-count-slide (point))))
- ots-slide-number))
- ((equal org-tree-slide-modeline-display 'outside) "")
- (t " TSlide")))
+ (when (equal major-mode 'org-mode)
+ (cond ((equal org-tree-slide-modeline-display 'lighter)
+ (if (and (ots-active-p) (org-at-heading-p))
+ (setq ots-slide-number (format " %s" (ots-count-slide (point))))
+ ots-slide-number))
+ ((equal org-tree-slide-modeline-display 'outside) "")
+ (t " TSlide"))))
(defvar ots-header-overlay nil
"Flag to check the status of overlay for a slide header.")
@@ -405,6 +408,7 @@ Profiles:
(defun ots-play ()
"Start slide view with the first tree of the org-mode buffer."
+ (run-hooks 'org-tree-slide-mode-play-hook)
(ots-apply-local-header-to-slide-header)
(when org-tree-slide-heading-emphasis
(ots-apply-custom-heading-face t))
@@ -435,6 +439,7 @@ Profiles:
(when (org-clocking-p)
;; (org-clock-out)
))
+ (run-hooks 'org-tree-slide-mode-stop-hook)
(message "Quit, Bye!"))
(defun ots-display-tree-with-narrow ()
- [nongnu] elpa/org-tree-slide 901b698c07 032/144: Update README, (continued)
- [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
- [nongnu] elpa/org-tree-slide b656a838b0 029/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 085a4e20f3 043/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 4bf4a2ddd1 021/144: Reduce redundant processing, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 0a399b24ae 042/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide af59475ce9 040/144: Update README, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 2e9e91ed4e 050/144: Update README.org, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide fca0042e0c 053/144: Merge pull request #1 from uk-ar/master, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide fe51f9ecfb 057/144: Added hooks for start and stop presentation,
ELPA Syncer <=
- [nongnu] elpa/org-tree-slide ea33297150 084/144: Bugfix, commented headings were considered as last headings, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide fb5d0a8c20 052/144: Support dark color theme, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide a72f5d492d 054/144: Use the latest function, org-at-heading-p, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 06e1a2855a 061/144: Added some features (issue #2, #5, and #7), ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 362bea826d 077/144: Hide org-clock related code, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 3b020a663b 082/144: 'COMMENT'-subtree will be hidden (by Stefano), ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 8570335bbd 090/144: Added a tag for Melpa Stable, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 69e8cd068e 070/144: Refine displaying slide number in modeline, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide caa2a202b5 068/144: Hide skipped slides in CONTENT mode, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 3927af91ba 078/144: Heading visibility now depends on the value of org-tree-slide-skip-outline-level: if the level of a heading is the last to be displayed, show the full content instead of the children, ELPA Syncer, 2022/01/18