summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-15 02:22:06 -0500
committerCraig Jennings <c@cjennings.net>2026-05-15 02:22:06 -0500
commitb4039017e468f310c99c04810f010b5ceada07e1 (patch)
tree7bd669e00d504753c9a87b471fa594ee338c623b /modules
parentc551230df1cb644d1d97c34a7fbdf9e3d8ca8c78 (diff)
downloaddotemacs-b4039017e468f310c99c04810f010b5ceada07e1.tar.gz
dotemacs-b4039017e468f310c99c04810f010b5ceada07e1.zip
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.
Diffstat (limited to 'modules')
-rw-r--r--modules/custom-buffer-file.el7
1 files changed, 6 insertions, 1 deletions
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