Skip to content
92 changes: 92 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,10 +1,102 @@
2026-08-17 Bob Weiner <rsw@gnu.org>

* test/hywiki-tests.el (hywiki-tests--nonexistent-wikiword-with-section-should-create-wikiword):
Add condition-case to handle error thrown when #section is not found.

* hywiki.el (hywiki-create-referent): Ensure 'default-directory' is set
when temp 'hywiki-directory' is removed.

* hywiki.el (hywiki-create-referent): Simplify let and improve error msg.
test/hywiki-tests.el (hywiki-tests--save-referent-info-node-use-menu): Skip
until issues with Info kbd-cmd calls are resolved.
(hywiki-tests--create-referent): Fix to call
'hywiki-get-referent' and adjust error msg match.

2026-08-17 Bob Weiner <rsw@gnu.org>

* test/hywiki-tests.el (hywiki-tests--hywiki-create-page--adds-file-in-wiki-folder,
hywiki-tests--hywiki-create-page--adds-no-wiki-word-fails)
hywiki-tests--reference-to-referent,
hywiki-tests--get-page/wikiword-list):
Update to use 'hywiki-tests--preserve-hywiki-mode'.
(hywiki-tests--preserve-hywiki-mode): Replace (sit-for 0.01)
with (redisplay t) so tests will work within keyboard macros where 'sit-for'
is ineffective. Also, ensure default-directory is set to hywiki-directory
so relative paths are completed properly.
(hywiki-tests--referent-test): Compare
'hywiki-get-wikiword-list) to nil rather than '() and use 'eq'.

* hywiki.el (hywiki-file-suffix): Rename to 'hywiki-file-extension' to avoid
terminology clash with #suffix in references.

* test/hywiki-tests.el (hywiki-tests--preserve-hywiki-mode): Rewrite so that
'hywiki-mode' is enabled and 'wiki-page' is set after setting the current
buffer to fix null variable values within 'body'.

2026-08-16 Bob Weiner <rsw@gnu.org>

