<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/modules/org-webclipper.el, branch main</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-05-25T22:51:17+00:00</updated>
<entry>
<title>fix(org): guard external-tool assumptions in export and publishing commands</title>
<updated>2026-05-25T22:51:17+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-25T22:51:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=d665582d6fc19c15a772c6ec24ff822e7e3c37f9'/>
<id>urn:sha1:d665582d6fc19c15a772c6ec24ff822e7e3c37f9</id>
<content type='text'>
Four export/publishing commands shelled out to external tools without checking they exist, so a missing tool surfaced as an opaque process error — or, for reveal.js, a silently broken presentation. I added a command-time guard to each that names the tool and what's needed:

- zathura, in the pandoc PDF export-and-open command
- the hugo binary and the platform file-manager opener, in hugo-config
- the local reveal.js checkout (run scripts/setup-reveal.sh), shared by the reveal export and preview commands
- pandoc, in the web-clip protocol handler

The checks run only when the command runs, so startup stays quiet. Each guard has a test asserting the user-error fires when the tool is absent, and the existing happy-path tests now stub the lookups so they exercise the real path rather than tripping the new guard.
</content>
</entry>
<entry>
<title>docs(load-graph): classify Org modules</title>
<updated>2026-05-24T21:34:16+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-24T21:34:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=02baa68063f02cc571789c03b1101c28d139200d'/>
<id>urn:sha1:02baa68063f02cc571789c03b1101c28d139200d</id>
<content type='text'>
Seventh classification batch: the thirteen Org modules — config, agenda, babel, capture, contacts, drill, export, noter, refile, reveal, roam, webclipper, hugo. I annotated each header, added a Batch 7 table to the inventory, and extended the validation allowlist. 65 of 102 modules are now classified.

The daily workflows (config, agenda, capture, refile, roam) keep their eager reason per the spec's Phase 6 target. Babel and contacts move to after-load; export, reveal, drill, noter, webclipper, and hugo become command-loaded. The agenda and refile idle-timer caches are recorded as the side effects the spec already tracks for cache-lifecycle work. No new hidden dependencies.
</content>
</entry>
<entry>
<title>refactor(webclipper): scope clip URL/title to dynamic bindings</title>
<updated>2026-05-24T12:12:29+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-24T12:12:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=6dfc41af54551bf1fe13af6e1aae6e1e864060c0'/>
<id>urn:sha1:6dfc41af54551bf1fe13af6e1aae6e1e864060c0</id>
<content type='text'>
org-webclipper passed the org-protocol URL and title through globals cj/webclip-current-url / cj/webclip-current-title: the protocol handler setq them, and the "W" capture template plus its handler read them, with the handler clearing them afterward. An aborted or erroring capture left the stale values for the next clip.

Renamed them to cj/--webclip-url / cj/--webclip-title and let-bind them around the org-capture call in the protocol entry point instead of mutating globals. The template %(identity ...) forms and the handler run within that dynamic extent, so they see the values while the capture runs, and an abort/error unwinds the binding automatically — no stale state, no manual clear. This mirrors the quick-video-capture fix. Tests updated to the new contract: URL/title visible during the capture, nothing left bound after, and an aborted capture leaves no stale state.
</content>
</entry>
<entry>
<title>refactor(org-workflow): four hygiene fixes from the module-by-module re-review</title>
<updated>2026-05-16T08:45:29+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-16T08:45:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=a005c7636f30b710e27a6812ca989506d5df7531'/>
<id>urn:sha1:a005c7636f30b710e27a6812ca989506d5df7531</id>
<content type='text'>
- org-roam-config.el: extract `cj/--org-roam-should-copy-completed-task-p'
  and gate the `org-after-todo-state-change-hook' on it.  Skips
  fileless buffers (org-capture, indirect, temp Org) where
  `buffer-file-name' is nil and the downstream copy used to crash.
  Same gcal.org skip preserved.  Five existing tests updated to
  bind `buffer-file-name' inside `run-hooks' so the positive-case
  hook still fires.

- org-webclipper.el: drop the redundant
  `org-protocol-protocol-alist' registration inside
  `cj/webclipper-ensure-initialized'.  The
  `with-eval-after-load 'org-protocol' block at the bottom of the
  module is the single registration site now; comment in the
  initializer explains why.  Split the matching test into two:
  one for template registration (the initializer's actual job) and
  one for protocol registration (which now fires from the
  after-load block when `org-protocol' provides).

