diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-15 02:22:06 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-15 02:22:06 -0500 |
| commit | 461e07277fdb491ccc490b5e232fa8d2b16639e0 (patch) | |
| tree | 9a6cec6c647719796412d09918f4c0cca66d38c7 /modules | |
| parent | f47ac3625aa42b0ba531e540e8b2be7b46ecc85b (diff) | |
| download | dotemacs-461e07277fdb491ccc490b5e232fa8d2b16639e0.tar.gz dotemacs-461e07277fdb491ccc490b5e232fa8d2b16639e0.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.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/custom-buffer-file.el b/modules/custom-buffer-file.el index d8ce6beea..e3fdedf2f 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 |
