All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH b4 0/3] Improve email quote trimming
@ 2026-08-25 18:35 Jason Gunthorpe
  2026-08-25 18:35 ` [PATCH b4 1/3] review: trim trailing quoted when adding a tag Jason Gunthorpe
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jason Gunthorpe @ 2026-08-25 18:35 UTC (permalink / raw)
  To: tools

Three 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 >8< 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.

I've opted to leave the editor changes alone, but I think it would be much
better if it could editor fold the text the cut would select instead of
deleting it. That's far beyond me though :)

Jason Gunthorpe (3):
  review: trim trailing quoted when adding a tag
  review: discard blank lines between | and > quotes when trimming
  review: add >8< inline marker to snip quoted reply context

 docs/maintainer/review.rst       |  24 +++
 docs/releases.rst                |   9 +-
 src/b4/review/_review.py         | 144 +++++++++++++--
 src/b4/review_tui/_review_app.py |  10 +-
 src/tests/test_review.py         | 296 +++++++++++++++++++++++++++++++
 src/tests/test_tui_review.py     |  69 +++++++
 6 files changed, 532 insertions(+), 20 deletions(-)


base-commit: 0c2c3c276e0447e37f2e90da60505ec6d765ded9
-- 
2.43.0


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

end of thread, other threads:[~2026-08-27 16:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25 18:35 [PATCH b4 0/3] Improve email quote trimming Jason Gunthorpe
2026-08-25 18:35 ` [PATCH b4 1/3] review: trim trailing quoted when adding a tag Jason Gunthorpe
2026-08-25 18:35 ` [PATCH b4 2/3] review: discard blank lines between | and > quotes when trimming Jason Gunthorpe
2026-08-25 18:35 ` [PATCH b4 3/3] review: add >8< inline marker to snip quoted reply context Jason Gunthorpe
2026-08-25 21:25   ` Konstantin Ryabitsev
2026-08-26 23:12     ` Jason Gunthorpe
2026-08-27 16:12       ` Konstantin Ryabitsev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.