<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>neomutt on GPUers</title><link>https://en.gpuers.cn/tags/neomutt/</link><description>Recent content in neomutt on GPUers</description><image><title>GPUers</title><url>https://en.gpuers.cn/img/og-cover-en.png</url><link>https://en.gpuers.cn/img/og-cover-en.png</link></image><generator>Hugo</generator><language>en-US</language><lastBuildDate>Fri, 20 Nov 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://en.gpuers.cn/tags/neomutt/index.xml" rel="self" type="application/rss+xml"/><item><title>Kernel Mailing List Reply Guide with b4 and neomutt</title><link>https://en.gpuers.cn/notes/9000-001/</link><pubDate>Fri, 20 Nov 2026 00:00:00 +0800</pubDate><guid>https://en.gpuers.cn/notes/9000-001/</guid><description>Kernel development is conducted entirely through plain-text email: patch submission, review, and discussion all occur on mailing lists.</description><content:encoded><![CDATA[<h2 id="1-background">1. Background</h2>
<p>Kernel development is conducted entirely through <strong>plain-text email</strong>: patch submission, review, and discussion all occur on mailing lists. Email replies must follow strict formatting standards:</p>
<ul>
<li><strong>Plain text</strong> (no HTML)</li>
<li><strong>Interleaved replies</strong> (insert replies in the middle of quoted text, rather than top-posting)</li>
<li><strong>Correct <code>In-Reply-To</code> / <code>References</code> headers</strong> (to preserve thread continuity)</li>
<li><strong><code>&gt;</code> quote format</strong> (to mark the original text)</li>
<li><strong>Line width not exceeding 72 characters</strong></li>
</ul>
<p>Commercial email clients such as Outlook are unsuitable for this workflow. They default to HTML, top-posting, and do not generate <code>&gt;</code> quoting. This guide uses two tools widely adopted by the kernel community.</p>
<h2 id="2-toolchain">2. Toolchain</h2>
<h3 id="21-b4--kernel-mail-workflow-tool">2.1 b4 — Kernel Mail Workflow Tool</h3>
<p><a href="https://b4.docs.kernel.org">b4</a> is a command-line tool designed specifically for Linux kernel development. Its main features include:</p>
<ul>
<li><strong><code>b4 mbox</code></strong>: Download a complete email thread from lore.kernel.org as a local mbox file, including replies and reviews</li>
<li><strong><code>b4 am</code></strong>: Download a patch series as an mbox ready to apply with <code>git am</code></li>
<li><strong><code>b4 send</code></strong>: Submit patches to mailing lists (a replacement for <code>git send-email</code>)</li>
<li><strong><code>b4 trailers</code></strong>: Collect Reviewed-by / Acked-by tags from mailing-list messages</li>
</ul>
<p>In this guide, we use <code>b4 mbox</code> to download a review thread from lore and then process it with neomutt.</p>
<h3 id="22-neomutt--terminal-email-client">2.2 neomutt — Terminal Email Client</h3>
<p><a href="https://neomutt.org">neomutt</a> is a modern fork of the classic mutt client and is one of the most widely used email tools among kernel developers (Thunderbird is another common choice). Its advantages include:</p>
<ul>
<li><strong>Native plain text</strong>: It does not generate HTML and naturally follows kernel email conventions</li>
<li><strong>Automatic quoting</strong>: It quotes the original message with <code>&gt;</code> and supports interleaved replies</li>
<li><strong>Automatic headers</strong>: <code>In-Reply-To</code>, <code>References</code>, and <code>Subject</code> are extracted from the original message</li>
<li><strong>Reply All (<code>g</code>)</strong>: It automatically fills all original To/Cc recipients</li>
<li><strong>vim integration</strong>: Messages are edited with vim, giving kernel developers a familiar workflow</li>
<li><strong>Lightweight TUI</strong>: It works well over SSH</li>
</ul>
<p>In short, neomutt automatically performs the work that you would otherwise have to do manually: constructing headers, adding <code>&gt;</code> quotes, and filling In-Reply-To.</p>
<h2 id="3-software-installation-and-configuration">3. Software Installation and Configuration</h2>
<h3 id="31-b4-installation">3.1 b4 Installation</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip3 install b4
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Verify the installation</span>
</span></span><span class="line"><span class="cl">b4 --version
</span></span></code></pre></div><h3 id="32-neomutt-installation-and-configuration">3.2 neomutt Installation and Configuration</h3>
<p>Install neomutt:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt install -y neomutt
</span></span></code></pre></div><p>Perform this one-time configuration by opening <code>~/.neomuttrc</code> and adding:</p>
<pre tabindex="0"><code>set from = &#34;Your email&#34;
set realname = &#34;Your name&#34;
set smtp_url = &#34;smtp server:port&#34;
set smtp_authenticators = &#34;&#34;
set ssl_starttls = no
set ssl_force_tls = no
set editor = &#34;vim&#34;
set attribution = &#34;On %d, %n wrote:&#34;
set include = yes
set indent_string = &#34;&gt; &#34;
set edit_headers = yes
set text_flowed = no
set wrap = 72
set content_type = &#34;text/plain&#34;
set charset = &#34;utf-8&#34;
set send_charset = &#34;utf-8&#34;
alternative_order text/plain text/html
auto_view text/html
</code></pre><h2 id="4-reply-workflow">4. Reply Workflow</h2>
<h3 id="1-download-the-email-thread">1. Download the email thread</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> /tmp
</span></span><span class="line"><span class="cl">b4 mbox &lt;message-id&gt;
</span></span></code></pre></div><p>Example:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">b4 mbox 6a2d7506-c474-4619-a3d5-e729468d68f4@google.com
</span></span></code></pre></div><p>Output: <code>./6a2d7506-c474-4619-a3d5-e729468d68f4@google.com.mbx</code></p>
<h3 id="2-open-it-with-neomutt">2. Open it with neomutt</h3>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">neomutt -f /tmp/&lt;message-id&gt;.mbx
</span></span></code></pre></div><p>When the message list appears, use the arrow keys to select the message you want to answer.</p>
<h3 id="3-press-g-for-a-group-reply">3. Press <code>g</code> for a group reply</h3>
<ul>
<li>At the <code>To:</code> prompt, press <strong>Enter</strong> to confirm.</li>
<li>At the <code>Subject: Re: ...</code> prompt, press <strong>Enter</strong> to confirm.</li>
<li>Vim opens automatically with the complete <code>&gt;</code>-quoted message already inserted.</li>
</ul>
<h3 id="4-edit-the-reply-in-vim">4. Edit the reply in vim</h3>
<p>At the top of the editor are the mail headers, followed by the quoted content:</p>
<pre tabindex="0"><code>From: Your name &lt;Your email&gt;
To: somebody &lt;***@***.com&gt;
Cc: ...
Subject: Re: [PATCH v1 2/5] ...

