[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-tree-slide 26269ebd8e 016/144: Support TITLE/AUTHOR/EM
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-tree-slide 26269ebd8e 016/144: Support TITLE/AUTHOR/EMAIL in a header |
Date: |
Tue, 18 Jan 2022 08:58:55 -0500 (EST) |
branch: elpa/org-tree-slide
commit 26269ebd8ebe7ff273f724adc4c578c2e14586f8
Author: Takaaki ISHIKAWA <takaxp@ieee.org>
Commit: Takaaki ISHIKAWA <takaxp@ieee.org>
Support TITLE/AUTHOR/EMAIL in a header
---
ChangeLog | 6 ++++++
org-tree-slide.el | 42 +++++++++++++++++++++++++++++++++++++-----
2 files changed, 43 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e77c1f2ff0..bda480196c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-06 Takaaki ISHIKAWA <takaxp@ieee.org>
+
+ * org-tree-slide.el: Support TITLE/AUTHOR/EMAIL in a header
+ If #+TITLE:, #+AUTHOR:, or #+EMAIL: has a description in your org
buffer,
+ it will be used in the slide header.
+
2011-12-05 Takaaki ISHIKAWA <takaxp@ieee.org>
* org-tree-slide.el: Fix an issue of title display
diff --git a/org-tree-slide.el b/org-tree-slide.el
index 9ebb22c6db..ef24f65bf7 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.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 ccontrol
;; v2.1.1 (2011-12-05@11:08) # Add skip control by heading level
@@ -54,7 +55,7 @@
(require 'org)
(require 'org-timer)
-(defconst org-tree-slide "2.1.5"
+(defconst org-tree-slide "2.1.7"
"The version number of the org-tree-slide.el")
(defgroup org-tree-slide nil
@@ -76,8 +77,9 @@
(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
- as a slide title."
+ If you have `#+TITLE:' line in your org buffer, it wil be used as a title
+ of the slide. If this variable is nil and no `#+TITLE:' line, the name of
+ current buffer will be displayed."
:type 'string
:group 'org-tree-slide)
@@ -160,6 +162,7 @@
(interactive "P")
(if (ots-active-p) (message "org-tree-slide is ACTIVE.")
(setq ots-active t)
+ (ots-apply-local-header-to-slide-header)
(when arg
(org-timer-set-timer))
(when org-tree-slide-heading-emphasis
@@ -176,7 +179,7 @@
(setq ots-active nil)
(widen)
(org-overview)
- (ots-move-to-the-first-heading)
+ (goto-char (point-min))
(ots-hide-slide-header)
(ots-remove-control-keybindings)
(org-timer-pause-or-continue 'stop)
@@ -330,6 +333,30 @@
(ots-hide-slide-header)
(setq brank-lines (1- brank-lines))))
+(defvar org-tree-slide-email nil
+ "If you have `#+EMAIL:' line in your org buffer, it will be used as
+ an address of the slide.")
+
+(defvar org-tree-slide-author nil
+ "If you have `#+AUTHOR:' line in your org buffer, it will be used as
+ a name of the slide author.")
+
+(defun ots-apply-local-header-to-slide-header ()
+ (save-excursion
+ (ots-move-to-the-first-heading)
+ (let ((limit (point)))
+ (ots-set-header-variable-by-rexep
+ 'org-tree-slide-title "#\\+TITLE:[ \t]*\\(.*\\)$" limit)
+ (ots-set-header-variable-by-rexep
+ 'org-tree-slide-author "#\\+AUTHOR:[ \t]*\\(.*\\)$" limit)
+ (ots-set-header-variable-by-rexep
+ 'org-tree-slide-email "#\\+EMAIL:[ \t]*\\(.*\\)$" limit))))
+
+(defun ots-set-header-variable-by-rexep (header-variable regexp limit)
+ (goto-char 1)
+ (set header-variable
+ (if (re-search-forward regexp limit t) (match-string 1) nil)))
+
(defun ots-set-slide-header (brank-lines)
(ots-hide-slide-header)
(setq ots-header-overlay
@@ -344,7 +371,12 @@
(concat " [ "
(if org-tree-slide-title org-tree-slide-title
(buffer-name))
- " ] (" (format-time-string "%Y-%m-%d") ")"
+ " ]\n"
+ (format-time-string "%Y-%m-%d") " "
+ (when org-tree-slide-author
+ (concat org-tree-slide-author " "))
+ (when org-tree-slide-email
+ (concat "<" org-tree-slide-email ">"))
(ots-get-brank-lines brank-lines)))
(overlay-put ots-header-overlay 'display
(ots-get-brank-lines brank-lines))))
- [nongnu] elpa/org-tree-slide 7e0064f6cb 004/144: Add slide-in visual effect, (continued)
- [nongnu] elpa/org-tree-slide 7e0064f6cb 004/144: Add slide-in visual effect, ELPA Syncer, 2022/01/18
- [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 <=
- [nongnu] elpa/org-tree-slide f08bc4012f 019/144: Add a new profile to control narrowing status, ELPA Syncer, 2022/01/18
- [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