Linux maintainer tooling and workflows
 help / color / mirror / Atom feed
* [PATCH b4 v2 0/4] Improve email quote trimming
@ 2026-09-07 19:22 Jason Gunthorpe
  2026-09-07 19:22 ` [PATCH b4 v2 1/4] review: trim trailing quoted when adding a tag Jason Gunthorpe
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2026-09-07 19:22 UTC (permalink / raw)
  To: tools

Patches to make the automatic trimming more versatile and work in
more cases.

I would, broadly, like to edit the messages without editing or removing
any of the existing quoting. This is because I tend to make a few passes
at things and once quoted text is deleted it is a huge PITA to bring it
back.

Introduce a >--cut-- marker which tells b4 to cut the quoting and then b4
can reassemble the message similarly to if the editor macros had been
used.

Along the way fix a few corner cases in the email construction that
resulted in sub optimal email generation.

It took a while to get this generating emails the way I think it should,
I've included several of the cases that didn't obviously work as permanent
tests.

Include some very basic support for emacs to generate and highlight the cut marker.

I've opted to leave the existing editor support for cutting out quoted lines
alone, but I think it would be better if it could use editor folding and the
cut marker instead. That's far beyond me though :)

v2:
 - Rebase
 - Change cut to >--cut--
 - Add some basic emacs support
 - Consider mixed > and | quotes when trimming the reply for a trailer
v1: https://patch.msgid.link/r/0-v1-5f6173f1d4bf+3e9-trimming_jgg@nvidia.com

Jason Gunthorpe (4):
  review: trim trailing quoted when adding a tag
  review: discard blank lines between | and > quotes when trimming
  review: add >--cut-- inline marker to snip quoted reply context
  review: emacs: highlighting and keystroke for >--cut--

 docs/maintainer/review.rst       |  24 +++
 docs/releases.rst                |   9 +-
 misc/emacs/b4-review-mode.el     |  32 ++++
 src/b4/review/_review.py         | 150 ++++++++++++---
 src/b4/review_tui/_review_app.py |  10 +-
 src/tests/test_review.py         | 317 +++++++++++++++++++++++++++++++
 src/tests/test_tui_review.py     |  69 +++++++
 7 files changed, 586 insertions(+), 25 deletions(-)


base-commit: c363dd22f0f87689b63d6d32fb65bf07b73d6e66
-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-07 19:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 19:22 [PATCH b4 v2 0/4] Improve email quote trimming Jason Gunthorpe
2026-09-07 19:22 ` [PATCH b4 v2 1/4] review: trim trailing quoted when adding a tag Jason Gunthorpe
2026-09-07 19:22 ` [PATCH b4 v2 2/4] review: discard blank lines between | and > quotes when trimming Jason Gunthorpe
2026-09-07 19:22 ` [PATCH b4 v2 3/4] review: add >--cut-- inline marker to snip quoted reply context Jason Gunthorpe
2026-09-07 19:22 ` [PATCH b4 v2 4/4] review: emacs: highlighting and keystroke for >--cut-- Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox