From 206528120d8d08d89a4b0f82bee086b3fa7748a0 Mon Sep 17 00:00:00 2001 From: bw Date: Tue, 6 Oct 2026 00:59:02 -0400 Subject: [PATCH 1/2] org-mode, kotl-mode - Replace Action/Assist Key behavior in cells with func variables INCOMPATIBLE CHANGE: These variables: kotl-mode:action-key-default-function, kotl-mode:assist-key-default-function smart-org-action-key-heading-function, smart-org-assist-key-heading-function by default are set to no-ops and outline visibility cycling will now be handled by TAB/S-TAB rather than the Smart Keys. hsys-org-cycle-global - Change all `org-global-cycle' references to `org-cycle-global' and set this command to `org-cycle-global'. kcell-data:create - Signal an error if buffer-local `kotl-kview' is not a valid kview. hywiki-word-action-key-creation-allowed-p, hywiki-word-create-exclude-action-key-modes - Add and use in ibtype, `hwyiki-word' to control which major modes disable Action Key WikiWord creation (none, by default). hyrolo-yank - Interactively, indicate whether yanking an entry or a tree (sub-entries). --- ChangeLog | 49 +++++++++++-- hibtypes.el | 19 +++-- hsys-org.el | 10 +-- hui-mouse.el | 41 ++++++++--- hypb-maintenance.el | 4 +- hyperbole.el | 9 +-- hyrolo.el | 22 +++--- hywiki.el | 55 +++++++++------ kotl/EXAMPLE.kotl | 21 ++++-- kotl/kcell.el | 18 ++--- kotl/kotl-mode.el | 134 ++++++++++++++++++++--------------- man/hyperbole.info | Bin 708270 -> 711159 bytes man/hyperbole.texi | 150 +++++++++++++++++++++++++--------------- man/use-package | 21 +++++- test/kotl-mode-tests.el | 5 +- 15 files changed, 370 insertions(+), 188 deletions(-) diff --git a/ChangeLog b/ChangeLog index a5247c8b..0a81c6e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,58 @@ 2026-10-05 Bob Weiner +* hui-mouse.el (smart-org-action-key-heading-function, + smart-org-assist-key-heading-function): Add to allow user-settable + behavior when point is anywhere within a heading line (not at the end). + (smart-org-cycle): Add as a possible setting for the above variables. + man/hyperbole.texi (Smart Key - Org Mode): + (Implicit Button Types): smart-org update doc. + +* hsys-org.el (hsys-org-cycle-global): Change all 'org-global-cycle' references + to 'org-cycle-global' and set this command to 'org-cycle-global'. + +* kotl/kotl-mode.el (kotl-mode:action-key-default-function): Add this defcustom. + (kotl-mode:action-key): INCOMPATIBLE CHANGE: Replace default + action in a kcell of show/hide tree with a call to the function specified by + the new action defcustom above, which defaults to a no-op, since we have added + tree cycling on the TAB key. + (kotl-mode:show-or-hide-tree): Encode prior Action Key + behavior in this function if user wants to set it as the defcustom value. + man/use-package (kotl-mode): Add comment on how to utilize the above function. + man/hyperbole.texi (Hiding and Showing): Update Action Key behavior doc. + (kotl-mode:assist-key-default-function): Add this defcustom. + (kotl-mode:assist-key): INCOMPATIBLE CHANGE: Replace default + action in a kcell of 'smart-scroll-down' with a call to the function specified + by the new assist defcustom above, which defaults to a no-op, for symmetry with + the Action Key. + test/kotl-mode-tests.el (kotl-mode-hide-cell): Add needed 'let' binding of + 'kotl-mode:action-key-default-function'. + +* kotl/kcell.el (kcell-data:create): Signal an error if buffer-local 'kotl-kview' + is not a valid kview. + * hywiki.el (hywiki-init): Add to move HyWiki initializations from load-time to after system and user init time. This fixes bug gh#1023 where a directory given by the default value of 'hywiki-directory' was created though the value was changed prior to loading HyWiki. +2026-10-04 Bob Weiner + +* hywiki.el (hywiki-word-action-key-creation-allowed-p, + hywiki-word-create-exclude-action-key-modes): Add. + hibtypes.el (hywiki-word): Use the above in ibtype, 'hywiki-word, to control + which major modes disable Action Key WikiWord creation, by default, none. + man/hyperbole.texi (Creating HyWikiWords): Doc above variable. + (Implicit Button Types): Update doc for 'hywiki-word' + and 'hywiki-existing-word' ibtypes. + * man/use-package (hyperbole): Add 'hywiki-directory' to :custom section. 2026-10-03 Bob Weiner * hyrolo.el (hyrolo-yank): INCOMPATIBLE CHANGE: Interactively, 'regexp-flag' is set only if prefix arg is not C-u, as C-u now disables the 3rd arg, - 'exclude-sub-entries'. + 'exclude-sub-entries'. Interactively, indicate whether yanking an + entry or a tree (sub-entries). man/hyperbole.texi (HyRolo Menu): Remove referent to 'helm' package no longer supported by HyRolo. (HyRolo Menu): Add prefix arg handling details for the @@ -8803,7 +8844,7 @@ V9.0.1 changes ^^^^: hyrolo.el (hyrolo-verify): Allow buffers associated with files from 'hsys-org-cycle-bob-file-list' as well. hui-mouse.el (smart-org-bob-and-non-heading-p): Check whether {TAB} or - {M-RET} should org-global-cycle at point." + {M-RET} should org-cycle-global at point." (smart-eolp): Allow for org global cycling at start of buffer on a non-heading line in Hyperbole doc files when displayed from Hyperbole menu items. @@ -10441,7 +10482,7 @@ V9.0.1 changes ^^^^: (assist-key, assist-key-internal): FIX: Set 'assist-key-depressed-flag' to t when executing keyboard assist-key actions. -* hsys-org.el (hsys-org-global-cycle, hsys-org-cycle): FIX: Temp move point to beginning +* hsys-org.el (hsys-org-cycle-global, hsys-org-cycle): FIX: Temp move point to beginning of heading so TAB invocations cycle through all states properly. 2023-07-24 Mats Lidell @@ -13032,7 +13073,7 @@ name with 'name' and 'name-key'. * man/hyperbole.texi (Implicit Button Types, Smart Key - Org Mode): Add Org mode Action Key todo cycling and Assist Key todo set cycling. - hsys-org.el (hsys-org-cycle, hsys-org-global-cycle): FIX: Remove setting of + hsys-org.el (hsys-org-cycle, hsys-org-cycle-global): FIX: Remove setting of last-command which causes cursor to jump around somewhere else in the buffer when unfolding a headline rather than just unfolding it (hsys-org-todo-at-p, hsys-org-todo-cycle, hsys-org-todo-set-cycle): diff --git a/hibtypes.el b/hibtypes.el index a12ec193..51fc9857 100644 --- a/hibtypes.el +++ b/hibtypes.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 19-Sep-91 at 20:45:31 -;; Last-Mod: 30-Sep-26 at 17:04:10 by Bob Weiner +;; Last-Mod: 5-Oct-26 at 10:27:23 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -53,6 +53,7 @@ ;;; ************************************************************************ (defvar cscope-output-line-regexp) +(defvar hywiki-word-create-exclude-action-key-modes) (defvar id-cflow-repeated-indicator) (defvar markdown-regex-link-reference) (defvar markdown-regex-reference-definition) @@ -74,6 +75,7 @@ (declare-function hywiki-highlight-word-get-range "hywiki") (declare-function hywiki-message-spec wikiword "hywiki") (declare-function hywiki-referent-exists-p "hywiki") +(declare-function hywiki-word-action-key-creation-allowed-p "hywiki") (declare-function hywiki-word-create-and-display "hywiki") (declare-function hywiki-word-from-reference "hywiki") (declare-function hywiki-non-hook-context-p "hywiki") @@ -140,9 +142,10 @@ (defib hywiki-word () "When on a non-existing HyWikiWord, create it and display its referent. -This is the Action Key function that activates HyWikiWords. A call -to (hywiki-active-in-current-buffer-p) must return non-nil for this to -activate. +This is the Action Key function that creates HyWikiWords. Calls +to (hywiki-word-action-key-creation-allowed-p), +(hywiki-active-in-current-buffer-p) and (not (hywiki-non-hook-context-p)) +must return non-nil for this to activate. If the associated HyWiki referent is a page, create it automatically unless it is the first HyWiki page to be created, in which case, @@ -151,7 +154,8 @@ use. Existing HyWikiWords are handled by the implicit button type `hywiki-existing-word'." - (when (and (hywiki-active-in-current-buffer-p) + (when (and (hywiki-word-action-key-creation-allowed-p) + (hywiki-active-in-current-buffer-p) (not (hywiki-non-hook-context-p))) (let* ((wikiword-start-end (hywiki-highlight-word-get-range)) (wikiword (nth 0 wikiword-start-end)) @@ -1868,8 +1872,9 @@ e.g. ." (defib hywiki-existing-word () "On a HyWikiWord with an existing referent, display the referent. -A call to (hywiki-active-in-current-buffer-p) must return non-nil -for this to activate. +This is the Action Key function that activates existing HyWikiWords. +Calls to (hywiki-active-in-current-buffer-p) and (not +(hywiki-non-hook-context-p)) must return non-nil for this to activate. See the implicit button type `hywiki-word' for creation of referents to not yet existing HyWikiWords." diff --git a/hsys-org.el b/hsys-org.el index f0693fc4..65581704 100644 --- a/hsys-org.el +++ b/hsys-org.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 2-Jul-16 at 14:54:14 -;; Last-Mod: 28-Sep-26 at 08:09:55 by Bob Weiner +;; Last-Mod: 5-Oct-26 at 22:23:15 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -490,12 +490,12 @@ omit any trailing colon and space in the prompt." (car src-block-info) (cdr (assq attribute (caddr src-block-info))))))) -(defun hsys-org-global-cycle () - "Call `org-global-cycle' and set as `this-command' to cycle through all states." - (setq this-command 'org-cycle) +(defun hsys-org-cycle-global () + "Call `org-cycle-global' and set as `this-command' to cycle through all states." + (setq this-command 'org-cycle-global) (save-excursion (org-back-to-heading) - (org-global-cycle nil))) + (org-cycle-global nil))) (defun hsys-org-todo-cycle () "Call `org-todo' and set as `this-command' to cycle through all states." diff --git a/hui-mouse.el b/hui-mouse.el index 4465ca0a..51bfa682 100644 --- a/hui-mouse.el +++ b/hui-mouse.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 04-Feb-89 -;; Last-Mod: 29-Sep-26 at 17:08:43 by Bob Weiner +;; Last-Mod: 6-Oct-26 at 00:08:26 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -171,6 +171,18 @@ Its default value is `smart-scroll-down'. To disable it, set it to :type 'function :group 'hyperbole-keys) +(defcustom smart-org-action-key-heading-function #'ignore + "Function run by the Action Key in `org-mode' when within a heading. +Set it to `smart-org-cycle' if you want the old `smart-org' behavior." + :type 'function + :group 'hyperbole-keys) + +(defcustom smart-org-assist-key-heading-function #'ignore + "Function run by the Assist Key in `org-mode' when within a heading. +Set it to `smart-org-cycle' if you want the old `smart-org-assist' behavior." + :type 'function + :group 'hyperbole-keys) + ;;; ************************************************************************ ;;; Public declarations ;;; ************************************************************************ @@ -1900,8 +1912,9 @@ either t or `:buttons': or #+end_example header, execute the code block via the Org mode standard binding of {\\`C-c' \\`C-c'}, (`org-ctrl-c-ctrl-c'). - 10. With point on an Org mode heading, cycle the view of the subtree at - point. + 10. With point on an Org mode heading but not a Hyperbole button, call the + function given by the `smart-org-action-key-heading-function' variable, + which defaults to doing nothing. 11. In any other context besides the end of a line, invoke the Org mode standard binding of {M-RET}, (`org-meta-return'). @@ -1929,8 +1942,8 @@ in these contexts: 6. With point on any #+BEGIN_SRC, #+END_SRC, #+RESULTS, #+begin_example or #+end_example header, remove source block results. - 7. Not on a Hyperbole button but on an Org mode heading, cycle - through views of the whole buffer outline. + 7. With point on an Org mode heading but not a Hyperbole button, call the + function given by the `smart-org-assist-key-heading-function' variable, To disable ALL Hyperbole support within Org major and minor modes, set the custom option `hsys-org-enable-smart-keys' to nil. Then in Org modes, this @@ -2001,9 +2014,11 @@ handled by the separate implicit button type, `org-link-outside-org-mode'." (t (message "No results to remove for this code block.")))))) t) ((hsys-org-heading-at-p) - (if (not assist-flag) - (hact 'hsys-org-cycle) - (hact 'hsys-org-global-cycle)) + (if assist-flag + (when (fboundp smart-org-assist-key-heading-function) + (funcall smart-org-assist-key-heading-function)) + (when (fboundp smart-org-action-key-heading-function) + (funcall smart-org-action-key-heading-function))) t) ((equal (hsys-org-get-value :language) "python") (setq hkey-value (smart-python-at-tag-p)) @@ -2048,8 +2063,8 @@ handled by the separate implicit button type, `org-link-outside-org-mode'." ;; Ignore any further Smart Key non-Org contexts (t))) (t - ;; hsys-org-enable-smart-keys is set to t, so try other Smart - ;; contexts + ;; hsys-org-enable-smart-keys is set to t, so try other + ;; Smart contexts nil))))) (defun smart-org-bob-and-non-heading-p () @@ -2061,6 +2076,12 @@ handled by the separate implicit button type, `org-link-outside-org-mode'." (member (hypb:buffer-file-name) (hpath:expand-list hsys-org-cycle-bob-file-list)))) +(defun smart-org-cycle () + "Cycle Org tree unless `assist-flag' is non-nil, then cycle whole outline." + (if assist-flag + (hact 'hsys-org-cycle-global) + (hact 'hsys-org-cycle))) + ;;; ************************************************************************ ;;; smart-outline functions ;;; ************************************************************************ diff --git a/hypb-maintenance.el b/hypb-maintenance.el index a4e6b563..d22be359 100644 --- a/hypb-maintenance.el +++ b/hypb-maintenance.el @@ -1,9 +1,9 @@ -;;; hypb-maintenance.el --- functions for maintenance tasks -*- lexical-binding: t; -*- +;;; hypb-maintenance.el --- Support for updating Hyperbole web pages -*- lexical-binding: t; -*- ;; ;; Author: Mats Lidell ;; ;; Orig-Date: 31-Mar-21 at 21:11:00 -;; Last-Mod: 12-Mar-24 at 22:36:34 by Bob Weiner +;; Last-Mod: 5-Oct-26 at 18:07:45 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; diff --git a/hyperbole.el b/hyperbole.el index 72bcb942..9b0190e1 100644 --- a/hyperbole.el +++ b/hyperbole.el @@ -8,7 +8,7 @@ ;; Maintainer: Robert Weiner ;; Mats Lidell ;; Created: 06-Oct-92 at 11:52:51 -;; Last-Mod: 27-Sep-26 at 02:24:35 by Bob Weiner +;; Last-Mod: 5-Oct-26 at 12:11:48 by Bob Weiner ;; Released: 27-Jul-26 ;; Version: 9.2.0 ;; Keywords: comm, convenience, files, frames, hypermedia, languages, mail, matching, mouse, multimedia, outlines, tools, wp @@ -580,9 +580,10 @@ frame, those functions by default still return the prior frame." #'hattr:save)) ;; This next expression initializes the Hyperbole keymap but does not -;; activate Hyperbole, (hyperbole-mode 1) does that. The only user-visible -;; change it should make is to globally bind {C-h h} to 'hyperbole' which -;; when invoked will both activate Hyperbole and show its minibuffer menu. +;; activate Hyperbole, (hyperbole-mode 1) does that. The only +;; user-visible change it should make is to globally bind {C-h h} to +;; 'hyperbole' which when invoked will both activate Hyperbole and show +;; its minibuffer menu. (if after-init-time ;; Initialize Hyperbole key bindings and hooks. (hyperb:init) diff --git a/hyrolo.el b/hyrolo.el index 5a0497b7..3e78c580 100644 --- a/hyrolo.el +++ b/hyrolo.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 7-Jun-89 at 22:08:29 -;; Last-Mod: 3-Oct-26 at 12:00:28 by Bob Weiner +;; Last-Mod: 4-Oct-26 at 18:24:04 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -1707,15 +1707,17 @@ string. With optional EXCLUDE-SUB-ENTRIES non-nil, exclude all sub-entry records below the yanked one (default when called interactively)." - (interactive (list - (hsys-consult-grep-headlines-read-regexp - #'hyrolo-consult-grep "Yank rolo headline matching") - ;; Enable `regexp-flag' if any prefix arg other the - ;; universal argument - (and current-prefix-arg (not (equal '(4) current-prefix-arg))) - ;; Exclude-sub-entries if no prefix arg or any prefix arg - ;; other than the universal argument - (or (null current-prefix-arg) (not (equal '(4) current-prefix-arg))))) + (interactive + ;; Exclude-sub-entries if no prefix arg or any prefix arg + ;; other than the universal argument + (let ((exclude-sub-entries (or (null current-prefix-arg) (not (equal '(4) current-prefix-arg))))) + (list (hsys-consult-grep-headlines-read-regexp + #'hyrolo-consult-grep + (format "Yank HyRolo %s matching regexp" + (if exclude-sub-entries "entry" "tree"))) + ;; Enable `regexp-flag' if any prefix arg other the universal argument + (and current-prefix-arg (not (equal '(4) current-prefix-arg))) + exclude-sub-entries))) (push-mark) (let ((entry (hyrolo-get-entry name regexp-flag exclude-sub-entries))) (when entry diff --git a/hywiki.el b/hywiki.el index b089cda0..29074410 100644 --- a/hywiki.el +++ b/hywiki.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 21-Apr-24 at 22:41:13 -;; Last-Mod: 30-Sep-26 at 12:03:56 by Bob Weiner +;; Last-Mod: 5-Oct-26 at 18:35:00 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -534,6 +534,10 @@ Nil by default." (defvar hywiki-file-extension ".org" "File suffix string (including period) to use when creating HyWiki pages.") +(defvar hywiki-word-create-exclude-action-key-modes '(org-mode) + "Suppress WikiWord creation from Action Key presses in this major mode list. +Typically used in any modes where the Action Key shows/hides sections.") + (defconst hywiki-word-regexp (format "\\<\\([[:upper:]][[:alpha:]]+\\)\\>\\(?:%s\\)?" (regexp-quote hywiki-file-extension)) @@ -940,21 +944,21 @@ valid values." ;;;###autoload (define-minor-mode hywiki-mode "Toggle HyWiki global minor mode with \\[hywiki-mode]. -HyWiki minor mode automatically highlights and turns HyWikiWord references -into Hyperbole implicit buttons that either link to HyWiki pages or activate -typed referents such as bookmarks. +HyWiki minor mode automatically highlights and turns HyWikiWord +references into Hyperbole implicit buttons that either link to HyWiki +pages or activate typed referents such as bookmarks. -HyWiki minor mode has three states as tracked by the `hywiki-mode' variable, -with the default state when interactively enabled set by the value of -`hywiki-default-mode': +HyWiki minor mode has three states as tracked by the `hywiki-mode' +variable, with the default state when interactively enabled set by the +value of `hywiki-default-mode': - :all - highlight HyWikiWords in all editable buffers except those with a major mode in `hypb:exclude-major-modes'; also enable `hyperbole-mode' minor mode if off. - :pages - highlight HyWikiWords in HyWiki pages only (Org files in - `hywiki-directory'); also enable `hyperbole-mode' minor mode - if off. (default) + `hywiki-directory'); also enable `hyperbole-mode' minor + mode if off. (default) - nil - no highlighting, the `hywiki-mode' is disabled. @@ -964,10 +968,10 @@ HyWikiWord references may also include optional suffixes: other outline file. Spaces in the headline must be converted to dash characters for proper recognition; - - optionally followed by :L:C - where the column part is also optional. If a section is - given, the line number is relative to the section and the - section headline is line 1. + - optionally followed by :L:C where the + column part is also optional. If a section is given, the line + number is relative to the section and the section headline is line + 1. See the Info documentation at \"(hyperbole)HyWiki\". @@ -984,24 +988,27 @@ See the Info documentation at \"(hyperbole)HyWiki\". (pcase arg (:all (progn ;; Enable across all editable buffers - ;; Need hyperbole-mode + ;; Need `hyperbole-mode' (unless hyperbole-mode (hyperbole-mode 1)) (hywiki-word-set-auto-highlighting hywiki--prior-mode arg) (setq hywiki-mode arg))) ('nil (progn - ;; Disable across all editable buffers. - ;; Dehighlight HyWikiWords in this buffer when 'hywiki-mode' is - ;; disabled and this is not a HyWiki page buffer. If this is a - ;; HyWiki page buffer, then dehighlight when `hywiki-mode' is nil. + ;; Disable across all editable buffers. + + ;; Dehighlight HyWikiWords in this buffer when + ;; 'hywiki-mode' is disabled and this is not a HyWiki page + ;; buffer. If this is a HyWiki page buffer, then + ;; dehighlight when `hywiki-mode' is nil. (hywiki-word-set-auto-highlighting hywiki--prior-mode arg) (setq hywiki-mode arg))) (:pages (progn ;; Enable in HyWiki page buffers only - ;; Need hyperbole-mode + ;; Need `hyperbole-mode' (unless hyperbole-mode (hyperbole-mode 1)) - (hywiki-word-set-auto-highlighting hywiki--prior-mode arg) + (hywiki-word-set-auto-highlighting + hywiki--prior-mode arg) (setq hywiki-mode arg)))))) (defun hywiki-mode-around-advice (hywiki-mode-fn &optional to-mode) @@ -4321,6 +4328,14 @@ For example, BASEBall would become, base-ball but BASE would become base." (string-trim (downcase str) "[ \t\n\r]+" (format "[%s \t\n\r]+" separator)))) +;;;###autoload +(defun hywiki-word-action-key-creation-allowed-p () + "Return non-nil iff current major mode allows Action Key WikiWord creation. +The variable, `hywiki-word-create-exclude-action-key-modes', is a list of +modes where Action Key WikiWord creation is disabled, typically in outlining +modes where the Action Key shows/hides nodes." + (not (apply #'derived-mode-p hywiki-word-create-exclude-action-key-modes))) + (defun hywiki-word-activate (&optional arg) "Display HyWiki referent for wikiword at point. If referent is a non-existent HyWiki page, create it. When this diff --git a/kotl/EXAMPLE.kotl b/kotl/EXAMPLE.kotl index 54391c36..37a4f06a 100644 --- a/kotl/EXAMPLE.kotl +++ b/kotl/EXAMPLE.kotl @@ -259,9 +259,18 @@ toggle display of blank lines between cells as well, e.g. {C-u C-c C-o}. Try it now. - 3b14b. A click or press of the Action Key within a cell's body, but - not on a button, toggles between hiding and showing the tree - rooted at point. + 3b14b. If you have enabled `hywiki-mode' with a setting of ':all' + buffers, then a click or a press of the Action Key on a + potential HyWikiWord creates and opens a blank wiki page for + the word. If it already exists, then the existing page is + opened. + + 3b14c. A click or press of the Action Key anywhere else within a + cell's body, but not on a button, calls the value of the + `kotl-mode:action-key-default-function' variable, which + defaults to doing nothing, to avoid confusion with HyWikiWord + activation. Set it to ‘kotl-mode:show-or-hide-tree’ if you + want the old Koutliner behavior. 3b15. Cell Identifiers: Permanent ids are associated with each cell and can be used in hyperlinks that are maintained as cells are @@ -489,7 +498,7 @@  "ben" ;; kvspec:current -78 ;; id-counter +79 ;; id-counter alpha ;; label-type 4 ;; label-min-width ". " ;; label-separator @@ -497,7 +506,7 @@ alpha ;; label-type  ;; depth-first kcell attributes [[0 - (creator "rsw@gnu.org" create-time "20231105:21:29:07" id-counter 78)] + (creator "rsw@gnu.org" create-time "20231105:21:29:07" id-counter 79)] [2 (creator "rsw@gnu.org" create-time "20231105:21:29:07")] [3 @@ -558,6 +567,8 @@ alpha ;; label-type (creator "rsw@gnu.org" create-time "20231105:21:29:07")] [24 (creator "rsw@gnu.org" create-time "20231105:21:29:07")] + [79 + (creator "rsw@gnu.org" create-time "20261006:04:24:06")] [25 (creator "rsw@gnu.org" create-time "20231105:21:29:07")] [26 diff --git a/kotl/kcell.el b/kotl/kcell.el index 0e9c67b8..9ff318f1 100644 --- a/kotl/kcell.el +++ b/kotl/kcell.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 1-May-93 -;; Last-Mod: 31-Jul-25 at 20:35:20 by Mats Lidell +;; Last-Mod: 5-Oct-26 at 15:40:43 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -198,7 +198,7 @@ Augment capabilities not yet implemented and ignored for now: (concat idstamp-string kviewspec) (string-to-number idstamp-string)) kviewspec))))) - + (defun kcell:remove-attr (kcell attribute) "Remove KCELL's ATTRIBUTE, if any, and return modified KCELL." (let ((tail kcell) @@ -237,12 +237,14 @@ Augment capabilities not yet implemented and ignored for now: "Given a kotl CELL and IDSTAMP (an integer), return a kcell-data structure. If CELL, its idstamp, or its property list are nil, this repairs the cell by assuming it is the cell at point and filling in the missing information." - (let ((plist (kcell:plist cell))) - (if (and cell idstamp plist) - (vector idstamp plist) - (kcell-data:create - (kcell:create plist) - (or idstamp (kview:id-increment kotl-kview)))))) + (if (kview:is-p kotl-kview) + (let ((plist (kcell:plist cell))) + (if (and cell idstamp plist) + (vector idstamp plist) + (kcell-data:create + (kcell:create plist) + (or idstamp (kview:id-increment kotl-kview))))) + (error "(kcell-data:create): Invalid `kotl-kview': %S" kotl-kview))) (defun kcell-data:idstamp (kcell-data) (aref kcell-data 0)) diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el index 107a59bd..5a327a35 100644 --- a/kotl/kotl-mode.el +++ b/kotl/kotl-mode.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 6/30/93 -;; Last-Mod: 1-Oct-26 at 18:31:22 by Bob Weiner +;; Last-Mod: 5-Oct-26 at 23:36:48 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -41,6 +41,17 @@ ;;; Public variables ;;; ************************************************************************ +(defcustom kotl-mode:action-key-default-function #'ignore + "Function run by the Action Key in `kotl-mode' when no other context matches. +Set it to `kotl-mode:show-or-hide-tree' if you want the old Koutliner behavior." + :type 'function + :group 'hyperbole-koutliner) + +(defcustom kotl-mode:assist-key-default-function #'ignore + "Function run by the Assist Key in `kotl-mode' when no other context matches. +Set it to `smart-scroll-down' if you want the old Koutliner behavior." + :type 'function + :group 'hyperbole-koutliner) ;; Derived from `org-cycle-emulate-tab' (defcustom kotl-mode:emulate-tab nil @@ -53,12 +64,12 @@ t - Everywhere except in headlines exc-hl-bol - Everywhere except at the start of a headline If is used in a place where it does not emulate global , the value of `kotl-mode:tab-flag' determines what it does." - :group 'hyperbole-koutliner :type '(choice (const :tag "Never" nil) (const :tag "Only in completely white lines" white) (const :tag "Before first char in a line" whitestart) (const :tag "Everywhere except in headlines" t) - (const :tag "Everywhere except at bol in headlines" exc-hl-bol))) + (const :tag "Everywhere except at bol in headlines" exc-hl-bol)) + :group 'hyperbole-koutliner) (defcustom kotl-mode:indent-tabs-mode t "Non-nil means {\\[kotl-mode:tab-command]} may insert literal tab characters. @@ -2660,46 +2671,47 @@ With optional NEXT-CHAR-VISIBLE, return t only if the following char is visible. ;;; ------------------------------------------------------------------------ (defun kotl-mode:action-key () - "Collapses, expands, links to, and scrolls through koutline cells. -Invoked via a key press when in kotl-mode. It assumes that its caller has -already checked that the key was pressed in an appropriate buffer and has -moved the cursor to the selected buffer. + "Collapse, expand, link to, or scroll through koutline cells. +Invoke via a key press when in kotl-mode. Assume that caller has +checked that the key was pressed in an appropriate buffer and has moved +the cursor to the selected buffer. If key is pressed: (1) at the end of buffer, uncollapse and unhide all cells in view; (2) at the end of a visible line, call the `action-key-eol-function'; - (3) between cells or within the read-only indentation region to the left of - a cell, then move point to prior location and begin creation of a - klink to some other outline cell; press the Action Key twice to select the - link referent cell; + (3) between cells or within the read-only indentation region to the + left of a cell, then move point to prior location and begin + creation of a klink to some other outline cell; press the Action + Key twice to select the link referent cell; (4) on a | character within an Org-style table, toggle Org Table minor mode; (5) in an Org-style table, wrap the table cell or region; - (6) within a cell, if its subtree is hidden then show it, otherwise hide it." + (6) within a kcell, call the value of `kotl-mode:action-key-default-function', + which defaults to doing nothing." (interactive) - (cond ((kotl-mode:eobp) (kotl-mode:show-all)) - ((kotl-mode:eolp t) (funcall action-key-eol-function)) - ((not (kview:valid-position-p)) - (if (markerp action-key-depress-prev-point) - (progn (select-window - (get-buffer-window - (marker-buffer action-key-depress-prev-point))) - (goto-char (marker-position action-key-depress-prev-point)) - (call-interactively 'klink:create)) - (kotl-mode:to-valid-position) - (error "(kotl-mode:action-key): Action Key released at invalid position"))) - ((and (/= (point) (point-max)) (= (following-char) ?|) - (or (org-at-table-p t) (looking-at "[| \t]+$"))) - ;; On a | separator in a table, toggle Org table minor mode - (orgtbl-mode 'toggle) - (message "Org table minor mode %s" (if orgtbl-mode "enabled" "disabled"))) - ((org-at-table-p t) - ;; Wrap the table cell or region - (org-table-wrap-region current-prefix-arg)) - (t ;; On a cell line (not at the end of line). - (if (kotl-mode:tree-collapsed-p) - (kotl-mode:show-tree) - (kotl-mode:hide-tree)))) - (kotl-mode:to-valid-position)) + (unwind-protect + (cond ((kotl-mode:eobp) (kotl-mode:show-all)) + ((kotl-mode:eolp t) (funcall action-key-eol-function)) + ((not (kview:valid-position-p)) + (if (markerp action-key-depress-prev-point) + (progn (select-window + (get-buffer-window + (marker-buffer action-key-depress-prev-point))) + (goto-char (marker-position action-key-depress-prev-point)) + (call-interactively 'klink:create)) + (kotl-mode:to-valid-position) + (error "(kotl-mode:action-key): Action Key released at invalid position"))) + ((and (/= (point) (point-max)) (= (following-char) ?|) + (or (org-at-table-p t) (looking-at "[| \t]+$"))) + ;; On a | separator in a table, toggle Org table minor mode + (orgtbl-mode 'toggle) + (message "Org table minor mode %s" (if orgtbl-mode "enabled" "disabled"))) + ((org-at-table-p t) + ;; Wrap the table cell or region + (org-table-wrap-region current-prefix-arg)) + (t ;; Within a cell line (not at the end of line). + (when (fboundp kotl-mode:action-key-default-function) + (funcall kotl-mode:action-key-default-function)))) + (kotl-mode:to-valid-position))) (defun kotl-mode:assist-key () "Displays properties of koutline cells, collapses all cells, and scrolls back. @@ -2717,27 +2729,30 @@ If assist-key is pressed: a cell, then move point to prior location and prompt to move one tree to a new location in the outline; press the Action Key twice to select the tree to move and where to move it; - (5) anywhere else, invoke `smart-scroll-down', typically to scroll down a - windowful." + (5) anywhere else within a kcell, call the value of + `kotl-mode:assist-key-default-function', which defaults to doing nothing." (interactive) - (cond ((kotl-mode:eobp) (kotl-mode:overview)) - ((kotl-mode:eolp t) (funcall assist-key-eol-function)) - ((not (kview:valid-position-p)) - (if (markerp assist-key-depress-prev-point) - (progn (select-window - (get-buffer-window - (marker-buffer assist-key-depress-prev-point))) - (goto-char (marker-position - assist-key-depress-prev-point)) - (call-interactively 'kotl-mode:move-after)) - (kotl-mode:to-valid-position) - (error "(kotl-mode:assist-key): Help Key released at invalid position"))) - ((not (bolp)) - ;; On an outline header line but not at the start/end of line, - ;; show attributes for tree at point. - (kotl-mode:cell-help (kcell-view:label) (or current-prefix-arg 2))) - ((smart-scroll-down))) - (kotl-mode:to-valid-position)) + (unwind-protect + (cond ((kotl-mode:eobp) (kotl-mode:overview)) + ((kotl-mode:eolp t) (funcall assist-key-eol-function)) + ((not (kview:valid-position-p)) + (if (markerp assist-key-depress-prev-point) + (progn (select-window + (get-buffer-window + (marker-buffer assist-key-depress-prev-point))) + (goto-char (marker-position + assist-key-depress-prev-point)) + (call-interactively 'kotl-mode:move-after)) + (kotl-mode:to-valid-position) + (error "(kotl-mode:assist-key): Help Key released at invalid position"))) + ((not (bolp)) + ;; On an outline header line but not at the start/end of line, + ;; show attributes for tree at point. + (kotl-mode:cell-help (kcell-view:label) (or current-prefix-arg 2))) + (t ;; Within a cell line (not at the end of line). + (when (fboundp kotl-mode:assist-key-default-function) + (funcall kotl-mode:assist-key-default-function)))) + (kotl-mode:to-valid-position))) ;;; ------------------------------------------------------------------------ ;;; Structure Editing @@ -3869,6 +3884,13 @@ With optional SHOW-FLAG, expand the tree instead." (setq start (1- (point)))) (outline-flag-region start end (not show-flag))))) +;;;###autoload +(defun kotl-mode:show-or-hide-tree () + "Show all of the tree at point when collapsed, else collapse it to one line." + (if (kotl-mode:tree-collapsed-p) + (kotl-mode:show-tree) + (kotl-mode:hide-tree))) + ;;;###autoload (defun kotl-mode:show-tree (&optional cell-ref) "Display fully expanded tree rooted at CELL-REF." diff --git a/man/hyperbole.info b/man/hyperbole.info index 760c0eeaed49fef31388845d56e12a78f3288903..e3b7653ef702ab7f1ca2238acffc39fea4848759 100644 GIT binary patch delta 9544 zcmb_ieRLG%xj(bn*_nBhkWdm5LP9113;`B)c4lXHA}WaTDJp8^^cE$XWRk2TyUXr| z5cRtFaVl895gvOF+7DZ`YEeWP@e5EyYVqq9>qq@Ut6ptY?D4ie_Nw>y&ddhtJ?-ru zyM_vCI#W=S z>Y|aXo$JaB*j!e~q-Qd9^j~*!V1TOkigl?%zkQ6nEkBsd6~dWZUpU!aNM+LD)%HlZ z-%j?V(tY9Hp|mS(Q`aVQsbtrHJyRX-Pj&YnvqF#En;aS_U_YMr^v>@^kOpI<7u=_95v;GBsZPgKjC#fm!;Ov(=jI_Hc>?`>W1xRkch1I+`M>My zsBvv22l*Pu=8C%lPa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Nv~-Z29pR@lU)x?i&q=)BgcSKI{unu!slEHD<@8Q+9?toobgkMb#&g=<|; zdTvy#j`P?!Oi;@!te%cH1r!WDpXb}nF)0Qf2g#RTK_M!yh%t`yB; zX!?W=iPjNuyrXyn`|f>%MQB%o3o;ZPg5Y;O|9b%fjGkjFp8sculejqYmX5z2MWj*c z4n_tHYl#4gUbyP%J6FVp@HNNM0>>(^usVE1;A;e4)zjDBiH?LKoFfB8bFYhWgH#lh zZ_vQ2*nsvEgkk3mF~G(^`D#HT=D&*C#W6dG!Kzo;$cTkcF+U_f=;T2%FmTX(ygaKGu}hm@gOxYE1{D}DLAoAa6&uQT=!WLoxZ(S4 zB0cjO8xq1)TmK56^A122!C5lUIr}azd}zPb1ozz)8ybNOo7TV1MpK1iwOpkGKzb^7 zJTLNq>%dXq$LN zZ=#3sq|wE1vic?H9MyI%2gj@qOeVubv#EA*^cZwRNa*Bo@2 Y>gdENt0SE+1xxs-b`bw(-(>dx07Y5^uK)l5 diff --git a/man/hyperbole.texi b/man/hyperbole.texi index 2c665d02..6a88b341 100644 --- a/man/hyperbole.texi +++ b/man/hyperbole.texi @@ -7,7 +7,7 @@ @c Author: Bob Weiner @c @c Orig-Date: 6-Nov-91 at 11:18:03 -@c Last-Mod: 3-Oct-26 at 12:17:59 by Bob Weiner +@c Last-Mod: 6-Oct-26 at 00:08:28 by Bob Weiner @c %**start of header (This is for running Texinfo on a region.) @setfilename hyperbole.info @@ -30,7 +30,7 @@ @set txicodequoteundirected @set txicodequotebacktick -@set UPDATED October 3, 2026 +@set UPDATED October 6, 2026 @set UPDATED-MONTH October 2026 @set EDITION 9.2.0 @set VERSION 9.2.0 @@ -171,7 +171,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 Edition 9.1.0
-Printed October 3, 2026.
+Printed October 6, 2026.
 
   Published by the Free Software Foundation, Inc.
   Author:    Bob Weiner
@@ -213,7 +213,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 @example
 Edition 9.1.0
-October 3, 2026 @c AUTO-REPLACE-ON-SAVE
+October 6, 2026 @c AUTO-REPLACE-ON-SAVE
 
 
   Published by the Free Software Foundation, Inc.
@@ -2430,8 +2430,8 @@ priority).
 @cindex Action Key, Org Mode
 @cindex Assist Key, Org Mode
 @item smart-org
-@code{smart-org} is not an actual implicit button type, just an Elisp function,
-but it behaves similarly, so it is documented here.
+@code{smart-org} is not an actual implicit button type, just an Elisp
+function, but it behaves similarly, so it is documented here.
 
 Hyperbole recognizes Org mode constructs in any of these modes:
 @code{org-mode}, @code{org-agenda-mode}, @code{outshine-mode}
@@ -2486,8 +2486,9 @@ or #+end_example header, execute the code block via the Org mode
 standard binding of @bkbd{C-c C-c}, @code{org-ctrl-c-ctrl-c}.
 
 @item
-With point on an Org mode heading, cycle the view of the subtree at
-point.
+With point on an Org mode heading but not a Hyperbole button, call the
+function given by the @code{smart-org-action-key-heading-function}
+variable, which defaults to doing nothing.
 
 @item
 In any other context besides the end of a line, invoke the Org mode
@@ -2529,8 +2530,9 @@ With point on any #+BEGIN_SRC, #+END_SRC, #+RESULTS, #+begin_example
 or #+end_example header, remove any associated results.
 
 @item
-Not on a Hyperbole button but on an Org mode heading, cycle
-through views of the whole buffer outline.
+With point on an Org mode heading but not a Hyperbole button, call the
+function given by the @code{smart-org-assist-key-heading-function}
+variable, which defaults to doing nothing.
 @end enumerate
 
 @vindex hsys-org-enable-smart-keys
@@ -2621,8 +2623,13 @@ minibuffer or the other window.
 @cindex hywiki existing word
 @anchor{hywiki-existing-word}
 @item hywiki-existing-word
-When on a HyWikiWord with an existing page, display its page and
-optional section.
+When on a HyWikiWord with an existing referent, display the referent.
+This is the Action Key function that activates existing HyWikiWords.
+Calls to @code{(hywiki-active-in-current-buffer-p)} and @code{(not
+(hywiki-non-hook-context-p))} must return non-nil for this to activate.
+
+Potential, not-yet-existing HyWikiWords are handled by the implicit
+button type, @pxref{hywiki-word}.
 
 @findex ibtypes ilink
 @cindex implicit button link
@@ -3212,8 +3219,21 @@ source reference line again.
 @cindex hywiki word
 @anchor{hywiki-word}
 @item hywiki-word
-When on a HyWikiWord, display its page and optional section.  If the
-associated HyWiki page does not exist, create it automatically.
+When on a non-existing HyWikiWord, create it and display its referent.
+This is the Action Key function that creates HyWikiWords.  Calls to
+@code{(hywiki-word-action-key-creation-allowed-p)},
+@code{(hywiki-active-in-current-buffer-p)} and
+@code{(not (hywiki-non-hook-context-p))} must return non-nil for this to
+activate.  If the associated HyWiki page does not exist, create it
+automatically.
+
+If the associated HyWiki referent is a page, create it automatically
+unless it is the first HyWiki page to be created, in which case,
+prompt the user whether to create it, to prevent any unexpected HyWiki
+use.
+
+Existing HyWikiWords are handled by the implicit button type,
+@pxref{hywiki-existing-word}.
 
 @findex ibtypes hynote-file
 @findex hywiki-active-in-current-buffer-p
@@ -4703,10 +4723,11 @@ editing.
 @cindex HyWiki Action Key
 @cindex Action Key, HyWiki
 The Action Key, @bkbd{M-@key{RET}}, provides a faster way to create
-HyWikiWords to speed your note-taking, if you let HyWiki have priority
-over this key rather than having Org mode split lines and create new
-headlines when on a HyWikiWord.  Simply have Hyperbole override Org's
-control of that key in all Action and Assist Key contexts with the
+HyWikiWords to speed your note-taking in many text and programming
+modes, if you let HyWiki have priority over this key rather than
+having Org mode split lines and create new headlines when on a
+HyWikiWord.  Simply have Hyperbole override Org's control of that key
+in all Action and Assist Key contexts with the
 @samp{All-Hyperbole-Contexts} setting bound to @bkbd{C-h h h o a}.
 This sets the persistent customization option,
 @code{hsys-org-enable-smart-keys} to @samp{t} across all your Emacs
@@ -4816,20 +4837,12 @@ that they trigger only when other types are not recognized first.
 
 @table @code
 @item hywiki-existing-word
-On a HyWikiWord with an existing referent, display the referent.  A
-call to @code{(hywiki-active-in-current-buffer-p)} must return
-non-@samp{nil} for this to activate.
+On a HyWikiWord with an existing referent, display the referent.
+@xref{hywiki-existing-word}.
 
 @item hywiki-word
-When on a non-existing HyWikiWord, create it and display its referent.
-This is the Action Key function that activates HyWikiWords.  A call to
-@code{(hywiki-active-in-current-buffer-p)} must return non-@samp{nil}
-for this to activate.
-
-If the associated HyWiki referent is a page, create it automatically
-unless it is the first HyWiki page to be created, in which case,
-prompt the user whether to create it, to prevent any unexpected HyWiki
-use.
+On a non-existing HyWikiWord, create it and display its referent.
+@xref{hywiki-word}.
 @end table
 
 @node HyWiki Mode, Publishing a HyWiki, HyWikiWords, HyWiki
@@ -6814,10 +6827,21 @@ between cells.
 @cindex cell, collapse
 @cindex cell, expand
 @kindex koutliner, M-@key{RET}
+@vindex kotl-mode:action-key-default-function
 A click or a press of the Action Key within a cell's body, but not on a
-Hyperbole button, toggles between hiding and showing the tree rooted at
-point.  Try it with either your mouse or with @bkbd{M-@key{RET}}.
-
+Hyperbole button, runs the function stored in the variable, 
+@code{kotl-mode:action-key-default-function}, which by default does nothing.
+
+@cindex koutliner, hide/show tree
+In prior Koutliner versions, this would toggle between showing and
+hiding the tree at point; however,now you can use the Org-style tree
+visibility cycling on @bkbd{@key{TAB}} instead.  If you prefer the
+prior behavior, uncomment the setting for that variable near the
+bottom of the Hyperbole @file{man/use-package} reference file when you
+add it to your persnal init file.  Note, however, that if
+@code{hywiki-mode} is set to @samp{:all} then when point is on a
+capitalized word in a Koutline, an Action Key press will create a new
+HyWiki page, as that has higher priority than this setting.
 
 @node View Specs,  , Hiding and Showing, Viewing Outlines
 @subsection  View Specs
@@ -11224,62 +11248,76 @@ When company-mode is active:
 @subsection Smart Key - Org Mode
 
 @vindex hsys-org-enable-smart-keys
+@findex hsys-org-agenda-tags-p
 @cindex Org mode
 @format
 @group
 When in an Org mode context and @code{hsys-org-enable-smart-keys} is non-nil:
   ACTION KEY
-     (1) If on an Org todo keyword, cycle through the keywords in
+     (1) If on an Org tag, call @code{hsys-org-agenda-tags-p} and an
+         appropriate view tags function based on current directory or
+         buffer name, matching to the tag.  If on a colon between
+         tags, match to all tags on the line.
+
+     (2) If on an Org todo keyword, cycle through the keywords in
          that set or if final done keyword, remove it.
 
-     (2) If on an Org agenda view item, jump to the item for editing.
+     (3) If on an Org agenda view item, jump to the item for editing.
 
-     (3) Within a radio or internal target or a link to it, jump between
+     (4) Within a radio or internal target or a link to it, jump between
          the target and the first link to it, allowing two-way navigation.
 
-     (4) Follow other internal links and ID references in Org mode files.
+     (5) Follow other internal links and ID references in Org mode files.
 
-     (5) Follow Org mode external links.
+     (6) Follow Org mode external links.
 
-     (6) When on a Hyperbole button, activate the button.
+     (7) When on a Hyperbole button, activate the button.
 
-     (7) With point on the :dir path of a code block definition, display the
+     (8) With point on the :dir path of a code block definition, display the
          directory given by the path.
 
-     (8) With point on any #+BEGIN_SRC, #+END_SRC, #+RESULTS, #+begin_example
+     (9) With point on any #+BEGIN_SRC, #+END_SRC, #+RESULTS, #+begin_example
          or #+end_example header, execute the code block via the Org mode
          standard binding of @bkbd{C-c C-c}, @code{org-ctrl-c-ctrl-c}.
 
-     (9) When point is on an Org mode heading, cycle the view of the subtree
-         at point.
+     (10) With point on an Org mode heading but not a Hyperbole button, call
+         the function given by the @code{smart-org-action-key-heading-function}
+         variable, which defaults to doing nothing.
 
-     (10) In any other context besides the end of a line, invoke the Org mode
+     (11) In any other context besides the end of a line, invoke the Org mode
           standard binding of @bkbd{M-@key{RET}}, @code{org-meta-return}.
 @end group
 @end format
 
+@findex hsys-consult-org-grep-tags-p
 @format
 @group
    When the ASSIST KEY is pressed, it behaves just like the Action Key except
    in these contexts:
 
-     (1) If on an Org todo keyword, move to the first todo keyword in
+     (1) If on an Org tag, call @code{hsys-consult-org-grep-tags-p} and an
+         appropriate consult grep function based on current directory
+         or buffer name, prompting with and matching to the tag.  If on a
+         colon between tags, prompt and match to all tags on the line.
+
+     (2) If on an Org todo keyword, move to the first todo keyword in
          the next set, if any.
 
-     (2) If on an Org mode link, ID reference or agenda view item, display
-         Hyperbole context-sensitive help.
+     (3) If on an Org mode link or agenda view item, display Hyperbole
+         context-sensitive help.
 
-     (3) On a Hyperbole button, perform the Assist Key function, generally
+     (4) On a Hyperbole button, perform the Assist Key function, generally
          showing help for the button.
 
-     (4) With point on the :dir value of a code block definition, display
+     (5) With point on the :dir value of a code block definition, display
          a help summary of this implicit directory button.
 
-     (5) With point on any #+BEGIN_SRC, #+END_SRC, #+RESULTS, #+begin_example
+     (6) With point on any #+BEGIN_SRC, #+END_SRC, #+RESULTS, #+begin_example
          or #+end_example header, remove source block results.
 
-     (6) Not on a Hyperbole button but on an Org mode heading, cycle
-         through views of the whole buffer outline.
+     (7) With point on an Org mode heading but not a Hyperbole button, call
+         the function given by the @code{smart-org-assist-key-heading-function}
+         variable, which defaults to doing nothing.
 @end group
 @end format
 
@@ -11728,6 +11766,7 @@ When pressed within an occur-mode, moccur-mode or amoccur-mode buffer:
 
 @node Smart Key - The Koutliner, Smart Key - Flymake Mode, Smart Key - Occurrence Matches, Smart Keyboard Keys
 @subsection Smart Key - The Koutliner
+@vindex kotl-mode:action-key-default-function
 @format
 @group
 When pressed within a Hyperbole Koutliner buffer (kotl-mode):
@@ -11742,10 +11781,11 @@ When pressed within a Hyperbole Koutliner buffer (kotl-mode):
      (4) on a | character within an Org-style table, toggle Org Table minor
          mode;
      (5) in an Org-style table, wrap the table cell or region;
-     (6) within a cell, if its subtree is hidden then shows it,
-         otherwise hides it.
+     (6) within a cell, call the value of @code{kotl-mode:action-key-default-function},
+         which defaults to doing nothing.
 @end group
 @end format
+@vindex kotl-mode:assist-key-default-function
 @format
 @group
   ASSIST KEY
@@ -11759,6 +11799,8 @@ When pressed within a Hyperbole Koutliner buffer (kotl-mode):
          left of a cell, prompts to move one tree to a new location in
          the outline; press the Action Key twice to select the tree to
          move and where to move it.
+     (5) anywhere else within a kcell, call the value of
+         @code{kotl-mode:assist-key-default-function}, which defaults to doing nothing.
 @end group
 @end format
 
diff --git a/man/use-package b/man/use-package
index 9dadb164..a1905242 100644
--- a/man/use-package
+++ b/man/use-package
@@ -1,5 +1,11 @@
 ;;; use-package --- Hyperbole use-package reference configuration   -*- mode: emacs-lisp; lexical-binding: t; -*-
 
+;; NOTE: If you use Emacs 28 or earlier, you'll need to install the
+;; `use-package' Emacs package before using this configuration file
+;; since it is not built-in to your Emacs.
+
+;; -----------------------------------------------------------------
+
 ;; Default values herein represent the settings Hyperbole will default
 ;; to if not set within this `use-package' configuration.
 (use-package hyperbole
@@ -93,4 +99,17 @@
   ;;   t   - may insert literal  characters. (default)
   ;;
   ;;   nil - may insert  characters only.
-  (kotl-mode:indent-tabs-mode t))
+  (kotl-mode:indent-tabs-mode t)
+
+  ;; Prior to the addition of Org-style visibility cycling to the
+  ;; Koutliner on the TAB key, a press of the Action Key on a Koutline
+  ;; cell line used to toggle showing/hiding the tree rooted at point.
+  ;; Today, this does nothing.
+  ;;
+  ;; Uncomment the next expression if you prefer the prior behavior
+  ;; but note that if `hywiki-mode' is set to `:all' when point is on
+  ;; a capitalized word, an Action Key press will create a new HyWiki
+  ;; page, as that has higher priority than this setting.
+  ;;
+  ;; (kotl-mode:action-key-default-function 'kotl-mode:show-or-hide-tree)
+  )
diff --git a/test/kotl-mode-tests.el b/test/kotl-mode-tests.el
index a00086d2..4389d719 100644
--- a/test/kotl-mode-tests.el
+++ b/test/kotl-mode-tests.el
@@ -3,7 +3,7 @@
 ;; Author:       Mats Lidell 
 ;;
 ;; Orig-Date:    18-May-21 at 22:14:10
-;; Last-Mod:     29-Sep-26 at 02:56:59 by Bob Weiner
+;; Last-Mod:      6-Oct-26 at 00:37:17 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -681,7 +681,8 @@
 
 (ert-deftest kotl-mode-hide-cell ()
   "Verify cell is hidden and unhidden on `action-key' press."
-  (let ((kotl-file (make-temp-file "hypb" nil ".kotl")))
+  (let ((kotl-file (make-temp-file "hypb" nil ".kotl"))
+        (kotl-mode:action-key-default-function 'kotl-mode:show-or-hide-tree))
     (unwind-protect
         (progn
           (find-file kotl-file)

From 9d23bac2fdf45ef287a1dd34db45172bd4a808b9 Mon Sep 17 00:00:00 2001
From: bw 
Date: Tue, 6 Oct 2026 01:17:04 -0400
Subject: [PATCH 2/2] Fix two tests by binding needed smart-org Action Key
 variable

Two tests: demo-org-hide-header-test and
smart-org-mode-on-header-cycles-visibility.
---
 ChangeLog               | 6 ++++++
 test/demo-tests.el      | 5 +++--
 test/smart-org-tests.el | 5 +++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0a81c6e8..13311ac8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-10-06  Bob Weiner  
+
+* test/demo-tests.el (demo-org-hide-header-test):
+  test/smart-org-tests.el (smart-org-mode-on-header-cycles-visibility): Bind Action
+    Key variable needed for the test to restore prior Hyperbole Org mode behavior.
+
 2026-10-05  Bob Weiner  
 
 * hui-mouse.el (smart-org-action-key-heading-function,
diff --git a/test/demo-tests.el b/test/demo-tests.el
index 4080b5f9..e8bcb509 100644
--- a/test/demo-tests.el
+++ b/test/demo-tests.el
@@ -3,7 +3,7 @@
 ;; Author:       Mats Lidell 
 ;;
 ;; Orig-Date:    30-Jan-21 at 12:00:00
-;; Last-Mod:     30-Sep-26 at 17:04:16 by Bob Weiner
+;; Last-Mod:      6-Oct-26 at 01:07:57 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -266,7 +266,8 @@
     ;; Without this next let, default Org behavior may occur which
     ;; inserts a new heading when org-meta-return is called rather
     ;; than collapsing the existing tree of headings.
-    (let ((hsys-org-enable-smart-keys t))
+    (let ((hsys-org-enable-smart-keys t)
+          (smart-org-action-key-heading-function 'org-fold-hide-subtree))
       (insert "* 1\n** 2\n*** 3\n")
       (goto-char 1)
       (should (not (org-check-for-hidden 'headlines)))
diff --git a/test/smart-org-tests.el b/test/smart-org-tests.el
index 816524a1..cca7ad53 100644
--- a/test/smart-org-tests.el
+++ b/test/smart-org-tests.el
@@ -3,7 +3,7 @@
 ;; Author:       Mats Lidell 
 ;;
 ;; Orig-Date:    23-Apr-21 at 22:21:00
-;; Last-Mod:     14-Jul-26 at 01:12:06 by Bob Weiner
+;; Last-Mod:      6-Oct-26 at 01:15:43 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -30,7 +30,8 @@
   "With smart keys on an outline header `smart-org' cycles visibility."
   (with-temp-buffer
     (let ((bn (buffer-name))
-          (hsys-org-enable-smart-keys t))
+          (hsys-org-enable-smart-keys t)
+          (smart-org-action-key-heading-function 'org-cycle))
       (org-mode)
       (insert "* 1\n** 2\n*** 3\n")
       (goto-char 1)