- org-webclipper.el: validate `:url' and `:title' in
  `cj/org-protocol-webclip'.  `:url' must be a non-empty string;
  `:title' must be a string when provided.  Signals `user-error'
  with the unexpected value instead of silently setting the
  globals to nil and failing downstream in the capture handler.

- mu4e-org-contacts-integration.el: declare `contacts-file' (via
  `eval-when-compile (defvar ...)') and `cj/get-all-contact-emails'
  (via `declare-function') near the top of the file.  Byte-compile
  in isolation no longer warns about free variables / unknown
  functions; the cross-module dependency is explicit at the top.
</content>
</entry>
<entry>
<title>refactor(org-webclipper): use setq, not setopt, for pandoc sleep time</title>
<updated>2026-05-15T07:31:53+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-15T07:31:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=1e59e346ab7e15c07e3b176cefaa92dbadb53c27'/>
<id>urn:sha1:1e59e346ab7e15c07e3b176cefaa92dbadb53c27</id>
<content type='text'>
`org-web-tools-pandoc-sleep-time' is a plain float with no
custom-set handler that needs to fire.  `setopt' adds the entire
customize-variable validation machinery -- which, lazily, depends on
wid-edit being loaded.

The handler's tests stub `require' so org-web-tools never really
loads, then mock `setopt' via `cl-letf' on the function cell.  That
mock has no effect on byte-compiled code because `setopt' is a
macro: the production handler has already expanded to a call into
`setopt--set'.  When `setopt--set' runs, it walks into the customize
machinery and hits an unbound `widget-field-keymap' (wid-edit not
loaded), and the test fails with a confusing wrong-type-argument.

`setq' has identical runtime effect for this variable and dodges
the customize machinery entirely.  Tests now pass without contorted
mocking.
</content>
</entry>
<entry>
<title>feat:org-webclipper: Add smart heading adjustment</title>
<updated>2025-10-27T03:57:53+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-27T03:57:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=f0fea8e35e42e9769a9019fa02a1651ec5e7dcc6'/>
<id>urn:sha1:f0fea8e35e42e9769a9019fa02a1651ec5e7dcc6</id>
<content type='text'>
Introduce `cj/--process-webclip-content` to enhance webclip
processing by removing the first heading and demoting subsequent
headings, preserving page structure. Includes tests for thorough
validation of the new functionality.
</content>
</entry>
<entry>
<title>fix:webclipper:fixed org-web-tools not loading when needed</title>
<updated>2025-10-27T01:51:30+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-27T01:51:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=043b854543132bd4795991e56af8d93783a1a60f'/>
<id>urn:sha1:043b854543132bd4795991e56af8d93783a1a60f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>maint: org-roam: moved org-branch-to-org-roam-node from webclipper</title>
<updated>2025-10-18T07:00:53+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-18T07:00:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=a30f04704b54a45b712c0a8ed4688b3832e0e6d7'/>
<id>urn:sha1:a30f04704b54a45b712c0a8ed4688b3832e0e6d7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>no need to define keymap for webclipper</title>
<updated>2025-10-15T18:31:43+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-15T18:31:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=effac52334274ea36d4e5b1eed22273627b628e8'/>
<id>urn:sha1:effac52334274ea36d4e5b1eed22273627b628e8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: webclipper): Add web clipping with org-protocol integration</title>
<updated>2025-10-13T04:20:40+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-13T04:20:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=26e8fb614ac2c5f872b0d8bdc14bd83de5361669'/>
<id>urn:sha1:26e8fb614ac2c5f872b0d8bdc14bd83de5361669</id>
<content type='text'>
- Reworked the org-webclipper.el module to support a "fire-and-forget" workflow using org-protocol and org-web-tools.
- Added feature to handle web clipping directly from the browser with a bookmarklet, converting content to Org format using Pandoc.
- New functions ensure lazy loading of necessary packages and setup of capture templates.
- Enhanced keymap setup to integrate with custom keymaps, facilitating easier user interaction.
</content>
</entry>
</feed>
