emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/org-tree-slide 1864b36a56 081/144: Added a flag to reveal


From: ELPA Syncer
Subject: [nongnu] elpa/org-tree-slide 1864b36a56 081/144: Added a flag to reveal subtrees to be skipped
Date: Tue, 18 Jan 2022 08:59:42 -0500 (EST)

branch: elpa/org-tree-slide
commit 1864b36a56f27dd499f60d1a2784724645c12b1a
Author: Takaaki ISHIKAWA <takaxp@ieee.org>
Commit: Takaaki ISHIKAWA <takaxp@ieee.org>

    Added a flag to reveal subtrees to be skipped
---
 ChangeLog         |  7 +++++++
 README.org        | 38 ++++++++++++++++++++------------------
 org-tree-slide.el | 24 +++++++++++++++---------
 3 files changed, 42 insertions(+), 27 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b4a00e535b..75537834ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-08-09  Takaaki ISHIKAWA  <takaxp@ieee.org>
+
+       * org-tree-slide.el: Added a flag to reveal subtrees to be skipped
+       - org-tree-slide-fold-subtrees-skipped is added
+       - The original idea was proposed by bennati (https://github.com/bennati)
+       - org-tree-slide--heading-level-skip-p was revised so that the status 
can be checked by providing an arbitrary level number.
+
 2015-02-27  Takaaki ISHIKAWA  <takaxp@ieee.org>
 
        * org-tree-slide.el: Hide org-clock related code
diff --git a/README.org b/README.org
index 4fa6106ec7..f3187d86a2 100644
--- a/README.org
+++ b/README.org
@@ -1,8 +1,8 @@
 #+TITLE:       README for Org Tree Slide
 #+AUTHOR:      Takaaki Ishikawa
 #+EMAIL:       takaxp@ieee.org
-#+DATE:                2015-02-20
-#+UPDATE:      21:49:07
+#+DATE:                2015-08-09
+#+UPDATE:      01:19:10
 #+STARTUP:     content
 
 * 1. What's this?
@@ -137,22 +137,23 @@ 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]    |
+|----+--------------------------------------+---------------+---------|
+|    | 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 |
 
 #+BEGIN_QUOTE
 [*1] { nil| 'lighter | 'outside }
@@ -228,6 +229,7 @@ see also ChangeLog
 
|---------+------------------+-------------------------------------------------|
 | Version | Date             | Description                                     
|
 
|---------+------------------+-------------------------------------------------|
+| 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                     
|
 | v2.8.0  | 2015-02-20@21:27 | Changed Keymap, and renamed/added hooks         
|
 | v2.7.5  | 2015-02-15@16:29 | Replace ots- with org-tree-slide--              
|
diff --git a/org-tree-slide.el b/org-tree-slide.el
index f7a2ee5e02..78fa7d63ab 100644
--- a/org-tree-slide.el
+++ b/org-tree-slide.el
@@ -68,7 +68,7 @@
 (require 'org-timer)
 ;;(require 'org-clock)                 ; org-clock-in, -out, -clocking-p
 
-(defconst org-tree-slide "2.8.1"
+(defconst org-tree-slide "2.8.3"
   "The version number of the org-tree-slide.el")
 
 (defgroup org-tree-slide nil
@@ -88,6 +88,13 @@
   :type 'integer
   :group 'org-tree-slide)
 
+(defcustom org-tree-slide-fold-subtrees-skipped t
+  "If this flag is true, the subtrees in a slide will be displayed in fold.
+   When nil, the body of the subtrees will be revealed.
+"
+  :type 'boolean
+  :group 'org-tree-slide)
+
 (defcustom org-tree-slide-header t
   "The status of displaying the slide header"
   :type 'boolean
@@ -529,8 +536,10 @@ Profiles:
   (unless (org-tree-slide--before-first-heading-p)
     (hide-subtree)     ; support CONTENT (subtrees are shown)
     (org-show-entry)
-    (if (org-tree-slide--heading-level-skip-level-p (1+ (org-outline-level))) 
;if this is the last level to be displayed, show the full content
-        (show-all)
+    ;; If this is the last level to be displayed, show the full content
+    (if (and (not org-tree-slide-fold-subtrees-skipped)
+             (org-tree-slide--heading-level-skip-p (1+ (org-outline-level))))
+        (org-show-subtree)
       (show-children))
     ;;    (org-cycle-hide-drawers 'all) ; disabled due to performance reduction
     (org-narrow-to-subtree))
@@ -584,18 +593,15 @@ Profiles:
           (org-tree-slide--heading-level-skip-p))
       (org-tree-slide--heading-skip-comment-p)))
 
-(defun org-tree-slide--heading-level-skip-level-p (level)
+(defun org-tree-slide--heading-level-skip-p (&optional level)
   (and (> org-tree-slide-skip-outline-level 0)
-       (<= org-tree-slide-skip-outline-level level)))
-
-(defun org-tree-slide--heading-level-skip-p ()
-  (org-tree-slide--heading-level-skip-level-p (org-outline-level)))
+       (<= org-tree-slide-skip-outline-level (or level (org-outline-level)))))
 
 (defun org-tree-slide--heading-done-skip-p ()
   (and org-tree-slide-skip-done
        (not
         (looking-at
-         ;; 6.33x does NOT suport org-outline-regexp-bol
+         ;; 6.33x does NOT support org-outline-regexp-bol
          (concat "^\\*+ " org-not-done-regexp)))))
 
 (defun org-tree-slide--heading-skip-comment-p ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]