<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/modules/custom-line-paragraph.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-25T00:59:28+00:00</updated>
<entry>
<title>refactor(load-graph): route C-; registration through the keymap API</title>
<updated>2026-05-25T00:59:28+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-25T00:59:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=08014b2f15e099a1c5e662a17a41290f37aeebf4'/>
<id>urn:sha1:08014b2f15e099a1c5e662a17a41290f37aeebf4</id>
<content type='text'>
Migrated all 31 cj/custom-keymap registration sites across 24 modules from direct (keymap-set cj/custom-keymap ...) calls to cj/register-prefix-map and cj/register-command. Consumers no longer reference cj/custom-keymap directly, so keybindings.el is the sole owner of the C-; prefix and modules reach it only through the API (each already requires keybindings from Phase 2).

Behavior-preserving: I dumped every C-; binding before and after the migration and they're identical: 279 bindings, each resolving to the same command. The which-key label blocks are untouched, since they use string key descriptions and never assumed the keymap existed. I byte-compiled all 24 files (no new free-variable warnings, because the cj/custom-keymap references are gone), and make test, validate-modules, and an init load all pass.
</content>
</entry>
<entry>
<title>docs(load-graph): classify text/editing command modules</title>
<updated>2026-05-24T21:20:01+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-24T21:20:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=1dfd02da826d61d528fe42c5bee3c5dbcf098c82'/>
<id>urn:sha1:1dfd02da826d61d528fe42c5bee3c5dbcf098c82</id>
<content type='text'>
Second classification batch: the nine custom-* text/editing command helpers (case, comments, datetime, buffer-file, line-paragraph, misc, ordering, text-enclose, whitespace). I annotated each with the load-graph header contract and added a Batch 2 table to the inventory. They're all Layer 2, eager only to register a C-; submap at load, with no necessary eager reason, so all are Phase 3/4 deferral candidates.

