From: Jason Gunthorpe <jgg@nvidia.com>
To: tools@kernel.org
Subject: [PATCH b4 v2 0/4] Improve email quote trimming
Date: Mon, 7 Sep 2026 16:22:50 -0300 [thread overview]
Message-ID: <0-v2-de162fd5fc4a+2b7-trimming_jgg@nvidia.com> (raw)
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
next reply other threads:[~2026-09-07 19:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 19:22 Jason Gunthorpe [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0-v2-de162fd5fc4a+2b7-trimming_jgg@nvidia.com \
--to=jgg@nvidia.com \
--cc=tools@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox