Skip to content
Merged
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
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
2026-06-16 Bob Weiner <rsw@gnu.org>

* test/demo-tests.el (fast-demo-display-kotl-starting-from-cell): Fix to
erase viespec modification to "kotl/EXAMPLE.kotl" which test was leaving.

* hsys-activities.el: Improve documentation.

* hui.el (hui:ebut-message, hui:ibut-message): Fix 'actype' setting so
it never ends up nil.

* hsys-org.el (hsys-org-link-at-p): Rewrite to handle non-delimited Org links,
such as: file:my-file::my-text. Leave file:// links for www-url ibtype
by using 'hpath:www-at-p' test as Org url test will match to this:
Expand Down
20 changes: 13 additions & 7 deletions hsys-activities.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Mats Lidell
;;
;; Orig-Date: 7-Dec-25 at 22:48:29
;; Last-Mod: 2-Jan-26 at 21:31:06 by Bob Weiner
;; Last-Mod: 16-Jun-26 at 18:32:44 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand All @@ -14,13 +14,19 @@

;;; Commentary:
;;
;; Use as action button <hsys-activity "Activity">
;; The 'activities' package persistently saves and restores window
;; configurations as well as tab and frame configurations.
;;
;; Create "Activity" if it does not exist. If "Activity" is not
;; active, switch to its latest state. If "Activity" is active,
;; revert it to its default state. If "Activity" is active and the
;; action button is called with a prefix argument a new default state
;; is set.
;; This library defines a single function, hsys-activities, that can be used
;; as an action button to interface the `activities' package for use
;; with Hyperbole. Adding the action button:
;; <hsys-activities "Activity">
;; to any text achieves the following:
;; 1. If "Activity" does not exist, create it.
;; 2. If "Activity" is not active, switch to its latest saved state.
;; 3. If "Activity" is active, revert to its default state.
;; 4. If "Activity" is active and the action button is called with
;; a prefix argument, a new default state is set.

;;; Code:

Expand Down
10 changes: 7 additions & 3 deletions hui.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 21:42:03
;; Last-Mod: 5-Jun-26 at 07:58:00 by Bob Weiner
;; Last-Mod: 16-Jun-26 at 17:51:27 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -1693,7 +1693,9 @@ from the button that point is within."
With BUT-EDIT-FLAG non-nil message about ebut being edited."
(let ((actype (symbol-name (hattr:get 'hbut:current 'actype)))
(args (hattr:get 'hbut:current 'args)))
(setq actype (actype:def-symbol actype))
(setq actype (or (actype:def-symbol (actype:elisp-symbol actype))
(when (symbolp actype)
actype)))
(message "%s%s%s %s %S"
ebut:label-start
(hbut:key-to-label (hattr:get 'hbut:current 'lbl-key))
Expand Down Expand Up @@ -1944,7 +1946,9 @@ within."
With BUT-EDIT-FLAG non-nil message about ibut being edited."
(let ((actype (symbol-name (hattr:get 'hbut:current 'actype)))
(args (hattr:get 'hbut:current 'args)))
(setq actype (actype:def-symbol actype))
(setq actype (or (actype:def-symbol (actype:elisp-symbol actype))
(when (symbolp actype)
actype)))
(message "%s%s%s %s %S"
ibut:label-start
(hbut:key-to-label (hattr:get 'hbut:current 'lbl-key))
Expand Down
21 changes: 14 additions & 7 deletions test/demo-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date: 30-Jan-21 at 12:00:00
;; Last-Mod: 16-Mar-26 at 00:16:06 by Bob Weiner
;; Last-Mod: 16-Jun-26 at 22:09:58 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -807,12 +807,19 @@ enough files with matching mode loaded."
(insert (format "<%skotl/EXAMPLE.kotl#3b10|c2en>"
default-directory))
(goto-char 5)
(action-key)
(setq buf (current-buffer))
(should (string-suffix-p "EXAMPLE.kotl" buffer-file-name))
(should (looking-at-p "Cell Transposition:"))
;; Ensure visible cell length is cutoff at 2 lines
(should (= 2 (hypb:string-count-matches "\n" (kcell-view:contents)))))))
(unwind-protect
(progn (action-key)
(setq buf (current-buffer))
(should (string-suffix-p "EXAMPLE.kotl" buffer-file-name))
(should (looking-at-p "Cell Transposition:"))
;; Ensure visible cell length is cutoff at 2 lines
(should (= 2 (hypb:string-count-matches
"\n" (kcell-view:contents)))))
;; Restore kotl/EXAMPLE.kotl to its original viewspec and kill the
;; buffer so it is unchanged.
(kvspec:activate "ben")
(set-buffer-modified-p nil)
(kill-buffer (current-buffer))))))

(provide 'demo-tests)

Expand Down