Skip to content

Commit 6434f56

Browse files
committed
hui:link-possible-types - Fix CI/CD build error
Also, remove debugging 'message' call. hui--ibut-link-directly-to-dired - Handle non-readable input such as <ilink:...>.
1 parent 40a1f33 commit 6434f56

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

ChangeLog

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2023-11-06 Bob Weiner <[email protected]>
2+
3+
* hui.el (hui:link-possible-types): Fix CI/CD build error where
4+
ilink was inserted when pathname was expected due to batch
5+
diff when referent is in dired-mode. Fix to skip button type
6+
clauses it this case.
7+
test/hui-tests.el (hui--ibut-link-directly-to-dired): Check that
8+
looking at a string before trying to (read (current-buffer));
9+
otherwise, 'read' will fail.
10+
111
2023-11-05 Bob Weiner <[email protected]>
212

313
* test/hyrolo-tests.el (hyrolo-demo-show-overview): Fix by adding

hui.el

+4-3
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: 6-Nov-23 at 19:16:42 by Bob Weiner
6+
;; Last-Mod: 6-Nov-23 at 19:36:33 by Bob Weiner
77
;;
88
;; SPDX-License-Identifier: GPL-3.0-or-later
99
;;
@@ -1852,7 +1852,8 @@ Buffer without File link-to-buffer-tmp"
18521852

18531853
;; Next clause forces use of any ibut name in the link
18541854
;; and sets hbut:current button attributes.
1855-
(t (cond ((and (prog1 (setq hbut-sym (hbut:at-p))
1855+
(t (cond ((and (not (derived-mode-p 'dired-mode))
1856+
(prog1 (setq hbut-sym (hbut:at-p))
18561857
(save-excursion (ibut:at-to-name-p hbut-sym)))
18571858
(setq lbl-key (hattr:get hbut-sym 'lbl-key))
18581859
(eq (current-buffer) (get-file-buffer (gbut:file))))
@@ -1861,7 +1862,7 @@ Buffer without File link-to-buffer-tmp"
18611862
(list 'link-to-ebut lbl-key))
18621863
((and hbut-sym lbl-key)
18631864
;; On an implicit button, so link to it
1864-
(message "%S" (hattr:list hbut-sym))
1865+
;; (message "%S" (hattr:list hbut-sym))
18651866
(list 'link-to-ibut lbl-key (or buffer-file-name (buffer-name))))
18661867
((and (require 'bookmark)
18671868
(derived-mode-p 'bookmark-bmenu-mode)

test/hui-tests.el

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;; Author: Mats Lidell <[email protected]>
44
;;
55
;; Orig-Date: 30-Jan-21 at 12:00:00
6-
;; Last-Mod: 5-Nov-23 at 17:16:45 by Bob Weiner
6+
;; Last-Mod: 6-Nov-23 at 19:39:45 by Bob Weiner
77
;;
88
;; SPDX-License-Identifier: GPL-3.0-or-later
99
;;
@@ -806,7 +806,8 @@ With point on label suggest that ibut for rename."
806806
;; Implicit link should be the `dir' dired directory,
807807
;; possibly minus the final directory '/'.
808808
(goto-char (point-min))
809-
(should (string-prefix-p (read (current-buffer)) dir)))
809+
(should (and (looking-at "\"")
810+
(string-prefix-p (read (current-buffer)) dir))))
810811
(hy-delete-file-and-buffer file))))
811812

812813
(ert-deftest hui--ibut-link-directly-with-label ()

0 commit comments

Comments
 (0)