From f55b7c8d56950dc02e8e450538265a29e6814d91 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sun, 22 Dec 2024 13:12:10 +0100 Subject: [PATCH] update org-tree-slide Signed-off-by: Andreas Gerler --- .../org-tree-slide-pkg.el | 14 --- .../org-tree-slide-autoloads.el | 105 ++++++++---------- .../org-tree-slide-compt.el | 0 .../org-tree-slide-pkg.el | 10 ++ .../org-tree-slide.el | 86 ++++++++++---- elpa/org-tree-slide-readme.txt | 37 ------ 6 files changed, 119 insertions(+), 133 deletions(-) delete mode 100644 elpa/org-tree-slide-20230305.441/org-tree-slide-pkg.el rename elpa/{org-tree-slide-20230305.441 => org-tree-slide-20230826.1234}/org-tree-slide-autoloads.el (71%) rename elpa/{org-tree-slide-20230305.441 => org-tree-slide-20230826.1234}/org-tree-slide-compt.el (100%) create mode 100644 elpa/org-tree-slide-20230826.1234/org-tree-slide-pkg.el rename elpa/{org-tree-slide-20230305.441 => org-tree-slide-20230826.1234}/org-tree-slide.el (91%) delete mode 100644 elpa/org-tree-slide-readme.txt diff --git a/elpa/org-tree-slide-20230305.441/org-tree-slide-pkg.el b/elpa/org-tree-slide-20230305.441/org-tree-slide-pkg.el deleted file mode 100644 index 2164555c..00000000 --- a/elpa/org-tree-slide-20230305.441/org-tree-slide-pkg.el +++ /dev/null @@ -1,14 +0,0 @@ -(define-package "org-tree-slide" "20230305.441" "A presentation tool for org-mode" - '((emacs "25.2")) - :commit "07906356f0b8d8ac51645b0994b8108deb53003d" :authors - '(("Takaaki ISHIKAWA ")) - :maintainers - '(("Takaaki ISHIKAWA ")) - :maintainer - '("Takaaki ISHIKAWA ") - :keywords - '("convenience" "org-mode" "presentation" "narrowing") - :url "https://github.com/takaxp/org-tree-slide") -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/org-tree-slide-20230305.441/org-tree-slide-autoloads.el b/elpa/org-tree-slide-20230826.1234/org-tree-slide-autoloads.el similarity index 71% rename from elpa/org-tree-slide-20230305.441/org-tree-slide-autoloads.el rename to elpa/org-tree-slide-20230826.1234/org-tree-slide-autoloads.el index ab113f65..e2216e2c 100644 --- a/elpa/org-tree-slide-20230305.441/org-tree-slide-autoloads.el +++ b/elpa/org-tree-slide-20230826.1234/org-tree-slide-autoloads.el @@ -1,32 +1,19 @@ -;;; org-tree-slide-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- -;; +;;; org-tree-slide-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- +;; Generated by the `loaddefs-generate' function. + +;; This file is part of GNU Emacs. + ;;; Code: -(add-to-list 'load-path (directory-file-name - (or (file-name-directory #$) (car load-path)))) +(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) + -;;;### (autoloads nil "org-tree-slide" "org-tree-slide.el" (0 0 0 -;;;;;; 0)) ;;; Generated autoloads from org-tree-slide.el (autoload 'org-tree-slide-mode "org-tree-slide" "\ A presentation tool for Org Mode. -This is a minor mode. If called interactively, toggle the -`Org-Tree-Slide mode' mode. If the prefix argument is positive, -enable the mode, and if it is zero or negative, disable the mode. - -If called from Lisp, toggle the mode if ARG is `toggle'. Enable -the mode if ARG is nil, omitted, or is a positive number. -Disable the mode if ARG is a negative number. - -To check whether the minor mode is enabled in the current buffer, -evaluate `org-tree-slide-mode'. - -The mode's hook is called both when the mode is enabled and when -it is disabled. - Usage: - Set minimal recommendation settings in .emacs (global-set-key (kbd \"\") ='org-tree-slide-mode) @@ -39,7 +26,7 @@ Usage: Profiles: - [ Simple ] - => \\`M-x org-tree-slide-simple-profile' + => \\[command] `org-tree-slide-simple-profile' 1. No header display 2. No slide-in effect @@ -48,7 +35,7 @@ Profiles: 5. Display every type of tree - [ Presentation ] - => \\`M-x org-tree-slide-presentation-profile' + => \\[command] `org-tree-slide-presentation-profile' 1. Display header 2. Enable slide-in effect @@ -57,7 +44,7 @@ Profiles: 5. Display every type of tree - [ TODO Pursuit with narrowing ] - => \\`M-x org-tree-slide-narrowing-control-profile' + => \\[command] `org-tree-slide-narrowing-control-profile' 1. No header display 2. No slide-in effect @@ -65,23 +52,31 @@ Profiles: 4. Display slide number in mode line 5. Display TODO trees only -\(fn &optional ARG)" t nil) +This is a minor mode. If called interactively, toggle the +`Org-Tree-Slide mode' mode. If the prefix argument is positive, enable +the mode, and if it is zero or negative, disable the mode. -(autoload 'org-tree-slide-play-with-timer "org-tree-slide" "\ -Start slideshow with setting a count down timer." t nil) +If called from Lisp, toggle the mode if ARG is `toggle'. Enable the +mode if ARG is nil, omitted, or is a positive number. Disable the mode +if ARG is a negative number. -(autoload 'org-tree-slide-without-init-play "org-tree-slide" "\ -Start slideshow without the init play. Just enter \"org-tree-slide-mode\"." t nil) +To check whether the minor mode is enabled in the current buffer, +evaluate the variable `org-tree-slide-mode'. -(autoload 'org-tree-slide-content "org-tree-slide" "\ -Change the display for viewing content of the org file." t nil) +The mode's hook is called both when the mode is enabled and when it is +disabled. +(fn &optional ARG)" t) +(autoload 'org-tree-slide-play-with-timer "org-tree-slide" "\ +Start slideshow with setting a count down timer." t) +(autoload 'org-tree-slide-without-init-play "org-tree-slide" "\ +Start slideshow without the init play. Just enter \"org-tree-slide-mode\"." t) +(autoload 'org-tree-slide-content "org-tree-slide" "\ +Change the display for viewing content of the org file." t) (autoload 'org-tree-slide-move-next-tree "org-tree-slide" "\ -Display the next slide." t nil) - +Display the next slide." t) (autoload 'org-tree-slide-move-previous-tree "org-tree-slide" "\ -Display the previous slide." t nil) - +Display the previous slide." t) (autoload 'org-tree-slide-simple-profile "org-tree-slide" "\ Set variables for simple use. @@ -91,8 +86,7 @@ Set variables for simple use. `org-tree-slide-cursor-init' => t `org-tree-slide-modeline-display' => nil `org-tree-slide-skip-done' => nil - `org-tree-slide-skip-comments' => t" t nil) - + `org-tree-slide-skip-comments' => t" t) (autoload 'org-tree-slide-presentation-profile "org-tree-slide" "\ Set variables for presentation use. @@ -102,8 +96,7 @@ Set variables for presentation use. `org-tree-slide-cursor-init' => t `org-tree-slide-modeline-display' => ='outside `org-tree-slide-skip-done' => nil - `org-tree-slide-skip-comments' => t" t nil) - + `org-tree-slide-skip-comments' => t" t) (autoload 'org-tree-slide-narrowing-control-profile "org-tree-slide" "\ Set variables for TODO pursuit with narrowing. @@ -113,43 +106,37 @@ Set variables for TODO pursuit with narrowing. `org-tree-slide-cursor-init' => nil `org-tree-slide-modeline-display' => ='lighter `org-tree-slide-skip-done' => t - `org-tree-slide-skip-comments' => t" t nil) - + `org-tree-slide-skip-comments' => t" t) (autoload 'org-tree-slide-display-header-toggle "org-tree-slide" "\ -Toggle displaying the slide header." t nil) - +Toggle displaying the slide header." t) (autoload 'org-tree-slide-slide-in-effect-toggle "org-tree-slide" "\ -Toggle using slide-in effect." t nil) - +Toggle using slide-in effect." t) (autoload 'org-tree-slide-heading-emphasis-toggle "org-tree-slide" "\ -Toggle applying emphasis to heading." t nil) - +Toggle applying emphasis to heading." t) (autoload 'org-tree-slide-skip-done-toggle "org-tree-slide" "\ -Toggle show TODO item only or not." t nil) - +Toggle show TODO item only or not." t) (autoload 'org-tree-slide-skip-comments-toggle "org-tree-slide" "\ -Toggle show COMMENT item or not." t nil) - +Toggle show COMMENT item or not. +If `org-tree-slide-skip-comments' is specified as `inherit', +then toggle between `inherit' and nil. Otherwise, between t and nil. +See also `org-tree-slide-skip-comments'." t) (register-definition-prefixes "org-tree-slide" '("org-tree-slide")) -;;;*** -;;;### (autoloads nil "org-tree-slide-compt" "org-tree-slide-compt.el" -;;;;;; (0 0 0 0)) ;;; Generated autoloads from org-tree-slide-compt.el (register-definition-prefixes "org-tree-slide-compt" '("outline-")) - -;;;*** -;;;### (autoloads nil nil ("org-tree-slide-pkg.el") (0 0 0 0)) +;;; End of scraped data + +(provide 'org-tree-slide-autoloads) -;;;*** - ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t -;; coding: utf-8 +;; no-native-compile: t +;; coding: utf-8-emacs-unix ;; End: + ;;; org-tree-slide-autoloads.el ends here diff --git a/elpa/org-tree-slide-20230305.441/org-tree-slide-compt.el b/elpa/org-tree-slide-20230826.1234/org-tree-slide-compt.el similarity index 100% rename from elpa/org-tree-slide-20230305.441/org-tree-slide-compt.el rename to elpa/org-tree-slide-20230826.1234/org-tree-slide-compt.el diff --git a/elpa/org-tree-slide-20230826.1234/org-tree-slide-pkg.el b/elpa/org-tree-slide-20230826.1234/org-tree-slide-pkg.el new file mode 100644 index 00000000..2b6caa1c --- /dev/null +++ b/elpa/org-tree-slide-20230826.1234/org-tree-slide-pkg.el @@ -0,0 +1,10 @@ +;; -*- no-byte-compile: t; lexical-binding: nil -*- +(define-package "org-tree-slide" "20230826.1234" + "A presentation tool for org-mode." + '((emacs "25.2")) + :url "https://github.com/takaxp/org-tree-slide" + :commit "941e7e6cb8a5a0b193345263ed912cceecae1887" + :revdesc "941e7e6cb8a5" + :keywords '("convenience" "org-mode" "presentation" "narrowing") + :authors '(("Takaaki ISHIKAWA" . "takaxpatieeedotorg")) + :maintainers '(("Takaaki ISHIKAWA" . "takaxpatieeedotorg"))) diff --git a/elpa/org-tree-slide-20230305.441/org-tree-slide.el b/elpa/org-tree-slide-20230826.1234/org-tree-slide.el similarity index 91% rename from elpa/org-tree-slide-20230305.441/org-tree-slide.el rename to elpa/org-tree-slide-20230826.1234/org-tree-slide.el index ee4a59fb..2c473470 100644 --- a/elpa/org-tree-slide-20230305.441/org-tree-slide.el +++ b/elpa/org-tree-slide-20230826.1234/org-tree-slide.el @@ -3,7 +3,8 @@ ;; Copyright (C) 2011-2023 Takaaki ISHIKAWA ;; ;; Author: Takaaki ISHIKAWA -;; Version: 2.8.19 +;; Package-Version: 20230826.1234 +;; Package-Revision: 941e7e6cb8a5 ;; Package-Requires: ((emacs "25.2")) ;; Maintainer: Takaaki ISHIKAWA ;; Twitter: @takaxp @@ -79,7 +80,7 @@ (require 'org-timer) (require 'face-remap) -(defconst org-tree-slide "2.8.18" +(defconst org-tree-slide "2.8.22" "The version number of the org-tree-slide.el.") (defgroup org-tree-slide nil @@ -158,8 +159,16 @@ nil: keep the same position. The slideshow will start from the heading :group 'org-tree-slide) (defcustom org-tree-slide-skip-comments t - "Specify to skip COMMENT item or not." - :type 'boolean + "Specify to skip COMMENT item or not. +t: skip only the current heading with COMMENT, + child headings without COMMENT will be shown +inherit: skip headings with COMMENT and its child headings +nil: show even if it has COMMENT." + :type '(choice + (const :tag "Skip only headings with COMMENT" t) + (const :tag "Skip headings with COMMENT and its child headings" + inherit) + (const :tag "Show headings even if it has COMMENT" nil)) :group 'org-tree-slide) (defcustom org-tree-slide-activate-message @@ -263,7 +272,7 @@ Usage: Profiles: - [ Simple ] - => \\`M-x org-tree-slide-simple-profile' + => \\[command] `org-tree-slide-simple-profile' 1. No header display 2. No slide-in effect @@ -272,7 +281,7 @@ Profiles: 5. Display every type of tree - [ Presentation ] - => \\`M-x org-tree-slide-presentation-profile' + => \\[command] `org-tree-slide-presentation-profile' 1. Display header 2. Enable slide-in effect @@ -281,7 +290,7 @@ Profiles: 5. Display every type of tree - [ TODO Pursuit with narrowing ] - => \\`M-x org-tree-slide-narrowing-control-profile' + => \\[command] `org-tree-slide-narrowing-control-profile' 1. No header display 2. No slide-in effect @@ -501,11 +510,33 @@ Profiles: ;;;###autoload (defun org-tree-slide-skip-comments-toggle () - "Toggle show COMMENT item or not." + "Toggle show COMMENT item or not. +If `org-tree-slide-skip-comments' is specified as `inherit', +then toggle between `inherit' and nil. Otherwise, between t and nil. +See also `org-tree-slide-skip-comments'." (interactive) - (setq org-tree-slide-skip-comments (not org-tree-slide-skip-comments)) - (if org-tree-slide-skip-comments - (message "COMMENT: HIDE") (message "COMMENT: SHOW"))) + ;; Sync + (if (eq org-tree-slide-skip-comments 'inherit) + (setq org-tree-slide--skip-comments-mode 'inherit) + (when (eq org-tree-slide-skip-comments t) + (setq org-tree-slide--skip-comments-mode t))) + ;; Toggle + (if (eq org-tree-slide--skip-comments-mode 'inherit) + (if (eq org-tree-slide-skip-comments 'inherit) + (setq org-tree-slide-skip-comments nil) + (setq org-tree-slide-skip-comments 'inherit)) + (setq org-tree-slide-skip-comments (not org-tree-slide-skip-comments))) + ;; Feedback + (cond ((eq org-tree-slide-skip-comments nil) + (message "COMMENT: Show headings even if it has COMMENT")) + ((eq org-tree-slide-skip-comments t) + (message "COMMENT: Skip only headings with COMMENT")) + ((eq org-tree-slide-skip-comments 'inherit) + (message + "COMMENT: Skip headings with COMMENT and its child headings"))) + (when (org-tree-slide--active-p) + (setq org-tree-slide--slide-number + (format " %s" (org-tree-slide--count-slide (point)))))) ;;; Internal functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar org-tree-slide--slide-number nil) @@ -541,6 +572,7 @@ This is displayed by default if `org-tree-slide-modeline-display' is nil.") "Flag to check the status of overlay for a slide header.") (defvar org-tree-slide--header-face-autoconfig nil) +(defvar org-tree-slide--skip-comments-mode nil) (defun org-tree-slide--setup () "Setup." (when (org-tree-slide--active-p) @@ -572,10 +604,7 @@ This is displayed by default if `org-tree-slide-modeline-display' is nil.") (message "%s" org-tree-slide-activate-message)))) (defvar org-tree-slide-startup "overview" - "Start `org-tree-slide' with overview mode. -If you have \"#+startup:\" line in your org buffer, -the org buffer will be shown with corresponding status -\\(content, showall, overview:default\\).") + "If you have \"#+startup:\" line in your org buffer, the org buffer will be shown with corresponding status \(content, showall, overview:default\).") (defun org-tree-slide--stop () "Stop the slide view, and redraw the orgmode buffer with #+STARTUP:." @@ -666,7 +695,7 @@ the org buffer will be shown with corresponding status (org-tree-slide-content))) ;; would be not reached here. ((and (equal action 'first) (equal direction 'previous)) - (org-tree-slide--move-to-the-first-heading)) + (org-tree-slide--outline-next-heading)) ;; find the first non-skip ((and (equal action 'skip) (equal direction 'next)) (org-tree-slide--outline-next-heading)) ;; find next again @@ -702,9 +731,20 @@ If HEADING-LEVEL is non-nil, the provided outline level is checked." (concat "^\\*+ " org-not-done-regexp))))) (defun org-tree-slide--heading-skip-comment-p () - "Return t, if the current heading is commented." - (and org-tree-slide-skip-comments - (looking-at (concat "^\\*+ " org-comment-string)))) + "Return t, if the current heading is commented. +If `org-tree-slide-skip-comments' is specified as `inherit' and +parent heading is commented, then also return t. Otherwise, return nil." + (cond ((eq org-tree-slide-skip-comments 'inherit) + (when (org-tree-slide--parent-commented-p) t)) + (t (and org-tree-slide-skip-comments + (looking-at (concat "^\\*+ " org-comment-string)))))) + +(defun org-tree-slide--parent-commented-p () + "Return nil, when no parent heading is commented." + (memq 0 (mapcar + (lambda (x) + (string-match (concat "^" org-comment-string) x)) + (org-get-outline-path t)))) (defun org-tree-slide--slide-in (blank-lines) "Apply slide in. The slide will be moved from BLANK-LINES below to top." @@ -784,7 +824,7 @@ concat the headers." :group 'org-tree-slide) (defun org-tree-slide--get-parents (&optional delim) - "Get parent headlines and concat them with DELIM." + "Get parent headings and concat them with DELIM." (setq delim (or delim " > ")) (save-excursion (save-restriction @@ -799,7 +839,6 @@ concat the headers." (defun org-tree-slide--set-slide-header (blank-lines) "Set the header with overlay. - Some number of BLANK-LINES will be shown below the header." (org-tree-slide--hide-slide-header) (setq org-tree-slide--header-overlay @@ -835,7 +874,8 @@ Some number of BLANK-LINES will be shown below the header." (defun org-tree-slide--show-slide-header (&optional lines) "Show header. When LINES is nil, the default value is 2." - (org-tree-slide--set-slide-header (or lines org-tree-slide-content-margin-top))) + (org-tree-slide--set-slide-header + (or lines org-tree-slide-content-margin-top))) (defun org-tree-slide--hide-slide-header () "Hide header." @@ -844,7 +884,7 @@ Some number of BLANK-LINES will be shown below the header." (defun org-tree-slide--move-to-the-first-heading () "Go to the first heading. Narrowing will be canceled. -If no heading in the buffer, Return nil and stay top of the buffer. +If no heading in the buffer, return nil and stay top of the buffer. Otherwise, return the point. This doesn't check whether skipping or not." (widen) (goto-char 1) diff --git a/elpa/org-tree-slide-readme.txt b/elpa/org-tree-slide-readme.txt deleted file mode 100644 index a1da06fa..00000000 --- a/elpa/org-tree-slide-readme.txt +++ /dev/null @@ -1,37 +0,0 @@ -Requirement: - org-mode 6.33x or higher version - The latest version of the org-mode is recommended. - (see https://orgmode.org/) - -Usage: - 1. Put this elisp into your load-path - 2. Add (require 'org-tree-slide) in your .emacs - 3. Open an org-mode file - 4. Toggle org-tree-slide-mode (M-x org-tree-slide-mode) - then Slideshow will start and you can find "TSlide" in mode line. - 5. `C-<'/`C->' will move between slides - 6. `C-x s c' will show CONTENT of the org buffer - Select a heading and type `C-<', then Slideshow will start again. - 7. Toggle org-tree-slide-mode again to exit this minor mode - -Recommended minimum settings: - (global-set-key (kbd "") 'org-tree-slide-mode) - (global-set-key (kbd "S-") 'org-tree-slide-skip-done-toggle) - - and three useful profiles are available. - - 1. Simple use - M-x org-tree-slide-simple-profile - - 2. Presentation use - M-x org-tree-slide-presentation-profile - - 3. TODO Pursuit with narrowing - M-x org-tree-slide-narrowing-control-profile - - Type `C-h f org-tree-slide-mode', you can find more detail. - -Note: - - Make sure key maps below when you introduce this elisp. - - Customize variables, M-x customize-group ENT org-tree-slide ENT - - see also moom.el (https://github.com/takaxp/moom) to control Emacs frame -- 2.47.3