From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yEvhADKbmGJXvgAAbAwnHQ (envelope-from ) for ; Thu, 02 Jun 2022 13:12:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SDFzOzGbmGKfKQEAG6o9tA (envelope-from ) for ; Thu, 02 Jun 2022 13:12:49 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (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 92A15179E5 for ; Thu, 2 Jun 2022 13:12:49 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id B639D5F7C1; Thu, 2 Jun 2022 11:12:46 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id BD7B75F7B9 for ; Thu, 2 Jun 2022 11:12:43 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id BB08A5FBD7; Thu, 2 Jun 2022 07:12:42 -0400 (EDT) Received: (nullmailer pid 2971412 invoked by uid 1000); Thu, 02 Jun 2022 11:12:40 -0000 From: David Bremner To: Damien Cassou , notmuch@notmuchmail.org Subject: Re: [PATCH] Fix notmuch-mua.el notmuch-mua-mail In-Reply-To: <87v8tk17ix.fsf@cassou.me> References: <87fsl22geh.fsf@cassou.me> <87zgj8zs3k.fsf@cassou.me> <875ylk1zo9.fsf@tethera.net> <87v8tk17ix.fsf@cassou.me> Date: Thu, 02 Jun 2022 08:12:40 -0300 Message-ID: <87h753z5cn.fsf@tethera.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Message-ID-Hash: UIIYRS27DDPJSRSMEJ7POI3DCTLML7DK X-Message-ID-Hash: UIIYRS27DDPJSRSMEJ7POI3DCTLML7DK X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654168369; 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:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=dFKdaFFNSDXAyZdB2ghzhBhp0Cs02jINiZ8R7dtXCjg=; b=lBtRlcXsT2Vpgypxn5eCWnM7kdpvp7tr18YkMOOE20Y0z8owzWwUzMznPi7ZWktRXiNnyJ jD67Bs8c+7tk/3L0sVkfZ8VNshUc1m+OQAIPglXIP4/ACEEuvzy7vTT4lKUHNO2BsKMR7o Rtq+4XGJSjz++tZAjvVBDxLCgxXSk+cAa25eu+Wi7jGih9ifREzDpmalywlhb/7p46DfRW /GpucsrXzxlNPNAGTiBsZySIkBs5lE2ZL/kDEZqiZPc8APubSdUc/CuucIRIn+9SPiJkbz uT/wMraA3Pz/tJYykYAFt6SYKk9x34vEbyZf7x4Pe6XPSBmn4HxAMpRqDvN8lg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654168369; a=rsa-sha256; cv=none; b=UdCns58KMDxHVPq+UcJl9nPnPa9TAP9wI+OdPifkXVh+aIvYj/m1YlDchz2zGv1KWN/1Lf +r4xhapPMgSp3TfMY5MueMDLw4jHcBI8kj1f3O/XmOrXpjWZ3XmBH3tJWd6ZXEISfpOPLa MkECH1G5k2DILrHoivVtdHLf8ab2IZtembNMyMx8FkLRMLJdQEO4a2l6BqkBsTp9/80XZ3 NpKsV2JI6oo6f0xxUKZDpH+tPKg+X0iwlc1QPouOYo6HML92LmN4QuvXIcm9iPFWff4nsB 51i0pLbboyRg+i6I9KEV7DPO4E4S+6iu1YDAjekcULeQ0dK9OgqxJSAoU6zH/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.56 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 92A15179E5 X-Spam-Score: -2.56 X-Migadu-Scanner: scn0.migadu.com X-TUID: GukxDqpH9vzn --=-=-= Content-Type: text/plain Damien Cassou writes: > Hi David, > > Can you please explain me what in git-send-email makes it easier to > apply the patches? I'm also interested in your process to apply > patches from your mua (notmuch in Emacs hopefully) to your git > repository. There are some convenient tools for applying patches from notmuch in Sean Whitton's mailscripts collection [1]. I tend to work in the shell with some git aliases. [alias] nmam = "!f() { notmuch extract-patch $1 | git am -; }; f" [alias] nmam8 = "!f() { notmuch extract-patch $1 | email-to-8bit | git am -; }; f" [alias] nmam3 = "!f() { notmuch extract-patch $1 | git am -3 -; }; f" I use "c i" to copy the message id, and then paste it into a command line $ git nmam email-to-8bit is a little hack to work around mailman induced damage to patches; it seems less needed with new versions of git. notmuch-extract-patch is from mailscripts, and it fails (well, fails to extract any patch) with attached patches. I used to use notmuch show --format=raw in place of "notmuch extract-patch". This succeeds in extracting a patch, but smashes the body text together with the commit message in the resulting commit. >> [ about emacs git commit messages ] > I think it focuses too much on what has changed > (something that could be inferred from the patch with a little tooling) > instead of why the code has changed this way (something only the author > can tell). Exactly. [1]: https://git.spwhitton.name/mailscripts also available in e.g. Debian. --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=email-to-8bit Content-Transfer-Encoding: base64 IyEvdXNyL2Jpbi9lbnYgcHl0aG9uMwoKaW1wb3J0IHN5cwppbXBvcnQgZW1haWwKaW1wb3J0IGVt YWlsLnBvbGljeQppbXBvcnQgbG9nZ2luZwpmcm9tIGVtYWlsLmNoYXJzZXQgaW1wb3J0IENoYXJz ZXQKZnJvbSBlbWFpbC5tZXNzYWdlIGltcG9ydCBFbWFpbE1lc3NhZ2UKCmRlZiBtYWluKCk6CiAg ICBtc2cgPSBlbWFpbC5tZXNzYWdlX2Zyb21fZmlsZShzeXMuc3RkaW4scG9saWN5PWVtYWlsLnBv bGljeS5kZWZhdWx0KQoKICAgIGlmIGlzaW5zdGFuY2UobXNnLCBFbWFpbE1lc3NhZ2UpOgogICAg ICAgIGJvZHkgPSBtc2cuZ2V0X3BheWxvYWQoZGVjb2RlPVRydWUpLmRlY29kZShlbmNvZGluZz0n dXRmOCcpCiAgICAgICAgbXNnLnJlcGxhY2VfaGVhZGVyKCdDb250ZW50LVRyYW5zZmVyLUVuY29k aW5nJywnOGJpdCcpCiAgICAgICAgZm9yIGZpZWxkIGluIG1zZy5rZXlzKCk6CiAgICAgICAgICAg IHByaW50KCJ7OnN9OiB7OnN9Ii5mb3JtYXQoZmllbGQsbXNnW2ZpZWxkXSkpCiAgICAgICAgcHJp bnQoIiIpCiAgICAgICAgcHJpbnQoYm9keS5yZXBsYWNlKCdcclxuJywnXG4nKSkKICAgIGVsc2U6 CiAgICAgICAgbG9nZ2luZy5lcnJvcignSW5wdXQgd2FzIG5vdCBhbiBlLW1haWwgbWVzc2FnZScp CgppZiBfX25hbWVfXyA9PSAnX19tYWluX18nOgogICAgbWFpbigpCg== --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --=-=-=--