branch: externals/hyperbole
commit 6291e80be777f8b821d29b69dec8db20a531987b
Author: bw <[email protected]>
Commit: bw <[email protected]>

    kotl-mode.el - Fix handling `kotl-mode:emulate-tab'
    
    - man/use-package (hyrolo-file-list) - Add a commented out setting for
    this for customization reference.
    - man/use-package (org-open-link-functions): Document how to enable Org
    link delimiters and highlighting of Hyperbole buttons via:
      (push #'hbut:activate-at-p org-open-link-functions)
    
    - defil search-git-log - Use curly braces instead of square brackets in
    example `search-git-log' so such buttons can be embedded within
    org link brackets if desired, so buttons are highlighted.
    
    - defib button-series - Improve doc and var naming.
    
    - kotl-mode:insert-tab, kotl-mode:indent-to - Add and use in
    `kotl-mode:tab-command'.
    - kotl-mode:indent-line): Simplify and remove prefix arg now that
    `kotl-mode:insert-tab' is handled separately.  This fixes tab handling
    as specified by `kotl-mode:emulate-tab'.
    
    - ibut:create - Change `condition-case' to `condition-case-unless-debug'
    so get full stack trace showing where ibtype error occurred regardless
    of `debug-on-error' setting.  If continue from the debugger, a message
    with the error is logged to *Messages*.
    
    - klink:at-p - Remove `-' as first non-whitspace char between angle
    brackets; can't think of any klink format that conforms to and leads to
    matching to things like: <- 4 2>.
    
    - man/hyperbole.texi (Implicit Button Link Types):
    - hbut.el (defil search-git-log): Change to use curly braces instead of
    square brackets so it can be embedded within Org [[links]].
    - defil kbd-key - Add support for Org/MediaWiki links around
    brace-delimited key series, e.g.. [[{C-h h d d}]].
---
 ChangeLog          |  82 +++++++++++++++++++++++-------
 HY-NEWS            | 143 ++++++++++++++++++++++++++++++++++++++++++++++-------
 hactypes.el        |  14 +++---
 hbut.el            |  16 +++---
 hib-kbd.el         |  45 +++++++++--------
 kotl/klink.el      |   4 +-
 kotl/kotl-mode.el  | 134 ++++++++++++++++++++++++++++++-------------------
 man/hyperbole.texi |  14 +++---
 man/use-package    |  24 ++++++++-
 9 files changed, 343 insertions(+), 133 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index aa27fb87d8a..b8e230a2b9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,20 +1,64 @@
+2026-10-21  Bob Weiner  <[email protected]>
+
+* hbut.el (defil): Use curly braces instead of square brackets in
+    example `search-git-log' so such buttons can be embedded within
+    org link brackets if desired, so buttons are highlighted.
+
+* hactypes.el (button-series): Improve doc and var naming.
+
+* kotl/kotl-mode.el (kotl-mode:insert-tab, kotl-mode:indent-to): Add and
+    use in `kotl-mode:tab-command'.
+                    (kotl-mode:indent-line): Simplify and remove prefix
+    arg now that `kotl-mode:insert-tab' is handled separately.  This
+    fixes tab handling as specified by `kotl-mode:emulate-tab'.
+
+* hbut.el (ibut:create): Change 'condition-case' to
+   'condition-case-unless-debug' so get full stack trace showing where
+   ibtype error occurred regardless of `debug-on-error' setting.  If
+   continue from the debugger, a message with the error is logged to
+   *Messages*.
+
+* hib-kbd.el (kbd-key): Fix bug when 'start' was nil, (char-before
+    start) call would trigger an error.  Fix by first testing if
+    'key-series' is a valid string and move to next ibtype if not,
+    bypassing use of 'start'.
+
+* man/use-package (hyrolo-file-list): Add a commented out setting for
+    this for customization reference.
+
 2026-10-20  Bob Weiner  <[email protected]>
 
+* man/use-package (org-open-link-function): Document how to enable Org
+    link delimiters and highlighting of Hyperbole buttons via:
+    (push #'hbut:activate-at-p org-open-link-functions)
+
+* man/hyperbole.texi (Implicit Button Link Types):
+  hbut.el (defil search-git-log): Change to use curly braces instead of
+    square brackets so it can be embedded within Org [[links]].
+
+* kotl/klink.el (klink:at-p): Remove `-' as first non-whitspace char
+    between angle brackets; can't think of any klink format that
+    conforms to and leads to matching to things like: <- 4 2>.
+
+* hib-kbd.el (kbd-key): Add support for Org/MediaWiki links around
+    brace-delimited key series, e.g.. [[{C-h h d d}]]
+
 * hywiki.el (hywiki-add-page): Fix referent htable not getting page
     added because local variable 'referent-htable' was pointing to
     a different htable.  Remove the local variable to resolve.  This
-    fixes test: 
'hywiki--verify-get-buffer-text-with-point-and-highlight-compact'.
-            (hywiki-directory-get-mod-time): Stop returning a list of 4 ints
-    for mod-time and use a single integer of Epoch seconds.  Return 0 instead
-    of nil if no file to read dir mod-time from.
+    fixes test:
+    'hywiki--verify-get-buffer-text-with-point-and-highlight-compact'.
+            (hywiki-directory-get-mod-time): Stop returning a list of 4
+    ints for mod-time and use a single integer of Epoch seconds.  Return
+    0 instead of nil if no file to read dir mod-time from.
             (hywiki--directory-mod-time): Set default to 0 instead of nil.