* test/hywiki-tests.el (hywiki-tests--preserve-hywiki-mode): Ensure 'wiki-page'
is expanded into current 'hywiki-directory' to fix improper resolution in
'default-directory'. Ensure `hywiki-directory' ends with a dir sep char.

* hywiki.el (hywiki-cache-save): Change 'save-buffer' to 'hypb:save-buffer-silently'.
Replace 'save-window-excursion' with 'save-excursion' to eliminate any display
change.

2026-08-15 Bob Weiner <rsw@gnu.org>

* hywiki.el (hywiki-create-referent, hywiki-add-page): Fix to add 'wikiword'
suffix to returned referent.
(hywiki-display-referent): This fixes referents in this function
to always include the wikiword suffix.

* hmouse-drv.el (hkey-help-show): Add ? in addition to q as quit and
restore window config in the help buffer, for consistency with
Hyperbole minibuffer menus.
(hkey-help-show): Fix failure to match to visible window because
'memq t' was trying to match to t when 'string-match-p' was returning the
position of the match. Fix by eliminating 'memq t' and using 'seq-filter'
instead.
(hkey-help-hide): Remove saved wconfig after it is restored.
hui-mini.el (hui:menu-help, hui:menu-choose): Add and use ? in minibuffer
menus to display a buffer with help for each current menu item.
(hui:menu-last-help-string): Add and use in 'hui:menu-help'
and '(hui:menu-display-help' to determine whether to toggle display
of help window or not.
(hui:menu-choose): Add menu symbol as required first arg
and make 2nd arg, 'menu-alist', optional. 'menu' may be null if
'menu-alist' is given.
man/hyperbole.texi (Invocation): Add doc for {?} minibuffer menu help key.

2026-08-14 Bob Weiner <rsw@gnu.org>

* hui-mini.el (hui:menu-display-help, hui:menu-get-help-string): Add.
(hui:menu-help): Call 'fit-window-to-buffer' for help buffer
rather than trying to enlarge or shrink relatively.

* test/hywiki-tests.el (hywiki-tests--preserve-hywiki-mode): Don't run (hywiki-mode)
when already set to the newly specified mode; this prevents a cascade of
wikiword highlighting across all buffers when not necessary. Also do this only
after temp buffers and files are killed, not before.

2026-08-14 Mats Lidell <matsl@gnu.org>

* Makefile (docker-latest, docker-run-latest): Update image if needed
before running the docker job.
(docker, docker-run): Remove dependency on update so targets can
be used with no automated update check.

2026-08-12 Bob Weiner <rsw@gnu.org>

* hywiki.el (hywiki-get-referent-hasht): Compute 'hywiki--any-wikiword-regexp-list'
and highlight wikiwords only when the wikiword hash table is non-empty,
to fix bug #81594.
test/hywiki-tests.el (hywiki-tests--bug-81594-file,
hywiki-tests--bug-81594-buffer): Add tests for this.

* test/hy-test-helpers.el (hy-test-helpers:with-time): Add to time any part
of a function.

2026-08-11 Mats Lidell <matsl@gnu.org>

* (check-copyright): Check copyright and SPDX headers.
Expand Down
36 changes: 21 additions & 15 deletions hmouse-drv.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 04-Feb-90
;; Last-Mod: 25-Jul-26 at 23:02:11 by Mats Lidell
;; Last-Mod: 15-Aug-26 at 22:29:02 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -1355,7 +1355,8 @@ details."
(progn (set-window-configuration hkey--wconfig)
(if kill
(kill-buffer buf)
(bury-buffer buf)))
(bury-buffer buf))
(setq hkey--wconfig nil))
(hkey-quit-window kill window)))
(setq hkey--wconfig nil))

Expand All @@ -1376,23 +1377,27 @@ details."
With optional second arg CURRENT-WINDOW non-nil, force display of buffer within
the current window. By default, it is displayed according to the setting of
`hpath:display-where'."
(if (bufferp buffer) (setq buffer (buffer-name buffer)))
(if (null buffer) (setq buffer (buffer-name (current-buffer))))
(let ((hkey-org-help (and (stringp buffer) (string-match "\\`\\*Org Help\\*" buffer)))
(when (bufferp buffer)
(setq buffer (buffer-name buffer)))
(when (null buffer)
(setq buffer (buffer-name (current-buffer))))
(let ((hkey-org-help (and (stringp buffer)
(string-match "\\`\\*Org Help\\*" buffer)))
(owind (selected-window)))
(and (stringp buffer)
(string-match "^\\*Help\\|Help\\*$" buffer)
(not (memq t (mapcar (lambda (wind)
(string-match
"^\\*Help\\|Help\\*$"
(buffer-name (window-buffer wind))))
(hypb:window-list 'no-mini))))
(null (seq-filter (lambda (wind)
(string-match-p
"^\\*Help\\|Help\\*$"
(buffer-name (window-buffer wind))))
;; Windows in selected frame only
(hypb:window-list 'no-mini)))
(setq hkey--wconfig (current-window-configuration)))
(unwind-protect
(let* ((buf (get-buffer-create buffer))
;; Help-mode calls with-temp-buffer which invokes one of these hooks
;; which calls hkey-help-show again, so nullify them before
;; displaying the buffer.
;; Help-mode calls `with-temp-buffer' which invokes one of
;; these hooks which calls `hkey-help-show' again, so nullify
;; them before displaying the buffer.
(temp-buffer-show-hook)
(temp-buffer-show-function)
(wind (cond (current-window
Expand All @@ -1402,7 +1407,7 @@ the current window. By default, it is displayed according to the setting of
;; Ignore org-mode's temp help buffers which it handles on its own.
(when (and wind (not hkey-org-help))
(setq minibuffer-scroll-window wind)
;; Don't use help-mode in buffers already set up with a
;; Don't use `help-mode' in buffers already set up with a
;; quit-key to bury the buffer, e.g. minibuffer completions,
;; as this will sometimes disable default left mouse key item
;; selection.
Expand All @@ -1411,7 +1416,8 @@ the current window. By default, it is displayed according to the setting of
(when (string-match "^\\*Help\\|Help\\*$" (buffer-name))
(help-mode))
(when (derived-mode-p 'help-mode)
(local-set-key "q" #'hkey-help-hide)))))
(local-set-key "q" #'hkey-help-hide)
(local-set-key "?" #'hkey-help-hide)))))
;; If in an *Org Help* buffer, reselect the Org buffer.
(when hkey-org-help
(select-window owind))
Expand Down
8 changes: 4 additions & 4 deletions hsys-denote.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: 14-Jul-26 at 17:00:54 by Mats Lidell
;; Last-Mod: 12-Aug-26 at 12:35:19 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -150,8 +150,8 @@ denote link."

(defact link-to-denote (id-and-section &optional file)
"Display a denote entry given by ID-AND-SECTION and optional FILE.
ID-AND-SECTION optionally may be prefixed with \"denote:\" or \"dn:\" and
may be suffixed with:
ID-AND-SECTION optionally may be prefixed with \"denote:\" and may be
suffixed with:

1. #section or ::*section, where section is any exact match to a denote
in-file heading;
Expand Down Expand Up @@ -179,7 +179,7 @@ and ID-AND-SECTION or FILE is not found, trigger an error."
(hypb:error "(link-to-denote): File is unreadable: \"%s\""
file))
(if (stringp id-and-section)
;; Remove any "denote:" or "dn:" prefix
;; Remove any "denote:" prefix
(let ((file-id (denote-extract-id-from-string id-and-section))
(section (when (and (string-match (hys-denote-get-link-regexp)
id-and-section)
Expand Down
Loading
Loading