On Mon, 11 Apr 2025, somebody wrote:
&gt; On 2026-04-27 06:05, your name wrote:
&gt; &gt; +  function_name(a,b, ...
&gt;
&gt; How do you ensure that parameter a and ...
&gt; ...without warning.

(Write your reply here)

&gt; &gt; +  while(a) {
...
</code></pre><p><strong>Editing guidelines:</strong></p>
<table>
	<thead>
			<tr>
					<th>Operation</th>
					<th>Description</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Delete unnecessary quoted text</td>
					<td>Optional; many people leave it in place</td>
			</tr>
			<tr>
					<td>Delete the sender&rsquo;s signature (<code>&gt; Regards, &gt; somebody</code>)</td>
					<td>Optional</td>
			</tr>
			<tr>
					<td>Insert the reply immediately after the question</td>
					<td><strong>Required</strong>; this is an interleaved reply</td>
			</tr>
			<tr>
					<td>Keep reply lines within 72 characters</td>
					<td><strong>Required</strong></td>
			</tr>
			<tr>
					<td>Do not reflow quoted code lines</td>
					<td>Keep them unchanged</td>
			</tr>
	</tbody>
</table>
<p><strong>Modify the Cc list:</strong></p>
<p>In vim&rsquo;s header area, edit the <code>Cc:</code> line directly to add or remove recipients:</p>
<pre tabindex="0"><code>Cc: a@amd.com, b@google.com,
    ..., dri-devel@lists.freedesktop.org
</code></pre><p>Save and exit with <code>:wq</code>.</p>
<h3 id="5-pre-send-checks-and-a-test-message">5. Pre-send checks and a test message</h3>
<p>Back at the neomutt send screen, the available keys are:</p>
<table>
	<thead>
			<tr>
					<th>Key</th>
					<th>Function</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><code>e</code></td>
					<td>Re-edit the email (open vim again)</td>
			</tr>
			<tr>
					<td><code>t</code></td>
					<td>Modify the To address</td>
			</tr>
			<tr>
					<td><code>c</code></td>
					<td>Modify the Cc address</td>
			</tr>
			<tr>
					<td><code>y</code></td>
					<td><strong>Send</strong></td>
			</tr>
			<tr>
					<td><code>q</code></td>
					<td>Cancel without sending</td>
			</tr>
	</tbody>
</table>
<p>Before the official send, you can send a test copy to yourself.</p>
<p><strong>Test send:</strong> Press <code>e</code>, enter vim, change To to your own address, delete Cc, save with <code>:wq</code>, then press <code>y</code>. Check your inbox to make sure the format is correct.</p>
<h3 id="6-send-the-real-reply">6. Send the real reply</h3>
<p>After testing, run <code>neomutt -f xxx.mbx</code> again, press <code>g</code>, edit the reply, verify To/Cc, and press <code>y</code> to send.</p>
<h2 id="quick-reference">Quick Reference</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Complete workflow (3 commands)</span>
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> /tmp
</span></span><span class="line"><span class="cl">b4 mbox &lt;message-id&gt;
</span></span><span class="line"><span class="cl">neomutt -f /tmp/&lt;message-id&gt;.mbx
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># neomutt operations</span>
</span></span><span class="line"><span class="cl"><span class="c1"># ↑↓ Select message → g (group reply) → Enter → Enter → edit in vim → :wq → y to send</span>
</span></span></code></pre></div><h2 id="7-tips-for-reading-kernel-email">7. Tips for Reading Kernel Email</h2>
<h3 id="71-understanding-quote-levels-the-meaning-of-">7.1 Understanding Quote Levels (the Meaning of <code>&gt;</code>)</h3>
<p>Kernel email uses <code>&gt;</code> to identify quoted content. Each extra <code>&gt;</code> represents one earlier round in the conversation. Read from the line with the most <code>&gt;</code> characters (the oldest content) toward lines with fewer markers (the most recent content):</p>
<pre tabindex="0"><code>&gt; &gt; &gt; This is what the first person said (oldest, three quote levels)
&gt; &gt;
&gt; &gt; This is the second person&#39;s reply (middle, two quote levels)
&gt;
&gt; This is the third person&#39;s reply (more recent, one quote level)

This is the current author&#39;s reply (most recent, no quote marker)
</code></pre><p><strong>Practical example: a review involving four participants</strong></p>
<pre tabindex="0"><code>&gt; &gt; &gt; +static int
&gt; &gt; &gt; +do_something(struct device *dev, unsigned long count,
&gt; &gt; &gt; +             unsigned long *result)
&gt; &gt; &gt; +{
&gt; &gt; &gt; +    ret = lock_resource(dev, false);
&gt; &gt;
&gt; &gt; How do you ensure that the resource remains valid here?
&gt;
&gt; Good question. I think we need a refcount or fence here.

I agree. The resource must be pinned or have a callback
to handle invalidation before it gets reclaimed.
</code></pre><p>Meaning:</p>
<ul>
<li><code>&gt; &gt; &gt;</code> — Code submitted by the original patch author (Person 1)</li>
<li><code>&gt; &gt;</code> — A reviewer asks about that code (Person 2)</li>
<li><code>&gt;</code> — Another developer replies (Person 3)</li>
<li>No <code>&gt;</code> — The current author replies (Person 4, whose email you are reading)</li>
</ul>
<h3 id="72-quote-level-quick-reference">7.2 Quote-Level Quick Reference</h3>
<table>
	<thead>
			<tr>
					<th>Quote level</th>
					<th>Meaning</th>
					<th>Time</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><code>&gt; &gt; &gt; &gt;</code></td>
					<td>Oldest content (four rounds back)</td>
					<td>Oldest</td>
			</tr>
			<tr>
					<td><code>&gt; &gt; &gt;</code></td>
					<td>Content from three rounds back</td>
					<td>↑</td>
			</tr>
			<tr>
					<td><code>&gt; &gt;</code></td>
					<td>Content from two rounds back</td>
					<td>↑</td>
			</tr>
			<tr>
					<td><code>&gt;</code></td>
					<td>Content from the previous message</td>
					<td>↓</td>
			</tr>
			<tr>
					<td>No quote marker</td>
					<td>Written by the current author</td>
					<td>Most recent</td>
			</tr>
	</tbody>
</table>
<h3 id="73-tips-for-reading-long-messages">7.3 Tips for Reading Long Messages</h3>
<p><strong>1. Read the unquoted sections first</strong></p>
<p>Skip all lines beginning with <code>&gt;</code> and read only the paragraphs without <code>&gt;</code>. They contain the current author&rsquo;s views and conclusions, which are the core of the message.</p>
<p><strong>2. Trace upward for context</strong></p>
<p>If a reply is unclear, inspect the directly preceding <code>&gt;</code>-quoted section—it is the text to which that reply responds. If it is still unclear, move upward through <code>&gt; &gt;</code> and the remaining quote levels.</p>
<p><strong>3. Recognize the interleaved structure</strong></p>
<p>Kernel messages are not one quotation block followed by one reply block. They alternate:</p>
<pre tabindex="0"><code>&gt; Quoted question 1
Reply to question 1

&gt; Quoted question 2
Reply to question 2

&gt; &gt; Quoted code snippet
&gt; Reviewer&#39;s comment on that code
My response to the reviewer&#39;s comment
</code></pre><p>Each “quote → reply” pair is a separate discussion point and can be understood independently.</p>
<p><strong>4. Read on lore.kernel.org</strong></p>
<p>lore provides a better reading experience:</p>
<ul>
<li>Thread view clearly displays the reply relationships among messages</li>
<li>Highlighting visually distinguishes quote levels</li>
<li>URL format: <code>https://lore.kernel.org/all/&lt;message-id&gt;/</code></li>
</ul>
<p><strong>5. Read locally with b4</strong></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Download the entire thread</span>
</span></span><span class="line"><span class="cl">b4 mbox &lt;message-id&gt;
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Open it in neomutt with thread view</span>
</span></span><span class="line"><span class="cl">neomutt -f /tmp/&lt;message-id&gt;.mbx
</span></span></code></pre></div><p>In neomutt, press <code>t</code> to toggle thread view and clearly display the message hierarchy.</p>
]]></content:encoded></item></channel></rss>