-           (hywiki-directory-modified-p): Handle both old-style list of 4 ints
-    and new single integer mod-time formats.
-* test/hywiki-tests.el (hywiki-tests--directory-get-mod-time): Support new 
mod-time
-    format.
-                       (hywiki-tests--directory-modified-p): Change this test
-    so if either checksum or mod-time changes, then 
'hywiki-directory-modified-p'
-    returns t.
+           (hywiki-directory-modified-p): Handle both old-style list of
+    4 ints and new single integer mod-time formats.
+* test/hywiki-tests.el (hywiki-tests--directory-get-mod-time): Support
+    new mod-time format.
+                       (hywiki-tests--directory-modified-p): Change this
+    test so if either checksum or mod-time changes, then
+    'hywiki-directory-modified-p' returns t.
 
 2026-10-19  Bob Weiner  <[email protected]>
 
@@ -370,7 +414,7 @@ V9.3.1 changes ^^^^:
     when 'kotl-mode:tab-flag' /= 'cycle.
 
 * kotl/kotl-mode.el (kotl-mode:tab/untab-command): Remove {M-1 TAB} for 
toggling
-    TAB/S-TAB function for greater Org compatibility.  {M-0 TAB} still works
+    TAB/S-TAB functions for greater Org compatibility.  {M-0 TAB} still works
     for tree demotion/promotion if not in Org-style cycle mode.  Use existing
     bindings of {C-c C-.} and {C-c C-,} for tree demotion/promotion regardless
     of TAB mode.
@@ -433,13 +477,13 @@ V9.3.1 changes ^^^^:
 
 * hui-mini.el (hui:menu-mode-map):
   hyrolo.el (hyrolo-mode-map): Adjust to bind same TAB/S-TAB keys as in 
Koutliner.
-    INCOMPATIBLE CHANGE: Remove M-TAB binding since often used to switch 
applications.
+    INCOMPATIBLE CHANGE: Remove {M-TAB} binding since often used to switch 
applications.
 
-* kotl/kotl-mode.el (kotl-mode-letter-map, kotl-mode-letter-prefix): Add.
+* kotl/kotl-mode.el (kotl-mode-letter-map, kotl-mode:letter-prefix): Add.
                     (kotl-mode:setup-keymap): INCOMPATIBLE CHANGE: Use above
     to move all {C-c <letter>} bindings to {C-c ; <letter>} so do not override 
what
     should be left as user-bindable keys.  User can then change the C-c ; 
prefix as
-    desired by setting 'kotl-mode-letter-prefix'.
+    desired by setting 'kotl-mode:letter-prefix'.
                     (kotl-mode:toggle-letter-prefix): Add and bind to {M-1 C-c 
C-l}.
   kotl/kview.el (kview:set-label-type): Update to take a prefix arg and call 
the above
     function when sent an arg of 1.
@@ -463,6 +507,7 @@ V9.3.1 changes ^^^^:
 * 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).
+    Default values are no-ops.
                (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.
@@ -505,6 +550,9 @@ V9.3.1 changes ^^^^:
                      (Implicit Button Types): Update doc for 'hywiki-word'
     and 'hywiki-existing-word' ibtypes.
 
+* man/use-package (hywiki-directory): Add a commented out setting for this
+    for customization reference.
+
 * man/use-package (hyperbole): Add 'hywiki-directory' to :custom section.
 
 2026-10-03  Bob Weiner  <[email protected]>
@@ -513,7 +561,7 @@ V9.3.1 changes ^^^^:
     is set only if prefix arg is not C-u, as C-u now disables the 3rd arg,
     '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
+  man/hyperbole.texi (HyRolo Menu): Remove reference to 'helm' package no
     longer supported by HyRolo.
                      (HyRolo Menu): Add prefix arg handling details for the
     Yank menu item (hyrolo-yank).
@@ -595,7 +643,7 @@ V9.3.0 changes ^^^^:
     the 'hbut:is-p' programming tag clause above it.
     Also, in Hyperbole button recognition clause, add a call
     (not (smart-prog-at-tag-p t)) to prevent that from firing when
-    on a programming id since those are handled further down
+    on a programming id since those are handled further down.
 
 * test/hui-tests.el (hui-gibut-create-link-to-file): Fix to compare
     :args with second numeric argument.
diff --git a/HY-NEWS b/HY-NEWS
index b12fdc22e8c..2a492effcc7 100644
--- a/HY-NEWS
+++ b/HY-NEWS
@@ -36,7 +36,7 @@
 ** ORG MODE INTEGRATION (See "(hyperbole)Smart Key - Org Mode").
 
 ** TEST CASES  (See "${hyperb:dir}/test").
-
+w
 ** WINDOW GRIDS (See "(hyperbole)grid of windows").
 
 ===========================================================================
@@ -50,6 +50,34 @@
 
 ** DOCUMENTATION
 
+  *** Document changes to Koutliner {C-c <letter>} key bindings in:
+        man/use-package (kotl-mode:letter-prefix)
+        man/hyperbole.texi (Koutliner, Koutliner Keys)
+        kotl/EXAMPLE.kotl
+
+  *** [[(hyperbole)Hiding and Showing]]: Remove Koutline tree visibility
+      cycling from the Action Key default context since it is now on
+      the {TAB} key.
+
+  *** Update [[smart-org]] documentation in [[(hyperbole)Smart-Key - Org Mode]]
+      and (hyperbole)Implicit Button Types]] to reflect:
+        1.  new Org-style visibility cycling on the {TAB} and {S-TAB} keys.
+
+        2.  new settings to control Action and Assist Key behavior when
+            within a heading (defaults are no-ops):
+            [[smart-org-action-key-heading-function]] and
+            [[smart-org-assist-key-heading-function]].  The new 
[[smart-org-cycle]]
+            command is one option for such as setting.
+
+  *** [[kotl/EXAMPLE.kotl]]:
+      [[(hyperbole)Promoting and Demoting]]: Remove {M-0 TAB} and {M-0 S-TAB}
+      for demoting and promoting within Org tables as M-0 is used as a flag to
+      these commands to also fill cells.  Additionally, these bindings worked
+      only when 'kotl-mode:tab-flag' /= 'cycle.
+
+  *** man/use-package: Add commented out settings for customization of
+      [[hyrolo-file-list]] and  [[hywiki-directory]].
+
 ** EXPLICIT BUTTONS  (See "(hyperbole)Explicit Buttons").
 
 ** GLOBAL BUTTONS  (See "(hyperbole)Global Buttons").
