[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-tree-slide 946984e924 106/144: Add new private functio
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-tree-slide 946984e924 106/144: Add new private functions |
Date: |
Tue, 18 Jan 2022 08:59:53 -0500 (EST) |
branch: elpa/org-tree-slide
commit 946984e9249424bd320ac831cffb022832ccdf60
Author: Takaaki ISHIKAWA <takaxp@ieee.org>
Commit: Takaaki ISHIKAWA <takaxp@ieee.org>
Add new private functions
- org-tree-slide--last-point-at-bot
- org-tree-slide--beginning-of-tree (revise)
---
org-tree-slide.el | 58 ++++++++++++++++++++++++++-----------------------------
1 file changed, 27 insertions(+), 31 deletions(-)
diff --git a/org-tree-slide.el b/org-tree-slide.el
index 6b2d18f8df..c54f20638a 100644
--- a/org-tree-slide.el
+++ b/org-tree-slide.el
@@ -75,7 +75,6 @@
(require 'org)
(require 'org-timer)
-;;(require 'org-clock) ; org-clock-in, -out, -clocking-p
(defconst org-tree-slide "2.8.11"
"The version number of the org-tree-slide.el.")
@@ -444,7 +443,8 @@ Profiles:
(message " Next >>"))
(cond
((and (org-tree-slide--narrowing-p) ;displaying a slide, not the contents
- (org-tree-slide--last-tree-p (progn (beginning-of-line) (point))))
;the last subtree
+ (org-tree-slide--last-tree-p
+ (progn (beginning-of-line) (point)))) ;the last subtree
(org-tree-slide-content))
((or
(or (and (org-tree-slide--before-first-heading-p)
@@ -457,9 +457,7 @@ Profiles:
(org-tree-slide--outline-next-heading)
(org-tree-slide--display-tree-with-narrow))
;; stay the same slide (for CONTENT MODE, on the subtrees)
- (t nil (org-tree-slide--display-tree-with-narrow)))
- ;; (when (and org-tree-slide-skip-done (looking-at (concat "^\\*+ "
org-not-done-regexp))) (org-clock-in) )
- ))
+ (t nil (org-tree-slide--display-tree-with-narrow)))))
(defun org-tree-slide-move-previous-tree ()
"Display the previous slide."
@@ -477,7 +475,6 @@ Profiles:
(org-tree-slide--outline-previous-heading)
(org-tree-slide--outline-previous-heading))
(t (org-tree-slide--outline-previous-heading)))
- ;; (when (and org-tree-slide-skip-done (looking-at (concat "^\\*+ "
org-not-done-regexp))) (org-clock-in) )
(org-tree-slide--display-tree-with-narrow)
;; To avoid error of missing header in Emacs24
(if (= emacs-major-version 24)
@@ -563,7 +560,6 @@ This is displayed by default if
`org-tree-slide-modeline-display' is nil.")
(org-timer-stop))
(when org-tree-slide-heading-emphasis
(org-tree-slide--apply-custom-heading-face nil))
- ;; (when (and org-tree-slide-skip-done (looking-at (concat "^\\*+ "
org-not-done-regexp))) (when (org-clocking-p) (org-clock-out) ) )
(run-hooks 'org-tree-slide-mode-stop-hook)
(run-hooks 'org-tree-slide-stop-hook)
(when org-tree-slide-deactivate-message
@@ -646,8 +642,8 @@ This is displayed by default if
`org-tree-slide-modeline-display' is nil.")
hoge ; nil
hoge ; nil
*** hoge ; nil"
- (or (or (org-tree-slide--heading-done-skip-p)
- (org-tree-slide--heading-level-skip-p))
+ (or (org-tree-slide--heading-done-skip-p)
+ (org-tree-slide--heading-level-skip-p)
(org-tree-slide--heading-skip-comment-p)))
(defun org-tree-slide--heading-level-skip-p (&optional heading-level)
@@ -840,6 +836,28 @@ Some number of BLANK-LINES will be shown below the header."
(t
(format "[%d/%d]" current-slide count)))))))
+(defun org-tree-slide--last-point-at-bot ()
+ "Return nil, if no heading is the last tree. Otherwise, return the point.
+Searching the last point will start from the current cursor position.
+Move point to an appropriate position before searching by call this function."
+ (save-excursion
+ (save-restriction
+ (widen)
+ (unless (org-tree-slide--before-first-heading-p)
+ (org-tree-slide--beginning-of-tree)
+ (if (org-tree-slide--heading-skip-p)
+ (when (outline-previous-heading)
+ (org-tree-slide--last-point-at-bot))
+ (point))))))
+
+(defun org-tree-slide--beginning-of-tree ()
+ "Move point to beginning of tree.
+If the cursor exist before first heading, do nothing."
+ (unless (org-tree-slide--before-first-heading-p)
+ (beginning-of-line)
+ (unless (org-at-heading-p)
+ (org-tree-slide--outline-previous-heading))))
+
(defun org-tree-slide--active-p ()
"Return nil, if the current `major-mode' is not `org-mode'."
(and org-tree-slide-mode (equal major-mode 'org-mode)))
@@ -885,28 +903,6 @@ Some number of BLANK-LINES will be shown below the header."
(= p l)
nil)))))
-(defun org-tree-slide--last-point-at-bot ()
- "Return nil, if no heading is the last tree. Otherwise, return the point.
-Searching the last point will start from the current cursor position.
-Move point to an appropriate position before searching by call this function."
- (save-excursion
- (save-restriction
- (widen)
- (unless (org-tree-slide--before-first-heading-p)
- (org-tree-slide--beginning-of-tree)
- (if (org-tree-slide--heading-skip-p)
- (when (outline-previous-heading)
- (org-tree-slide--last-point-at-bot))
- (point))))))
-
-(defun org-tree-slide--beginning-of-tree ()
- "Move point to beginning of tree.
-If the cursor exist before first heading, do nothing."
- (unless (org-tree-slide--before-first-heading-p)
- (beginning-of-line)
- (unless (org-at-heading-p)
- (org-tree-slide--outline-previous-heading))))
-
(provide 'org-tree-slide)
;;; org-tree-slide.el ends here
- [nongnu] elpa/org-tree-slide 1864b36a56 081/144: Added a flag to reveal subtrees to be skipped, (continued)
- [nongnu] elpa/org-tree-slide 1864b36a56 081/144: Added a flag to reveal subtrees to be skipped, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide dd344a2749 075/144: Merge branch 'master' of https://github.com/takaxp/org-tree-slide, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide dccd80418a 089/144: Merge pull request #20 from syohex/add-section-meta, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 0abef6864f 069/144: Suppress an error message from org-timer, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 42468d8a09 097/144: Merge branch 'master' of https://github.com/takaxp/org-tree-slide, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide f3059a263f 080/144: Updating indent, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide d45152fad1 099/144: Updated ChangeLog and version number, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide d81195b0df 100/144: Refine docstrings, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 2b833e9faa 101/144: Update comments, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 062035ec7b 102/144: Extract header colors from default face of frame, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 946984e924 106/144: Add new private functions,
ELPA Syncer <=
- [nongnu] elpa/org-tree-slide 036a36eec1 112/144: Rename an internal variable, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide e17dc06053 105/144: Referectaring, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 9d15bd9fa1 113/144: Add support for date header, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 7151aaf4df 117/144: Add FUNDING.yml, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 6cd71afa35 118/144: Add org-tree-slide-indicator, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 7983492eda 124/144: Fix minor typo in README (slip -> skip), ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide d9fede1544 127/144: Merge pull request #36 from KaratasFurkan/create-variable-content-margin-top, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 5e5dbd908e 119/144: Update README.org, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 7126a43650 123/144: Fix typo, ELPA Syncer, 2022/01/18
- [nongnu] elpa/org-tree-slide 619fbb17a2 121/144: buffer-narrowed-p is applied, ELPA Syncer, 2022/01/18