emacs-patch-review

Port of Thunderbird Patch Review to mu4e.

git clone git://mccd.space/emacs-patch-review

AGENTS.md (1738B)

      1 # Agent Notes
      2 
      3 ## Commits
      4 
      5 Commits must be **atomic**: each commit is a single, self-contained change
      6 whose tests pass on its own. Do not bundle unrelated edits into one
      7 commit, and do not leave a change half-finished across commits. If a task
      8 touches more than one concern, split it into a series of small commits,
      9 each with a focused message describing exactly that concern.
     10 
     11 Scope of "atomic" here:
     12 
     13 - One logical change per commit (a fix, a feature, a refactor — not mixed).
     14 - `make test` passes after every commit, not only at the tip of the
     15   series.
     16 - The commit message subject line summarizes the single concern; the body,
     17   when needed, explains why.
     18 
     19 ## Repository layout
     20 
     21 - `patch-review.el` — the major mode (derived from `diff-mode`): review
     22   buffer, header-line controls, comment extraction (anchored diff against
     23   the pristine text), reply composition.
     24 - `patch-review-parse.el` — pure parsing: patch-email → structured
     25   diff; subject-tag heuristics. No side effects.
     26 - `patch-review-reply.el` — pure formatting: comments → interleaved
     27   quoted reply body.
     28 - `patch-review-git.el` — git shell-out: applicability probe (throwaway
     29   `--detach` worktree + `git am`), apply, dirty/am-in-progress guards.
     30 - `patch-review-mu4e.el` — thin mu4e adapter (untested in CI; no `mu` on
     31   the dev machine).
     32 - `tests/` — ERT suite (`patch-review-test.el`) and fixtures shared with
     33   the Thunderbird add-on (`*.body` files are copied from
     34   thunderbird-review-ui/tests/fixtures; keep them in sync).
     35 
     36 ## Running the tests
     37 
     38 ```
     39 make test
     40 ```
     41 
     42 which runs `emacs -Q --batch -L . -l tests/run.el`. The git integration
     43 tests create throwaway repositories under `temporary-file-directory` and
     44 need `git` and `diff` on PATH.