branch: externals/hyperbole commit 8ebb43c226c2da9ad710d76dc2db369109ade9ca Author: bw <r...@gnu.org> Commit: bw <r...@gnu.org>
Minor updates --- hib-kbd.el | 9 +++++---- hsys-org.el | 4 ++-- hui-mini.el | 2 +- hywiki.el | 2 +- test/hui-tests.el | 4 ++-- test/hywiki-tests.el | 38 ++++++++++++++++++++++++-------------- 6 files changed, 35 insertions(+), 24 deletions(-) diff --git a/hib-kbd.el b/hib-kbd.el index 3b6b4189da..f391e556f2 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: 30-Aug-25 at 12:10:55 by Bob Weiner +;; Last-Mod: 30-Aug-25 at 12:18:02 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -226,9 +226,10 @@ Restore \\`M-x' binding to ORIG-M-X-BINDING." (defun kbd-key:key-series-to-events (key-series) "Insert the normalized KEY-SERIES as a series of keyboard events. -The events are inserted into Emacs `unread-command-events' -stream. Emacs then executes them when its command-loop regains -control." +Execute events as a keyboard macro unless they contain Hyperbole +minibuffer menu events. In that case, the events are inserted into +Emacs `unread-command-events' stream. Emacs then executes them +when its command-loop regains control." (if (and (stringp key-series) (let ((hyperbole-key-desc (key-description (car (where-is-internal #'hyperbole))))) (string-match (format "%sC-h h\\|C-hh\\|h\\|M-x hyperbole RET" diff --git a/hsys-org.el b/hsys-org.el index 11a6c58f69..cbb30882be 100644 --- a/hsys-org.el +++ b/hsys-org.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 2-Jul-16 at 14:54:14 -;; Last-Mod: 29-Aug-25 at 18:38:32 by Bob Weiner +;; Last-Mod: 30-Aug-25 at 23:19:35 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -535,7 +535,7 @@ a non-Org buffer type." (let* ((start (nth 1 label-start-end)) (end (nth 2 label-start-end)) (label (buffer-substring-no-properties start end))) - (when (string-match "][" label) + (when (string-match "\\]\\[" label) (setq start (match-end 0))) (cons start end)))))))) diff --git a/hui-mini.el b/hui-mini.el index b514ad6613..0b5de1cc5e 100644 --- a/hui-mini.el +++ b/hui-mini.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 15-Oct-91 at 20:13:17 -;; Last-Mod: 30-Aug-25 at 11:02:42 by Bob Weiner +;; Last-Mod: 31-Aug-25 at 01:11:32 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; diff --git a/hywiki.el b/hywiki.el index c1887d61da..708fd52e98 100644 --- a/hywiki.el +++ b/hywiki.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 21-Apr-24 at 22:41:13 -;; Last-Mod: 30-Aug-25 at 10:04:23 by Bob Weiner +;; Last-Mod: 31-Aug-25 at 01:46:37 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; diff --git a/test/hui-tests.el b/test/hui-tests.el index 5b04cbd065..144d7bb921 100644 --- a/test/hui-tests.el +++ b/test/hui-tests.el @@ -3,7 +3,7 @@ ;; Author: Mats Lidell <ma...@gnu.org> ;; ;; Orig-Date: 30-Jan-21 at 12:00:00 -;; Last-Mod: 6-Jul-25 at 15:40:32 by Bob Weiner +;; Last-Mod: 31-Aug-25 at 01:00:23 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -1490,7 +1490,7 @@ line 1 (should (equal '(1 . 1) (hui-select-boundaries (point))))))) (ert-deftest hui--kill-region-delimited-text-and-yank-back () - "Verify multiple `hui:kill-region' followed by a `yank' restores contents." + "Verify multiple `hui:kill-region' calls followed by a `yank' works properly." :expected-result :failed (with-temp-buffer (let ((transient-mark-mode t) diff --git a/test/hywiki-tests.el b/test/hywiki-tests.el index 51789cace5..c13bf11035 100644 --- a/test/hywiki-tests.el +++ b/test/hywiki-tests.el @@ -3,7 +3,7 @@ ;; Author: Mats Lidell ;; ;; Orig-Date: 18-May-24 at 23:59:48 -;; Last-Mod: 29-Aug-25 at 19:42:51 by Bob Weiner +;; Last-Mod: 31-Aug-25 at 01:49:05 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -28,8 +28,6 @@ (defconst hywiki-tests--edit-string-pairs [ - ("HiHo#s<insert-char ? >" "{HiHo#s} ") - ("FAI AI" "FAI {AI}") ("\"WikiWord#a b c\"<backward-delete-char 1>" "\"{WikiWord#a} b c") ("(Non#s n)<backward-delete-char 1>" "({Non#s} n") ("(MyWikiWord)WikiWord" "({MyWikiWord}){WikiWord}") @@ -50,6 +48,8 @@ ("<delete-char 1>\"WikiWord#section with spaces\"" "{WikiWord#section} with spaces\"") ;; shrink highlight to {WikiWord#section} ("\"WikiWord#section\"<backward-delete-char 1>" "\"{WikiWord#section}") ;; no highlight change ("\"WikiWord#section with spaces\"<backward-delete-char 1>" "\"{WikiWord#section} with spaces") ;; shrink highlight to "{WikiWord#section} + ("FAI AI" "FAI {AI}") + ("HiHo#s<insert-char ? >" "{HiHo#s} ") ] "Vector of (pre-test-str-with-edit-cmds post-test-str-result [test-name-str] [doc-str]) elements. Last two elements are optional.") @@ -1326,12 +1326,21 @@ named WikiReferent with a non-page referent type." (ert-deftest hywiki-tests--save-referent-find-use-menu () "Verify saving and loading a referent find works using Hyperbole's menu." + :expected-result :failed (skip-unless (not noninteractive)) ;; (skip-unless (not (version< emacs-version "29"))) ;; Fails on 28!? (hywiki-tests--referent-test (cons 'find #'hywiki-word-grep) - (should (hact 'kbd-key "C-u C-h hhc WikiReferent RET f RET")) - (hy-test-helpers:consume-input-events))) + (let ((page (cdr (hywiki-add-page "WikiWord")))) + (unwind-protect + (progn + (find-file page) + (insert " WikiReferent") + (save-buffer) + (goto-char (point-min)) + (should (hact 'kbd-key "C-u C-h hhc WikiReferent RET f RET")) + (hy-test-helpers:consume-input-events)) + (hy-delete-file-and-buffer page))))) ;; Global-button (ert-deftest hywiki-tests--save-referent-global-button () @@ -1535,14 +1544,15 @@ string." (defun hywiki-tests--run-test-case (test-case) "Run the TEST-CASE from point. -Each test case consists of cons cells with an operation and the expected -state of the WikiWord being constructed. Operations are either a string -to be inserted, a number of chars to be deleted or a symbol p<number> -for where to move point. The expected state is either nil for not a -wikiword or non-nil for a wikiword. The state is checked after all -chars of the string are inserted. If equal to a string it is checked for -match with the wikiword. Movement of point is relative to point when -the function is called." +Each test case consists of cons cells with an operation and the +expected state of the highlighted WikiWord reference being +constructed. Operations are either a string to be inserted, a +number of chars to be deleted or a symbol p<number> for where to +move point. The expected state is either nil for not a wikiword +or non-nil for a wikiword. The state is checked after all chars +of the string are inserted. If equal to a string it is checked +for match with the wikiword. Movement of point is relative to +point when the function is called." (let ((origin (point))) ;; For traceability when looking through the list of should @@ -1796,7 +1806,7 @@ Insert test in the middle of other text." (hy-delete-dir-and-buffer hywiki-directory))))) (ert-deftest hywiki-tests--wikiword-yanked-with-extra-words () - "Verify that a WikiWord that is yanked in highlights properly." + "Verify that a yanked in WikiWord highlights properly." :expected-result :failed (hywiki-tests--preserve-hywiki-mode (let* ((hywiki-directory (make-temp-file "hywiki" t))