<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-custom-line-paragraph-join-paragraph.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-03T11:56:10+00:00</updated>
<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>Revert "checking in modified/removed tests and other misc changes"</title>
<updated>2025-11-14T08:35:00+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-14T08:35:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=2312e40358a923fe72785af504c9272506d8d58d'/>
<id>urn:sha1:2312e40358a923fe72785af504c9272506d8d58d</id>
<content type='text'>
This reverts commit 1218bae708a6755e3628f15fef58e6806ac81039.
</content>
</entry>
<entry>
<title>checking in modified/removed tests and other misc changes</title>
<updated>2025-11-14T08:31:16+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-14T08:31:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=1218bae708a6755e3628f15fef58e6806ac81039'/>
<id>urn:sha1:1218bae708a6755e3628f15fef58e6806ac81039</id>
<content type='text'>
</content>
</entry>
<entry>
<title>test: Add unit tests for `join-line-or-region` and `join-paragraph`</title>
<updated>2025-10-23T04:55:10+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-23T04:55:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=b5333f6d85a54c3012dc88c14c0bf36bc06e297a'/>
<id>urn:sha1:b5333f6d85a54c3012dc88c14c0bf36bc06e297a</id>
<content type='text'>
Add comprehensive test cases for the `cj/join-line-or-region` and
`cj/join-paragraph` functions within the custom-line-paragraph
module. These tests cover normal, boundary, and error cases to
ensure the proper functionality of line and paragraph joining
features. They address various scenarios including line breaks,
whitespace, Unicode content, and cursor positioning, enhancing the
robustness of existing functionality.
</content>
</entry>
</feed>