@@ -60,16 +88,92 @@
 
 ** HYROLO  (See "(hyperbole)HyRolo").
 
+
+  *** INCOMPATIBLE CHANGE: In [[hyrolo-yank]], interactively, 'regexp-flag' is
+      set only if prefix arg is not C-u, as C-u now disables the 3rd arg,
+      'exclude-sub-entries'.  Interactively, indicate whether yanking an
+      entry or a tree (sub-entries).
+
+** HYWIKI  (See "(hyperbole)HyWiki").
+
 ** IMPLICIT BUTTONS  (See "(hyperbole)Implicit Buttons").
 
+  *** [[hywiki-word]] matching can now be customized to limit which major modes
+      allow HyWikiWord creaton via the {M-RET} Action Key.  Add any such
+      text or programming modes to 
[[hywiki-word-create-exclude-action-key-modes]].
+      Then this ibtype will use [[hywiki-word-action-key-creation-allowed-p]]
+      to check for a valid mode.  You can bypass this setting by creating
+      a HyWikiWord via the keyboard menu with {C-h h h c}.
+
 ** KOUTLINER  (See "(hyperbole)Koutliner").
 
+  *** In [[kotl-mode:setup-keymap]] add {C-c C-]} key binding for
+      [[kotl-mode:toggle-tab-flag]] to toggle {TAB} and {S-TAB} between 
Org-style
+      visibility cycling and tree demotion/promotion.
+
+  *** Remove {M-1 TAB} for toggling TAB/S-TAB functions for greater Org
+      compatibility.  {M-0 TAB} still works for tree demotion/promotion if
+      not in Org-style cycle mode.  Existing bindings of {C-c C-.} or {M-right}
+      and {C-c C-,} or {M-left} for tree demotion/promotion always work
+      regardless of TAB mode.
+
+  *** * kotl/EXAMPLE.kotl:
+  man/hyperbole.texi (Promoting and Demoting): Remove {M-0 TAB} and {M-0 S-TAB}
+    for demoting and promoting within Org tables as M-0 is used as a flag to
+    these commands to also fill cells.  Additionally, these bindings worked 
only
+    when 'kotl-mode:tab-flag' /= 'cycle.
+
+
+  *** INCOMPATIBLE CHANGE: In [[kotl-mode:setup-keymap]], by default, move all
+      {C-c <letter>} key bindings to {C-c ; <letter>} so do not override keys
+      reserved for user-specific key bindings.  The new {M-1 C-c C-l} will
+      toggle the old {C-c <letter>} bindings back on/off when desired for
+      users who don't care about overriding global bindings.  Alternatively,
+      you can also modify the new [[kotl-mode:letter-prefix]] in your Hyperbole
+      `use-package' setup to use any prefix you prefer.
+
+  *** INCOMPATIBLE CHANGE: Previously in Koutlines, the {M-RET} Action Key
+      default action when no matching context was found was to run
+      [[kotl-mode:show-or-hide-tree]].  Now instead it calls the function
+      specified by the new [[kotl-mode:action-key-default-function]], which
+      defaults to a no-op, since Koutline tree visibility cycling is now
+      on the {TAB} key by default.
+
+  *** INCOMPATIBLE CHANGE: Previously in Koutlines, the {C-u M-RET} Assist
+      Key default action when no matching context was found was to run
+      [[smart-scroll-down]].  Now instead it calls the function specified
+      by the new [[kotl-mode:assist-key-default-function]], which defaults
+      to a no-op, for symmetry with the Action Key.
+
+  *** INCOMPATIBLE CHANGE: Remove {M-TAB} binding since often used to
+      switch applications.  Use {S-TAB} instead.
+
 ** MENUS  (See "(hyperbole)Menus").
 
 ** PROGRAMMING INTERFACE CHANGES  (See "(hyperbole)Embedding Hyperbole").
 
+  *** Add [[hpath:extension-in-list-p]] and use in deciding whether
+      to add the complex regexp needed to match Koutline cell relative ids
+      to any [[hsys-consult--grep-paths]] calls, for example, when calling
+      [[hyrolo-yank]] interactively.
+
+  *** [[kotl-mode:tab-flag]]: Make 'cycle the default for Org-style visibility
+      cycling compatibility.
+
+  *** Add [[kotl-mode:toggle-letter-prefix]] and discrete sub-commands
+      [[kotl-mode:set-letter-prefix-standard]] and
+      [[kotl-mode:set-letter-prefix-control-c]] to control Koutline C-c
+      <letter> key bindings.
+
 ** ORG MODE INTEGRATION (See "(hyperbole)Smart Key - Org Mode").
 
+  *** New Action and Assist Key settings for the action to run when pressed
+      on an Org heading if [[hsys-org-enable-smart-keys]] is set to t:
+      [[smart-org-action-key-heading-function]] and
+      [[smart-org-assist-key-heading-function]].  Both of these default to
+      no-ops.  The new [[smart-org-cycle]] command is one possible command to
+      set them to, though {TAB} will do that by default now.
+
 ** TEST CASES  (See "${hyperb:dir}/test").
 
 ** WINDOW GRIDS (See "(hyperbole)grid of windows").
@@ -78,26 +182,33 @@
 *                                   V9.2.0
 ===========================================================================
 
-  *** After installing the ace-window package and loading Hyperbole, execute
+** DOCUMENTATION
 
+  *** [[man/use-package]]: Add the reference version of the `use-package'
+      configuration for Hyperbole.
 
