Skip to content

Commit e54e99d

Browse files
authored
Merge pull request #979 from rswgnu/rsw
2 parents 36c8858 + 32c13ae commit e54e99d

4 files changed

Lines changed: 42 additions & 17 deletions

File tree

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
2026-06-16 Bob Weiner <rsw@gnu.org>
22

3+
* test/demo-tests.el (fast-demo-display-kotl-starting-from-cell): Fix to
4+
erase viespec modification to "kotl/EXAMPLE.kotl" which test was leaving.
5+
6+
* hsys-activities.el: Improve documentation.
7+
8+
* hui.el (hui:ebut-message, hui:ibut-message): Fix 'actype' setting so
9+
it never ends up nil.
10+
311
* hsys-org.el (hsys-org-link-at-p): Rewrite to handle non-delimited Org links,
412
such as: file:my-file::my-text. Leave file:// links for www-url ibtype
513
by using 'hpath:www-at-p' test as Org url test will match to this:

hsys-activities.el

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;; Author: Mats Lidell
44
;;
55
;; Orig-Date: 7-Dec-25 at 22:48:29
6-
;; Last-Mod: 2-Jan-26 at 21:31:06 by Bob Weiner
6+
;; Last-Mod: 16-Jun-26 at 18:32:44 by Bob Weiner
77
;;
88
;; SPDX-License-Identifier: GPL-3.0-or-later
99
;;
@@ -14,13 +14,19 @@
1414

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

2531
;;; Code:
2632

hui.el

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;; Author: Bob Weiner
44
;;
55
;; Orig-Date: 19-Sep-91 at 21:42:03
6-
;; Last-Mod: 5-Jun-26 at 07:58:00 by Bob Weiner
6+
;; Last-Mod: 16-Jun-26 at 17:51:27 by Bob Weiner
77
;;
88
;; SPDX-License-Identifier: GPL-3.0-or-later
99
;;
@@ -1693,7 +1693,9 @@ from the button that point is within."
16931693
With BUT-EDIT-FLAG non-nil message about ebut being edited."
16941694
(let ((actype (symbol-name (hattr:get 'hbut:current 'actype)))
16951695
(args (hattr:get 'hbut:current 'args)))
1696-
(setq actype (actype:def-symbol actype))
1696+
(setq actype (or (actype:def-symbol (actype:elisp-symbol actype))
1697+
(when (symbolp actype)
1698+
actype)))
16971699
(message "%s%s%s %s %S"
16981700
ebut:label-start
16991701
(hbut:key-to-label (hattr:get 'hbut:current 'lbl-key))
@@ -1944,7 +1946,9 @@ within."
19441946
With BUT-EDIT-FLAG non-nil message about ibut being edited."
19451947
(let ((actype (symbol-name (hattr:get 'hbut:current 'actype)))
19461948
(args (hattr:get 'hbut:current 'args)))
1947-
(setq actype (actype:def-symbol actype))
1949+
(setq actype (or (actype:def-symbol (actype:elisp-symbol actype))
1950+
(when (symbolp actype)
1951+
actype)))
19481952
(message "%s%s%s %s %S"
19491953
ibut:label-start
19501954
(hbut:key-to-label (hattr:get 'hbut:current 'lbl-key))

test/demo-tests.el

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;; Author: Mats Lidell <matsl@gnu.org>
44
;;
55
;; Orig-Date: 30-Jan-21 at 12:00:00
6-
;; Last-Mod: 16-Mar-26 at 00:16:06 by Bob Weiner
6+
;; Last-Mod: 16-Jun-26 at 22:09:58 by Bob Weiner
77
;;
88
;; SPDX-License-Identifier: GPL-3.0-or-later
99
;;
@@ -807,12 +807,19 @@ enough files with matching mode loaded."
807807
(insert (format "<%skotl/EXAMPLE.kotl#3b10|c2en>"
808808
default-directory))
809809
(goto-char 5)
810-
(action-key)
811-
(setq buf (current-buffer))
812-
(should (string-suffix-p "EXAMPLE.kotl" buffer-file-name))
813-
(should (looking-at-p "Cell Transposition:"))
814-
;; Ensure visible cell length is cutoff at 2 lines
815-
(should (= 2 (hypb:string-count-matches "\n" (kcell-view:contents)))))))
810+
(unwind-protect
811+
(progn (action-key)
812+
(setq buf (current-buffer))
813+
(should (string-suffix-p "EXAMPLE.kotl" buffer-file-name))
814+
(should (looking-at-p "Cell Transposition:"))
815+
;; Ensure visible cell length is cutoff at 2 lines
816+
(should (= 2 (hypb:string-count-matches
817+
"\n" (kcell-view:contents)))))
818+
;; Restore kotl/EXAMPLE.kotl to its original viewspec and kill the
819+
;; buffer so it is unchanged.
820+
(kvspec:activate "ben")
821+
(set-buffer-modified-p nil)
822+
(kill-buffer (current-buffer))))))
816823

817824
(provide 'demo-tests)
818825

0 commit comments

Comments
 (0)