branch: elpa/org-tree-slide commit fed7ec7e6df59cffcdb4c13a9345f4d828404dd8 Author: Takaaki ISHIKAWA <tak...@ieee.org> Commit: Takaaki ISHIKAWA <tak...@ieee.org>
Added breadcrumbs feature (by Matus) --- ChangeLog | 5 +++++ README.org | 43 +++++++++++++++++++++++-------------------- org-tree-slide.el | 31 ++++++++++++++++++------------- 3 files changed, 46 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ebdfd1251..be386fe3d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-05-14 Takaaki ISHIKAWA <tak...@ieee.org> + + * org-tree-slide.el: Merged breadcrumbs feature (#23) + - org-tree-slide-breadcrumbs is added to show breadcrumbs in the header + 2015-12-23 Takaaki ISHIKAWA <tak...@ieee.org> * org-tree-slide.el: Added Version header diff --git a/README.org b/README.org index 93ba0a1b85..46d62df8e9 100644 --- a/README.org +++ b/README.org @@ -1,14 +1,13 @@ #+TITLE: README for Org Tree Slide #+AUTHOR: Takaaki Ishikawa #+EMAIL: tak...@ieee.org -#+DATE: 2015-12-23 -#+UPDATE: 10:59:42 +#+DATE: 2016-05-14 +#+UPDATE: 15:24:12 #+STARTUP: content [[http://melpa.org/#/org-tree-slide][http://melpa.org/packages/org-tree-slide-badge.svg]] [[http://stable.melpa.org/#/org-tree-slide][http://stable.melpa.org/packages/org-tree-slide-badge.svg]] - * 1. What's this? The main purpose of this elisp is to handle each tree in an org buffer as a slide by simple narrowing. This emacs lisp is a minor mode for Emacs Org-mode. @@ -141,23 +140,26 @@ If you feel the cursor moving is very slow, please change a value of =org-tree-s * 5. User variables -|----+--------------------------------------+---------------+---------| -| | Variable | Default value | Select | -|----+--------------------------------------+---------------+---------| -| 1 | org-tree-slide-skip-outline-level | 0 | Numeric | -| 2 | org-tree-slide-header | t | Boolean | -| 3 | org-tree-slide-slide-in-effect | t | Boolean | -| 4 | org-tree-slide-cursor-init | t | Boolean | -| 5 | org-tree-slide-slide-in-brank-lines | 10 | Numeric | -| 6 | org-tree-slide-slide-in-waiting | 0.02 | Float | -| 7 | org-tree-slide-heading-emphasis | nil | Boolean | -| 8 | org-tree-slide-never-touch-face | nil | Boolean | -| 9 | org-tree-slide-skip-done | nil | Boolean | -| 10 | org-tree-slide-skip-comments | t | Boolean | -| 11 | org-tree-slide-activate-message | Hello... | String | -| 12 | org-tree-slide-deactivate-message | Quit, Bye! | String | -| 13 | org-tree-slide-modeline-display | 'outside | [*1] | -| 14 | org-tree-slide-fold-subtrees-skipped | t | Boolean | +#+CAPTION: User variables +|----+--------------------------------------------+---------------+---------| +| | Variable | Default value | Select | +|----+--------------------------------------------+---------------+---------| +| 1 | org-tree-slide-skip-outline-level | 0 | Numeric | +| 2 | org-tree-slide-header | t | Boolean | +| 3 | org-tree-slide-slide-in-effect | t | Boolean | +| 4 | org-tree-slide-cursor-init | t | Boolean | +| 5 | org-tree-slide-slide-in-brank-lines | 10 | Numeric | +| 6 | org-tree-slide-slide-in-waiting | 0.02 | Float | +| 7 | org-tree-slide-heading-emphasis | nil | Boolean | +| 8 | org-tree-slide-never-touch-face | nil | Boolean | +| 9 | org-tree-slide-skip-done | nil | Boolean | +| 10 | org-tree-slide-skip-comments | t | Boolean | +| 11 | org-tree-slide-activate-message | Hello... | String | +| 12 | org-tree-slide-deactivate-message | Quit, Bye! | String | +| 13 | org-tree-slide-modeline-display | 'outside | [*1] | +| 14 | org-tree-slide-fold-subtrees-skipped | t | Boolean | +| 15 | org-tree-slide-breadcrumbs | " > " | String | +| 16 | org-tree-slide-breadcrumbs-hide-todo-state | t | Boolean | #+BEGIN_QUOTE [*1] { nil| 'lighter | 'outside } @@ -233,6 +235,7 @@ see also ChangeLog |---------+------------------+-------------------------------------------------| | Version | Date | Description | |---------+------------------+-------------------------------------------------| +| v2.8.5 | 2016-05-14@14:09 | Added breadcrumbs feature (by Matus) | | v2.8.4 | 2015-08-12@21:35 | 'COMMENT'-subtree will be hidden (by Stefano) | | v2.8.3 | 2015-08-09@01:04 | Added a flag to reveal subtrees to be skipped | | v2.8.1 | 2015-02-27@10:42 | Hide org-clock related code | diff --git a/org-tree-slide.el b/org-tree-slide.el index dcfead77b8..6fb54ccc0e 100644 --- a/org-tree-slide.el +++ b/org-tree-slide.el @@ -1,9 +1,9 @@ ;;; org-tree-slide.el --- A presentation tool for org-mode ;; -;; Copyright (C) 2011-2015 Takaaki ISHIKAWA +;; Copyright (C) 2011-2016 Takaaki ISHIKAWA ;; ;; Author: Takaaki ISHIKAWA <takaxp at ieee dot org> -;; Version: 2.8.4 +;; Version: 2.8.5 ;; Maintainer: Takaaki ISHIKAWA <takaxp at ieee dot org> ;; Twitter: @takaxp ;; Repository: https://github.com/takaxp/org-tree-slide @@ -13,6 +13,7 @@ ;; Eric S Fraga ;; Eike Kettner ;; Stefano BENNATI +;; Matus Goljer ;; ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -75,7 +76,7 @@ (require 'org-timer) ;;(require 'org-clock) ; org-clock-in, -out, -clocking-p -(defconst org-tree-slide "2.8.4" +(defconst org-tree-slide "2.8.5" "The version number of the org-tree-slide.el") (defgroup org-tree-slide nil @@ -397,7 +398,8 @@ Profiles: (interactive) (setq org-tree-slide-skip-done (not org-tree-slide-skip-done)) (setq org-tree-slide--previous-line -1) ; to update modeline intentionally - (org-tree-slide--show-slide-header) + (when org-tree-slide-header + (org-tree-slide--show-slide-header)) (if org-tree-slide-skip-done (message "TODO Pursuit: ON") (message "TODO Pursuit: OFF"))) @@ -644,11 +646,13 @@ This is displayed by default if `org-tree-slide-modeline-display' is `nil'.") (t nil))) (defun org-tree-slide--slide-in (blank-lines) - (while (< 2 blank-lines) - (org-tree-slide--set-slide-header blank-lines) - (sit-for org-tree-slide-slide-in-waiting) - (org-tree-slide--hide-slide-header) - (setq blank-lines (1- blank-lines)))) + (let ((min-line -1)) + (when org-tree-slide-header + (setq min-line 2)) + (while (< min-line blank-lines) + (org-tree-slide--set-slide-header blank-lines) + (sit-for org-tree-slide-slide-in-waiting) + (setq blank-lines (1- blank-lines))))) (defvar org-tree-slide-title nil "If you have `#+TITLE:' line in your org buffer, it wil be used as a title @@ -750,8 +754,7 @@ concat the headers." breaks)) (defun org-tree-slide--show-slide-header () - (org-tree-slide--set-slide-header 2) - (forward-char 1)) + (org-tree-slide--set-slide-header 2)) (defun org-tree-slide--hide-slide-header () (when org-tree-slide--header-overlay @@ -846,14 +849,16 @@ concat the headers." nil)))) (defun org-tree-slide--last-heading-position () - "Return the position of the last heading. If the position does not exist in the buffer, then return nil." + "Return the position of the last heading. + If the position does not exist in the buffer, then return nil." (save-excursion (save-restriction (goto-char (buffer-size)) (org-tree-slide--beginning-of-tree)))) (defun org-tree-slide--beginning-of-tree () - "Return beginning point of the line, or t. If the position does not exist in the buffer, then return nil." + "Return beginning point of the line, or t. + If the position does not exist in the buffer, then return nil." (beginning-of-line) (if (and (not (org-tree-slide--heading-skip-p)) ;if the header has to be skipped (org-at-heading-p))