From b4039017e468f310c99c04810f010b5ceada07e1 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 15 May 2026 02:22:06 -0500 Subject: fix(custom-buffer-file): Info dispatcher returns full org bracket link The Info-mode entry in cj/buffer-source-functions copied the bare target string info:(manual)Node. Per the task body that introduced the dispatcher, the intended output is the labeled org-link form [[info:(manual)Node][(manual) Node]] -- a paste into notes lands as a clickable link with a human-readable label, not a bare URI. The label uses (manual) Node so the manual name and node name are both grep-friendly in note files. Existing test on a compressed .info.gz file now asserts the bracket form. Added a boundary test for an uncompressed .info file (the other branch of the suffix-stripping logic) so both compression shapes are locked in. --- modules/custom-buffer-file.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/custom-buffer-file.el b/modules/custom-buffer-file.el index d8ce6bee..e3fdedf2 100644 --- a/modules/custom-buffer-file.el +++ b/modules/custom-buffer-file.el @@ -239,7 +239,12 @@ When called interactively, prompts for confirmation if target file exists." (node Info-current-node)) (when (and (not (string-empty-p manual)) (not (string-empty-p node))) - (format "info:(%s)%s" manual node))))))) + ;; Return the bracketed org link form so a + ;; paste into notes lands as a labeled, + ;; clickable link. Label uses "(manual) Node" + ;; for grep-friendliness. + (format "[[info:(%s)%s][(%s) %s]]" + manual node manual node))))))) "Alist mapping major-mode -> thunk returning the buffer's \"source\". Each thunk is called with no arguments and should return a string -- cgit v1.2.3