Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 51 additions & 4 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,17 +1,64 @@
2026-10-06 Bob Weiner <rsw@gnu.org>

* 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 <rsw@gnu.org>

* 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 <rsw@gnu.org>

* 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 <rsw@gnu.org>

* 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
Expand Down Expand Up @@ -8803,7 +8850,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.
Expand Down Expand Up @@ -10441,7 +10488,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 <matsl@gnu.org>
Expand Down Expand Up @@ -13032,7 +13079,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):
Expand Down
19 changes: 12 additions & 7 deletions hibtypes.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down Expand Up @@ -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)
Expand All @@ -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")
Expand Down Expand Up @@ -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,
Expand All @@ -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))
Expand Down Expand Up @@ -1868,8 +1872,9 @@ e.g. <ilink: my series of keys: ${hyperb:dir}/HYPB>."

(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."
Expand Down
10 changes: 5 additions & 5 deletions hsys-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down Expand Up @@ -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."
Expand Down
41 changes: 31 additions & 10 deletions hui-mouse.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down Expand Up @@ -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
;;; ************************************************************************
Expand Down Expand Up @@ -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').
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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 ()
Expand All @@ -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
;;; ************************************************************************
Expand Down
4 changes: 2 additions & 2 deletions hypb-maintenance.el
Original file line number Diff line number Diff line change
@@ -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 <matsl@gnu.org>
;;
;; 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
;;
Expand Down
9 changes: 5 additions & 4 deletions hyperbole.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
;; Maintainer: Robert Weiner <rsw@gnu.org>
;; Mats Lidell <matsl@gnu.org>
;; 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
Expand Down Expand Up @@ -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)
Expand Down
22 changes: 12 additions & 10 deletions hyrolo.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down Expand Up @@ -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
Expand Down
Loading
Loading