The inventory records a second hidden dependency for Phase 2: custom-buffer-file guards its C-; b registration with (when (boundp 'cj/custom-keymap) ...) and declares the keymap only via eval-when-compile, so the binding silently drops when the module loads without keybindings.
</content>
</entry>
<entry>
<title>refactor(custom-editing): five hygiene fixes from the module-by-module re-review</title>
<updated>2026-05-16T07:48:18+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-16T07:48:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=a9a4d8c7148c115a242a7b35d16dd536f9c0c700'/>
<id>urn:sha1:a9a4d8c7148c115a242a7b35d16dd536f9c0c700</id>
<content type='text'>
- Guard `cj/duplicate-line-or-region' when COMMENT is non-nil but the
  current mode has no `comment-start' (e.g. fundamental-mode).
  Previously the function silently produced malformed output via
  `comment-region'; now it signals a clear `user-error'.

- Factor the `find-file' advice install in external-open.el into
  `cj/external-open-install-advice'.  Same idempotent shape
  (remove-then-add) but the intent is named.

- Add `cj/--validate-decoration-char' in custom-comments.el and
  wire it into all six divider / border / box helpers.  Rejects
  multi-char strings, empty strings, and control characters like
  newline/tab that would corrupt subsequent `M-q' flows.  Updated
  the five nil-decoration ERT tests from `:type 'wrong-type-argument'
  (the old crash signal from `string-to-char' on nil) to
  `:type 'user-error', since the validator produces a clear
  message instead of a deep crash.

- Extract `cj/--require-spell-checker' in flyspell-and-abbrev.el.
  Both `cj/flyspell-toggle' and `cj/flyspell-then-abbrev' now call
  the shared helper; the checker list lives in
  `cj/--spell-checker-executables', so adding nuspell or any other
  checker is a one-line edit.

- Preserve trailing newlines in custom-ordering output.  Both
  `cj/--arrayify' and `cj/--unarrayify' now detect a trailing
  newline on the input region and re-append it to the result,
  matching the pattern custom-text-enclose.el already uses.
</content>
</entry>
<entry>
<title>chore(modules): pass validate-modules in batch by adding requires</title>
<updated>2026-05-08T00:25:29+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-08T00:25:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=a41ef9774f6550da446a3ae8fbbcbcd5bf6c23c4'/>
<id>urn:sha1:a41ef9774f6550da446a3ae8fbbcbcd5bf6c23c4</id>
<content type='text'>
`make validate-modules` had 19 module-load failures, all the same shape: a module references a symbol or feature owned by another module without saying so. Production was fine because init.el orders requires correctly. The batch target loads each module in isolation, though, and surfaces the gap.

I added explicit `(require 'keybindings)` or `(require 'user-constants)` to each affected module. The requires are idempotent at runtime, so production load order is unchanged. For three optional packages (elpa-mirror, mu4e, org-contacts), I switched to `(require 'X nil t)` so the modules load cleanly when those packages aren't installed. The activation calls become no-ops in that case.

`make validate-modules` now reports 0 failures.
</content>
</entry>
<entry>
<title>fix(line-paragraph): join-line-or-region strands space on next line</title>
<updated>2026-05-03T11:56:10+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-03T11:56:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=6936f5b60b61dcf41cbda75813d7f259733eedf2'/>
<id>urn:sha1:6936f5b60b61dcf41cbda75813d7f259733eedf2</id>
<content type='text'>
The region branch's `(while (&lt; (point) end) (join-line 1))` ran one iteration too many. After the final in-region join, point sat just before the end marker, so the loop fired once more. That extra `join-line 1` consumed the next line's preceding newline and replaced it with a space. Then `(goto-char end)` + `(newline)` reinserted a newline at the original end position, before the inserted space, so the space ended up stranded at BOL of the next line.

I replaced the position-based loop with `count-lines` + `dotimes` to do exactly the right number of joins. I also swapped the trailing `(newline)` for `(forward-line 1)`. The bullet-list use case now lands directly on the next existing line with no blank gap.

The trailing-newline change ripples to `cj/join-paragraph` (which delegates here), so paragraphs now also stop adding a trailing newline when the input lacks one. `require-final-newline` handles file-end discipline on save anyway.

I added 3 new tests that fail against the old loop and pass against the fix. I also updated 11 existing tests whose assertions baked in the old trailing-newline behavior. While in there I wrapped the `cj/custom-keymap` defvar stub in `eval-and-compile` in both test files. The bare defvar wasn't evaluated at byte-compile time, so the `require` of `custom-line-paragraph` would hit a void symbol when the validate-el hook ran.
</content>
</entry>
<entry>
<title>feat:which-key: Add descriptive labels for custom keymaps</title>
<updated>2025-10-27T23:45:23+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-27T23:45:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=87034eab17625165b884128d8058c1158fc2f50f'/>
<id>urn:sha1:87034eab17625165b884128d8058c1158fc2f50f</id>
<content type='text'>
Enhance which-key integration by providing detailed descriptions for
new key bindings across multiple modules. This improves the
usability of custom keymaps by clarifying the purpose of each
keybinding, making it easier for users to navigate and understand
different menus and options available within the configuration.

This update ensures that all custom keymaps now display a
descriptive label in the which-key popup to explain their
functionality, aiding users in identifying keymap purposes promptly.
</content>
</entry>
<entry>
<title>docs:custom-line-paragraph: Update author info, enhance commentary</title>
<updated>2025-10-27T01:32:05+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-27T01:32:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=c6ed3592de488a9d347ebf6924c1dab8e3a49560'/>
<id>urn:sha1:c6ed3592de488a9d347ebf6924c1dab8e3a49560</id>
<content type='text'>
Add author information and improve commentary to detail line and
paragraph manipulation utilities more clearly, enhancing the
module's documentation.
</content>
</entry>
<entry>
<title>fix:custom-line-paragraph:missing forward declarations</title>
<updated>2025-10-26T06:38:12+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-26T06:38:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=1a6365b94352c966a9d0bc63ccf9e7727ec2d6e1'/>
<id>urn:sha1:1a6365b94352c966a9d0bc63ccf9e7727ec2d6e1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat:custom-line-paragraph: add keybinding for duplicate-and-comment</title>
<updated>2025-10-26T06:33:36+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-26T06:33:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=a92e0fc9b1fbe1d8f0321ac0d5634460a05b15da'/>
<id>urn:sha1:a92e0fc9b1fbe1d8f0321ac0d5634460a05b15da</id>
<content type='text'>
  - Add C-; l c keybinding to duplicate line/region with commenting
  - Add which-key description "duplicate and comment" for the new binding
  - Complements existing C-; l d (duplicate without comment)
</content>
</entry>
<entry>
<title>fix+test:custom-line-paragraph:infinite loop remove-lines-containing</title>
<updated>2025-10-26T06:24:42+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-26T06:24:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=7e038cce93981e2b78bf6e160694d81cfa5dda67'/>
<id>urn:sha1:7e038cce93981e2b78bf6e160694d81cfa5dda67</id>
<content type='text'>
  - Add guard clause to handle empty string input gracefully (would cause infinite loop)
  - Add 33 comprehensive tests covering normal cases, boundary cases, and error cases
  - Tests verify Unicode support, regex character escaping, region vs buffer operations
  - All 33 tests passing
</content>
</entry>
</feed>
