<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-custom-buffer-file-copy-buffer-source.el, branch load-graph-classify-start</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-start</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-start'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-05-15T07:22:06+00:00</updated>
<entry>
<title>fix(custom-buffer-file): Info dispatcher returns full org bracket link</title>
<updated>2026-05-15T07:22:06+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-15T07:22:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=b4039017e468f310c99c04810f010b5ceada07e1'/>
<id>urn:sha1:b4039017e468f310c99c04810f010b5ceada07e1</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>feat(custom-buffer-file): extend buffer-source dispatch to mu4e and Info</title>
<updated>2026-05-15T05:54:01+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-15T05:54:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=d797b7ad5d6af70d7d1ab082f824df07cf5bd536'/>
<id>urn:sha1:d797b7ad5d6af70d7d1ab082f824df07cf5bd536</id>
<content type='text'>
Add two dispatchers to cj/buffer-source-functions so C-; b p yields a
useful link form in two more major modes.

mu4e-view-mode returns "mu4e:msgid:&lt;id&gt;" so the result pastes into org
as a clickable link and matches mu4e's own org-protocol handler.
Falls through to buffer-file-name when point isn't on a real message.

Info-mode returns "info:(manual)node" -- the form org-info-store-link
produces.  file-name-base only strips one extension, so a compressed
"emacs.info.gz" comes back as "emacs.info"; trim the trailing ".info"
to get the bare manual name.  Falls through when Info hasn't populated
its current-file / current-node vars yet.

Tests cover normal + boundary fallthrough for each new mode.
</content>
</entry>
<entry>
<title>feat(custom-buffer-file): make C-; b p dispatch by major-mode, with tests</title>
<updated>2026-05-15T05:23:14+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-15T05:23:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=e3e904b33ed714d74fae01ae1b631d889b39003b'/>
<id>urn:sha1:e3e904b33ed714d74fae01ae1b631d889b39003b</id>
<content type='text'>
Old behavior: `C-; b p' called `cj/copy-path-to-buffer-file-as-kill',
which only worked in file-visiting buffers and errored otherwise.
That meant the most useful "give me a clickable handle on this
buffer" key did nothing in eww, elfeed, dired (file-at-point ≠
buffer's default-directory), and other browsing-shaped modes.

Replace with a `major-mode'-aware dispatch:

- `cj/buffer-source-functions' alist maps major-mode → thunk
  returning a string (or nil to fall through).
- `cj/copy-buffer-source-as-kill' looks up the current mode,
  calls the thunk, falls back to `buffer-file-name', errors only
  when both yield nil.
- `cj/copy-path-to-buffer-file-as-kill' kept as a `defalias' for
  backwards compat (the old name is referenced in adjacent tests).

First-batch dispatches:
- eww-mode         -&gt; (eww-current-url)
- elfeed-show-mode -&gt; (elfeed-entry-link elfeed-show-entry)
- dired-mode       -&gt; (dired-get-filename nil t)
- dirvish-mode     -&gt; same
- doc-view / pdf-view: covered by the buffer-file-name fallback
  (they already set buffer-file-name correctly).

10 new ERT tests cover the dispatch paths, the
buffer-file-name fallback, the user-error on nil source, the alias
target, and the `C-; b p' keymap entry.

which-key label flipped from "copy file path" to "copy buffer
source" to match.

Deferred to a follow-up task: mu4e-view-mode, org-mode at a
heading, help-mode, Info-mode, magit-log/commit/status, xref/grep/
compilation, image-mode, archive-mode -- each needs a format
decision before implementation.
</content>
</entry>
</feed>