-** ACE WINDOW PACKAGE INTEGRATION - fast window and buffer switching
+  *** [[(hyperbole)Inserting Literal Tabs]]: Add this manual section
+      to the Koutliner chapter.
 
-** ACTION AND ASSIST (SMART) KEYS  (See "(hyperbole)Smart Keys").
+  *** [[(hyperbole)Promoting and Demoting]]: Expand this Koutliner
+      section with latest key bindings and Org table support.
 
-** ACTION TYPES  (See "(hyperbole)Action Types").
+  *** [[(hyperbole)mplicit Button Types]]: Add new [[hbut-identifier]]
+      type to control ibut type prioritization for jumping to
+      Hyperbole button symbols like [[hbut:current]].
 
-** DOCUMENTATION
 
-** EXPLICIT BUTTONS  (See "(hyperbole)Explicit Buttons").
+** HYROLO  (See "(hyperbole)HyRolo").
 
-** GLOBAL BUTTONS  (See "(hyperbole)Global Buttons").
+  *** When using the `consult' package in searches, use an entry
+      match regexp that supports the 'orderless' package.
 
-** HYCONTROL  (See "(hyperbole)HyControl").
 
-** HYPERBOLE SYSTEM  (See "(hyperbole)").
+** HYWIKI  (See "(hyperbole)HyWiki").
+
+  *** When using the `consult' package in searches, use an entry
+      match regexp that supports the 'orderless' package.
 
-** HYROLO  (See "(hyperbole)HyRolo").
 
 ** IMPLICIT BUTTONS  (See "(hyperbole)Implicit Buttons").
 
@@ -134,8 +245,6 @@
       cycling and demoting and promoting outline trees.
 
 
-** MENUS  (See "(hyperbole)Menus").
-
 ** PROGRAMMING INTERFACE CHANGES  (See "(hyperbole)Embedding Hyperbole").
 
   **** Add [[hypb:count-visible-lines]].
@@ -179,17 +288,13 @@
          [[kotl-mode:tab-post-hook]],
         [[kotl-mode:tab-command]]
 
-  **** Add [[kvspec:reset]] to reset view spec to default and set this
-       default in `kfile:read-v4-or-v3' and `kvspec:update'.
+  **** Add [[kvspec:reset]] to reset view spec to [[kvspec:default]] and set 
this
+       default in [[kfile:read-v4-or-v3]] and [[kvspec:update]].
 
   **** Add [[smart-flash-tag-at-point]] to flash programming identifier
        implicit links.
 
 
-** TEST CASES  (See "${hyperb:dir}/test").
-
-** WINDOW GRIDS (See "(hyperbole)grid of windows").
-
 ===========================================================================
 *                                   V9.1.0
 ===========================================================================
diff --git a/hactypes.el b/hactypes.el
index 3872b82bccd..e72053203e0 100644
--- a/hactypes.el
+++ b/hactypes.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    23-Sep-91 at 20:34:36
-;; Last-Mod:     18-Oct-26 at 21:12:57 by Bob Weiner
+;; Last-Mod:     21-Oct-26 at 10:58:06 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -857,13 +857,15 @@ SECTION is a string and can be just the leading part of a 
section heading."
      (append (ebut:list) (ibut:list)))
    (gbut:label-list)))
 
