From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id iDwCAo/ZsWEqNQAAsNZ9tg (envelope-from ) for ; Thu, 09 Dec 2021 10:25:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iGXAOI7ZsWFBUwAAB5/wlQ (envelope-from ) for ; Thu, 09 Dec 2021 10:25:18 +0000 Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050::465:101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1413A2EF6F for ; Thu, 9 Dec 2021 11:25:18 +0100 (CET) Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4J8qt04yzmzQkSF; Thu, 9 Dec 2021 11:25:12 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de References: <20211208160142.84085-1-sourcehut@relevant-information.com> <20211208160142.84085-2-sourcehut@relevant-information.com> <87r1amfnoa.fsf@kyleam.com> From: Leo To: piem@inbox.kyleam.com Subject: Re: [PATCH 1/1] piem-notmuch-am-ready-mbox: Add option to edit patches before applying them Date: Thu, 09 Dec 2021 11:10:28 +0100 In-reply-to: <87r1amfnoa.fsf@kyleam.com> Message-ID: <87v8zynkhy.fsf@relevant-information.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1639045518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oYXEZN/bAHnIPqQ14jhTNs6RH1Q/Muuh9FtWg/CrV/c=; b=Cc9qiU/5YJxCzdPTb67JY6RJyy1gB+m5jPLVmWWO0t8NDMpUwWNjLYjTzrsZqyt4fR6v6H ZIujjiysqgwgB9rPywiAy7h7sZGjIV5fCdito4ZXk5A6za2WXBpsSQ7YClNqg4bdRoaVgX mHmFqS7YDzzimjxufLlAnSyIj9aIQvzSniYM9kI0aHvxtxGxoc2PIXhpKdIGrFOxS0dN3z KcGnk78LXFn/+LP8qsIR/SL8IBO0GKzdhoVpNiToGE/6PFlDW0CHKZDwsmobdtFvMSHYAU SpdNk8a8++lejS/qKrkfpLQBoz95jjJLWYFJd3BMVqf8Om5EhuExG99O9Uqnnw== ARC-Seal: i=1; s=key1; d=kyleam.com; t=1639045518; a=rsa-sha256; cv=none; b=ePiyVOa6uil1j9i9NJmnuS5aP+1MknU9l0xeJfihYUOv0CpnGPBv0doWMK/A1ynAvbG2L0 XI1oMp8WWXprK35xCNOycVSSJ3Tl7jN5VfEB8J3v7Q9g5tAJ7qFGEiYK6a9P3pyihia0dG EdZevOjlDe28dw0h3KReu2Zgk5hKmTh2yWrP0DSD2IWRpPePZ5hHevIhXgeXSSpzT5FKcN BhdIhbZBbxpXE9k6yGyArBVfCQvfyYgHZ/gYyjCbZR3H52sKFguOc7Sk74x+zg6CREug/7 cMDheA8ecajAIabLc89JRnpCH6LuhQ08BfDBFn3hEY7TW0kTvhRqfYmXGxnzpg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of sourcehut@relevant-information.com designates 2001:67c:2050::465:101 as permitted sender) smtp.mailfrom=sourcehut@relevant-information.com X-Migadu-Spam-Score: -2.49 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of sourcehut@relevant-information.com designates 2001:67c:2050::465:101 as permitted sender) smtp.mailfrom=sourcehut@relevant-information.com X-Migadu-Queue-Id: 1413A2EF6F X-Spam-Score: -2.49 X-Migadu-Scanner: scn1.migadu.com X-TUID: IUzdl938hjzT Kyle Meyer writes: > Are you okay with filling in a name here? (It of course doesn't have to > be a real one.) > Sure, let's go with Leo. > Okay, so stepping back, I believe the proposed workflow is ... > > Yes that is correct. Although I realize that it is pretty clunky, see below. > I wonder if we can redesign this a bit to more closely and transparently > connect the "edit" and "am" parts. Something like: > > * from a notmuch message, invoke piem-notmuch-edit-message [*] (or > whatever name) > > This commands puts the message (or perhaps thread) into a dedicated > piem mode for editing, setting up any buffer-local variables piem > needs for record-keeping/linking (e.g., what piem-inbox-coderepo > returns in the notmuch message) and then ... > > * once the user is done editing, they can hit, say, 'C-c C-c' to call > a wrapper command that feeds the mbox to piem-am > > (Perhaps there could also be a b4 variant.) > > What do you think? > I actually thought something similar a while after I sent the patch. Instead of editing the buffer generated by notmuch we could use the buffer returned by `piem-am-ready-mbox'. That way we get all the libraries for free. Perhaps a new command `piem-am-edit' could be added that calls `piem-am-ready-mbox' with your suggested dedicated piem mode for editing. Would it be a good idea to filter out email headers that `git am' doesn't care about here? Otherwise it can be a bit overwhelming. -- ---Leo