<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-org-noter-config--preferred-split.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-04-30T14:13:53+00:00</updated>
<entry>
<title>test(org-noter-config): cover preferred-split, slug, template, predicates</title>
<updated>2026-04-30T14:13:53+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-30T13:33:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=eaf3848e7893326f2ddaaab23633106e0afe8fd8'/>
<id>urn:sha1:eaf3848e7893326f2ddaaab23633106e0afe8fd8</id>
<content type='text'>
Four new test files for the pure-and-near-pure helpers in
org-noter-config.el. The interactive heavyweights (cj/org-noter-start,
cj/org-noter-insert-note-dwim, cj/org-noter--toggle-notes-window,
cj/org-noter--find-notes-file, cj/org-noter--create-notes-file) are
out of scope for this pass — they need org-noter loaded and a real
session, or a substantial internal/wrapper split before they can be
tested without spinning up real PDFs and EPUBs.

- preferred-split: 5 tests walking the 1.4 width-to-height threshold
  from both sides plus a square-frame boundary.
- title-to-slug: 7 tests covering multi-word, single-word, mixed
  punctuation, leading/trailing junk, collapsed runs, digits, and
  empty input.
- generate-notes-template: 5 tests with org-id-uuid mocked, asserting
  the rendered template carries the UUID, the dual ROAM_REFS /
  NOTER_DOCUMENT pointers, the title-and-category lines, the
  ReadingNotes filetag, and the trailing Notes heading.
- predicates: 13 tests covering cj/org-noter--in-document-p,
  cj/org-noter--in-notes-file-p, cj/org-noter--session-active-p,
  cj/org-noter--get-document-path, and cj/org-noter--extract-document-title.
  Mocks derived-mode-p, org-entry-get, and buffer-file-name at the
  boundary so the suite doesn't require pdf-tools or nov.

The require chain in each test file is user-constants → keybindings →
org-noter-config because cj/org-noter-notes-directory captures
roam-dir from user-constants and the prefix-map binding at the bottom
of org-noter-config references cj/custom-keymap.

30 new tests, all passing. Full suite green.
</content>
</entry>
</feed>