-(defact button-series (buts)
-  "Combine multiple buttons given by their labels into one series of buttons.
-Local buttons are preferred over global buttons."
+(defact button-series (but-names)
+  "Combine multiple buttons given by BUT-NAMES list into one series of buttons.
+If the button name is found in the current buffer, that button is used;
+otherwise, activate any global button with that name."
   (interactive
-   (list (completing-read-multiple "Button labels: " 
(hactypes:buffer-button-list)
+   (list (completing-read-multiple "Comma-separated Button labels: "
+                                   (hactypes:buffer-button-list)
                                    nil t)))
-  (dolist (b buts)
+  (dolist (b but-names)
     (let ((but (hbut:get (hbut:label-to-key b))))
       (if but
           (hbut:act but)
diff --git a/hbut.el b/hbut.el
index e83d0060dd8..5e245d3bdde 100644
--- a/hbut.el
+++ b/hbut.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    18-Sep-91 at 02:57:09
-;; Last-Mod:     18-Oct-26 at 23:37:27 by Bob Weiner
+;; Last-Mod:     21-Oct-26 at 13:22:41 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -2068,14 +2068,12 @@ If a new button is created, store its attributes in the 
symbol,
                         (setq ibtype-point (point-marker))
                         (while (and (not is-type) types)
                           (setq itype (car types))
-                          (when (condition-case err
+                          (when (condition-case-unless-debug err
                                     (and itype (setq args (funcall itype)))
-                                  (error (progn (message "%S: %S" itype err)
-                                                ;; Show full stack trace
-                                                (debug))))
+                                  (error (message "%S: %S" itype err)))
                             (setq is-type itype))
-                          ;; Any implicit button type check should leave point
-                          ;; unchanged.  Trigger an error if not.
+                          ;; Any implicit button type check should leave
+                          ;; point unchanged.  Trigger an error if not.
                           (unless (equal ibtype-point (point-marker))
                             (hypb:error "(Hyperbole): ibtype %s improperly 
moved point from %s to %s"
                                         itype ibtype-point (point-marker)))
@@ -3191,14 +3189,14 @@ log entries.  The buttons use this format: [<text to 
match>].
 The following defines the button type called search-git-log which
 calls hypb:fgrep-git-log with the text of the button as an argument:
 
-  (defil search-git-log \"[<\" \">]\" \".*\" #\\='hypb:fgrep-git-log)
+  (defil search-git-log \"{<\" \">}\" \".*\" #\\='hypb:fgrep-git-log)
 
 Place point after one of the above expressions and evaluate it with
 \\[eval-last-sexp] to define the implicit button type.  Then if you
 have cloned the Hyperbole repo and are in a Hyperbole source buffer,
 an Action Key press on a button of the form:
 
-  ;; [<test release>]
+  ;; {<test release>}
 
 will display one line per commit whose change set matches \"test
 release\".  An Action Key press on any such line will then display the
diff --git a/hib-kbd.el b/hib-kbd.el
index 44bd56cbac4..1f7fec17c3c 100644
--- a/hib-kbd.el
+++ b/hib-kbd.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    22-Nov-91 at 01:37:57
-;; Last-Mod:     31-Aug-25 at 20:05:59 by Bob Weiner
+;; Last-Mod:     21-Oct-26 at 13:11:47 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -136,26 +136,31 @@ Any key sequence within the series must be a string of 
one of the following:
             ;; This excludes delimiters
             (key-series (car seq-and-pos))
             (start (cadr seq-and-pos))
+             (chr-before (char-before start))
             binding)
-       ;; Match only when start delimiter is preceded by whitespace,
-       ;; double quotes or is the 1st buffer character, so do not
-       ;; match to things like ${variable}.
-       (when (or (memq (char-before start) '(nil ?\ ?\t ?\n ?\r ?\f ?\"))
-                 ;; In Texinfo, allow for @bkbd{} or @kbd{}, so an
-                 ;; alpha char preceding
-                 (and (derived-mode-p 'texinfo-mode)
-                      (= (if (char-before start)
-                             (char-syntax (char-before start))
-                           0)
-                         ?w)))
-         (when (and (stringp key-series) (not (string-empty-p key-series)))
-           ;; Replace any ${} internal or env vars; leave
-           ;; $VAR untouched for the shell to evaluate.
-           (let ((hpath:variable-regexp "\\${\\([^}]+\\)}"))
-             (setq key-series (hpath:substitute-value key-series)))
-
-           (setq key-series (kbd-key:normalize key-series)
-                 binding (kbd-key:binding key-series)))
+       ;; Match only when start delimiter is preceded by whitespace, double
+       ;; quotes, 2 square opening brackets (Org or MediaWiki link) or is
+       ;; the 1st buffer character, so do not match to things like
+       ;; ${variable}.
+       (when (and (stringp key-series) (not (string-empty-p key-series))
+                   (or (memq chr-before '(nil ?\ ?\t ?\n ?\r ?\f ?\"))
+                       ;; Within an Org or MediaWiki link
+                       (and (eq (char-before (1- start)) ?\[)
+                            (eq chr-before ?\[))
+                      ;; In Texinfo, allow for @bkbd{} or @kbd{}, so an
+                      ;; alpha char preceding
+                      (and (derived-mode-p 'texinfo-mode)
+                           (= (if chr-before
+                                  (char-syntax chr-before)
+                                0)
+                              ?w))))
+         ;; Replace any ${} internal or env vars; leave
+         ;; $VAR untouched for the shell to evaluate.
+         (let ((hpath:variable-regexp "\\${\\([^}]+\\)}"))
+           (setq key-series (hpath:substitute-value key-series)))
+
+         (setq key-series (kbd-key:normalize key-series)
+               binding (kbd-key:binding key-series))
          (and (stringp key-series)
               (or (and binding (not (integerp binding)))
                   (kbd-key:special-sequence-p key-series))
diff --git a/kotl/klink.el b/kotl/klink.el
index d4877f9e814..31c605d81fa 100644
--- a/kotl/klink.el
+++ b/kotl/klink.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    15-Nov-93 at 12:15:16
-;; Last-Mod:     18-Oct-26 at 08:32:18 by Bob Weiner
+;; Last-Mod:     20-Oct-26 at 12:40:05 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -232,7 +232,7 @@ link-end-position, (positions include delimiters)."
           (stringp (setq referent (car label-and-pos)))
           (setq referent (string-trim referent))
           ;; Ensure it conforms to some klink specification.
-          (or (string-match "\\`[ \t]*[-#@|!&]" referent)
+          (or (string-match "\\`[ \t]*[#@|!&]" referent)
               (and (or (when (string-match "\\s-*,\\|#[0-9a-z.=]+\\'" referent)
                          (setq path (substring referent 0 (match-beginning 0)))
                          (hpath:is-p (expand-file-name path (hbut:get-key-src 
t t))))
diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el
index 17e7f72416b..1b150623d8b 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:     17-Oct-26 at 17:22:03 by Bob Weiner
+;; Last-Mod:     21-Oct-26 at 18:57:40 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -55,7 +55,7 @@ Set it to `smart-scroll-down' if you want the old Koutliner 
behavior."
 
 ;; Derived from `org-cycle-emulate-tab'
 (defcustom kotl-mode:emulate-tab nil
-  "Where `kotl-mode:tab-command' should run `kotl-mode:indent-line'.
+  "Where `kotl-mode:tab-command' should run `kotl-mode:insert-tab'.
 Values are:
 nil         - Never
 white       - Only in completely white lines
@@ -280,7 +280,7 @@ It provides the following keys:
   ;;
   (hypb:add-to-invisibility-spec '(outline . t))
   (setq indent-line-function 'kotl-mode:indent-line
-       indent-region-function 'kotl-mode:indent-region
+       indent-region-function 'indent-region-line-by-line
        outline-isearch-open-invisible-function 
'kotl-mode:isearch-open-invisible
        line-move-ignore-invisible 'keep-column
        local-abbrev-table text-mode-abbrev-table
@@ -664,7 +664,7 @@ Do not delete across cell boundaries."
              del-count)))))
 
 (defun kotl-mode:delete-horizontal-space ()
-  "Delete all spaces and tabs around point."
+  "Delete all spaces and tabs around point (exluding Koutliner indent)."
   (interactive "*")
   (save-restriction
     (narrow-to-region
@@ -699,6 +699,33 @@ With prefix ARG non-nil, join this line to the following 
line."
             (fixup-whitespace))
         (goto-char opoint))))))
 
+;; Derived from Emacs `insert-tab' function
+(defun kotl-mode:insert-tab (&optional arg)
+  "Insert 1 or optional ARG tab chars or spaces based on `insert-tabs-mode'.
+If `insert-tabs-mode' is non-nil, insert tabs.
+If point is preceded by whitespace, expand any abbrev at point prior to
+inserting tab/spaces."
+  (let ((count (prefix-numeric-value arg)))
+    (when (and abbrev-mode
+              (eq (char-syntax (preceding-char)) ?w))
+      (expand-abbrev))
+    ;; Koutline-specific part that prevents changing outline
+    ;; indentation from spaces to tabs
+    (if kotl-mode:indent-tabs-mode
+       (insert-char ?\t count)
+      (kotl-mode:indent-to
+       (* tab-width (+ count (/ (current-column) tab-width)))))))
+
+;; Derived from Emacs `indent-to' function
+(defun kotl-mode:indent-to (column &optional minimum)
+  "Indent from point with tabs and spaces until COLUMN is reached.
+Optional second argument MINIMUM says always do at least MINIMUM spaces
+even if that goes past COLUMN; by default, MINIMUM is zero.
+
+The return value is the column where the insertion ends."
+  (indent-to (max column (kcell-view:indent))
+            minimum))
+
 (defun kotl-mode:skip-filling-p (interactive-flag)
   "Return t if filling is to be skipped, or nil.
 This can be due to a no-fill attribute or with point in a table."
@@ -1092,8 +1119,8 @@ With prefix arg TURN-OFF or at begin of line, turns fill 
prefix off."
 ;; Derived from and meant to emulate `org-cycle'
 (defun kotl-mode:tab-command (&optional arg)
   "Tab key demote, cycle visibility or insert tabs for Koutlines.
-Optional prefix ARG is used as a flag or a numeric argument depending on its
-value.
+Optional prefix ARG is used as a flag or a numeric argument depending on
+its value.
 
 When `kotl-mode:tab-flag' is:
   \\='cycle: cycle views of parts of the outline;
@@ -1102,15 +1129,18 @@ When `kotl-mode:tab-flag' is:
 Use {C-c [} to toggle its value between `cycle' and nil.
 
 See also the documentation strings for `kotl-mode:indent-line',
-`kotl-mode:demote-tree', and `kotl-mode:demote-siblings'.
+`kotl-mode:insert-tab', `kotl-mode:demote-tree', and
+`kotl-mode:demote-siblings'.
+
+If in `cycle' mode without a prefix argument, call
+`kotl-mode:cycle-locally' to rotate the tree at point through three
+different states (local cycling):
 
-If in `cycle' mode without a prefix argument, call `kotl-mode:cycle-locally'
-to rotate the tree at point through three different states (local cycling):
     1. FOLDED:   Hide all but the first line of the tree at point
-    2. CHILDREN: Hide all but the first line of the root cell at point and its
-                 children
-    3. SUBTREE:  Show the entire tree at point; if there is no subtree, switch
-                 directly from CHILDREN to FOLDED.
+    2. CHILDREN: Hide all but the first line of the root cell at point
+                 and its children
+    3. SUBTREE:  Show the entire tree at point; if there is no subtree,
+                 switch directly from CHILDREN to FOLDED.
 
 If in `cycle' mode with a single universal argument, C-u, call
 `kotl-mode:cycle-globally' to cycle the whole outline through
@@ -1119,18 +1149,19 @@ these three different states:
     2. CONTENTS: Show the first line of all cells at all levels
     3. SHOW ALL: Show the entire outline.
 
-With a prefix argument of 0 when not in `cycle' mode, demote the tree at
-point and refill all its cells regardless of any cell `no-fill' property.
+With a prefix argument of 0 when not in `cycle' mode, demote the tree
+at point and refill all its cells regardless of any cell `no-fill'
+property.
 
-Any numeric prefix argument other than 0 or 1 is available for use by any
-function this calls.
+Any numeric prefix argument other than 0 or 1 is available for use by
+any function this calls.
 
 The variable, `kotl-mode:emulate-tab', works just like
-`org-cycle-emulate-tab' does in Org mode, except that it is disabled, set to
-nil by default.  Use it if you haven't set `kotl-mode:tab-flag' to t.  It
-determines where the TAB key indents or inserts TAB characters rather than
-performing the functions detailed above.  See its documentation string for
-valid settings."
+`org-cycle-emulate-tab' does in Org mode, except that it is disabled,
+set to nil by default.  Use it if you haven't set `kotl-mode:tab-flag'
+to t.  It determines where the TAB key indents or inserts TAB characters
+rather than performing the functions detailed above.  See its
+documentation string for valid settings."
   (interactive "P")
   (unless (run-hook-with-args-until-success 'kotl-mode:tab-pre-hook)
     ;; Skip additional org-like code originally in the above `unless' clause
@@ -1141,7 +1172,7 @@ valid settings."
     (cond
      ((eq kotl-mode:tab-flag t)
       ;; Indent or insert <tab>s anywhere
-      (kotl-mode:indent-line arg))
+      (kotl-mode:insert-tab))
      ((equal arg '(4))
       ;; Single universal `arg'
       (if (eq kotl-mode:tab-flag 'cycle)
@@ -1190,7 +1221,7 @@ valid settings."
                 'kotl-mode:before-tab-emulation-hook))
               ((and (eq kotl-mode:emulate-tab 'exc-hl-bol)
                     (not (kotl-mode:bocp)))
-                (kotl-mode:indent-line arg))
+                (kotl-mode:insert-tab arg))
               ((or (eq kotl-mode:emulate-tab t)
                    (and (memq kotl-mode:emulate-tab '(white whitestart))
                         (save-excursion
@@ -1199,7 +1230,7 @@ valid settings."
                                  (= (match-end 0) (line-end-position)))
                             (and (eq kotl-mode:emulate-tab 'whitestart)
                                  (>= (match-end 0) pos)))))
-                (kotl-mode:indent-line arg))
+                (kotl-mode:insert-tab arg))
               (t
                (save-excursion
                   (goto-char (kcell-view:start))
@@ -1393,8 +1424,8 @@ or after point and around or after mark are interchanged."
 
 (defun kotl-mode:untab-command (&optional arg)
   "Shift-tab key promote, cycle visibility or delete tabs for Koutlines.
-Optional prefix ARG is used as a flag or a numeric argument depending on its
-value.
+Optional prefix ARG is used as a flag or a numeric argument depending on
+its value.
 
 When `kotl-mode:tab-flag' is:
   \\='cycle: cycle views of the whole outline;
@@ -1406,25 +1437,26 @@ See also the documentation strings for 
`kotl-mode:delete-backward-char',
 `kotl-mode:promote-tree', and `kotl-mode:promote-siblings'.
 
 If in `cycle' mode and given either no prefix argument or a single
-unviversal argument, C-u, call `kotl-mode:cycle-globally' to cycle the whole
-outline through these three different states:
+unviversal argument, C-u, call `kotl-mode:cycle-globally' to cycle the
+whole outline through these three different states:
     1. OVERVIEW: Show only the first line of level 1 cells
     2. CONTENTS: Show the first line of all cells at all levels
     3. SHOW ALL: Show the entire outline.
 
-With a prefix argument of 0 when not in `cycle' mode, promote the tree at
-point and refill all its cells regardless of any cell `no-fill' property.
+With a prefix argument of 0 when not in `cycle' mode, promote the tree
+at point and refill all its cells regardless of any cell `no-fill'
+property.
 
-With a numeric prefix argument when in `cycle' mode, show cells across the
-whole outline down to prefix argument level, one line per cell.  Zero means
-show all cell levels.
+With a numeric prefix argument when in `cycle' mode, show cells across
+the whole outline down to prefix argument level, one line per cell.
+Zero means show all cell levels.
 
 The variable, `kotl-mode:emulate-tab', works just like
-`org-cycle-emulate-tab' does in Org mode, except that it is disabled, set to
-nil by default.  Use it if you haven't set `kotl-mode:tab-flag' to t.  It
-determines where the TAB key indents or inserts TAB characters rather than
-performing the functions detailed above.  See its documentation string for
-valid settings."
+`org-cycle-emulate-tab' does in Org mode, except that it is disabled,
+set to nil by default.  Use it if you haven't set `kotl-mode:tab-flag'
+to t.  It determines where the TAB key indents or inserts TAB characters
+rather than performing the functions detailed above.  See its
+documentation string for valid settings."
   (interactive "P")
   (unless (run-hook-with-args-until-success 'kotl-mode:tab-pre-hook)
     (cond
@@ -4187,21 +4219,20 @@ This is like `exchange-point-and-mark', but doesn't 
activate the mark."
   (goto-char (prog1 (mark t)
               (set-marker (mark-marker) (point) (current-buffer)))))
 
-(defun kotl-mode:indent-line (&optional arg)
-  "Indent line relative to the previous one.
-With optional prefix ARG greater than 1, tab forward ARG times.
-See the documentation string of `kotl-mode:indent-tabs-mode' for details
-on when tabs are used for indenting."
-  (interactive "*p")
-  (setq arg (prefix-numeric-value arg))
+(defun kotl-mode:indent-line ()
+  "Remove any indent from the line.
+Used by `kotl-mode:indent-region'.  See the documentation string of
+  `kotl-mode:indent-tabs-mode' for details on when tabs or spaces are
+  used for indenting."
+  (interactive "*")
   (let ((indent-tabs-mode kotl-mode:indent-tabs-mode))
-    (if (> arg 1)
-       (while (> arg 0)
-         (tab-to-tab-stop)
-         (setq arg (1- arg)))
-      (indent-relative))))
+    (save-excursion
+      (kotl-mode:beginning-of-line)
+      (kotl-mode:delete-horizontal-space))))
 
 (defun kotl-mode:indent-region (start end)
+  (interactive "r")
+  (kotl-mode:maintain-region-highlight)
   (kotl-mode:maybe-shrink-region-p)
   (indent-region start end nil))
 
@@ -4553,6 +4584,7 @@ Leave point at end of line now residing at START."
             forward-sentence
             goto-line
             goto-line-relative
+             indent-region
             just-one-space
             kill-word
             kill-line
diff --git a/man/hyperbole.texi b/man/hyperbole.texi
index f5201ff7a91..90aa5c7fe5c 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:     18-Oct-26 at 23:06:37 by Bob Weiner
+@c Last-Mod:     20-Oct-26 at 15:10:29 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 18, 2026
+@set UPDATED October 20, 2026
 @set UPDATED-MONTH October 2026
 @set EDITION 9.3.0
 @set VERSION 9.3.0
@@ -171,7 +171,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</P>
 
 <PRE>
 Edition 9.3.0
-Printed October 18, 2026.
+Printed October 20, 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.3.0
-October 18, 2026 @c AUTO-REPLACE-ON-SAVE
+October 20, 2026 @c AUTO-REPLACE-ON-SAVE
 
 
   Published by the Free Software Foundation, Inc.
@@ -8465,20 +8465,20 @@ entries.  The buttons use this format: [<text to 
match>].
 The following defines the button type called @code{search-git-log} with a
 a key series action surrounded by braces:
 
-@code{(defil search-git-log "[<" ">]" ".*" "@{M-: (hypb:fgrep-git-log \"\\&\") 
RET@}")}
+@code{(defil search-git-log "@{<" ">@}" ".*" "@{M-: (hypb:fgrep-git-log 
\"\\&\") RET@}")}
 
 @noindent
 or this simpler version skips the explicit text substitution (\\\\&)
 and instead uses the function that takes the button text as an argument:
 
-@code{(defil search-git-log "[<" ">]" ".*" #’hypb:fgrep-git-log)}
+@code{(defil search-git-log "@{<" ">@}" ".*" #’hypb:fgrep-git-log)}
 
 Place point after one of the above expressions and evaluate it with
 @bkbd{C-x C-e} @code{eval-last-sexp} to define the implicit button
 type.  Then if you have cloned the Hyperbole repo and are in a
 Hyperbole source buffer, an Action Key press on a button of the form:
 
-@code{;; [<test release>]}
+@code{;; @{<test release>@}}
 
 @noindent
 will display one line per commit whose change set matches 'test
diff --git a/man/use-package b/man/use-package
index 0b31ce39f50..b87217fdf50 100644
--- a/man/use-package
+++ b/man/use-package
@@ -42,6 +42,13 @@
   ;; - nil    - no highlighting, the ‘hywiki-mode’ is disabled.
   (hywiki-mode :all)
 
+  ;; If you want to treat your Hyperbole link buttons like Org links,
+  ;; uncomment this next Lisp sexpression and then you can surround
+  ;; your Hyperbole buttons with double square brackets and get Org
+  ;; link highlighting, e.g. [[bug#8291]].
+  ;;
+  ;; (push #'hbut:activate-at-p org-open-link-functions)
+
   :bind
   (:map hyperbole-mode-map
        ;; Bind Smart Keys: {M-RET} executes `action-key' and {C-u M-RET}
@@ -62,10 +69,23 @@
   ;;   nil      - In Org mode, Org controls the key.
   (hsys-org-enable-smart-keys t)
 
+  ;; HyRolo Customizations
+
+  ;; Uncomment and set `hyrolo-file-list' to a list of files,
+  ;; directories and file wildcard expressions you want to find notes,
+  ;; contacts or any hierarchical records in.  Directories are
+  ;; searched recursively and filtered to only Org, Markdown, Koutline
+  ;; and Emacs outline files.  The first entry is where HyRolo adds
+  ;; new records.  (default = '("~/.rolo.org"))
+  ;;
+  ;; (hyrolo-file-list '("~/.rolo.org" "~/org/" "~/org-roam/" 
"~/Documents/notes/"))
+
   ;; HyWiki Customizations
 
-  ;; Directory to store all HyWiki pages in (default = "~/hywiki/")
-  (hywiki-directory "~/hywiki/")
+  ;; Uncomment and set `hywiki-directory' to the directory to store
+  ;; all HyWiki pages in (default = "~/hywiki/").
+  ;;
+  ;; (hywiki-directory "~/hywiki/")
 
   ;; If using these settings:
   ;;   (hywiki-mode :all)

Reply via email to