Re: [PATCH v2 1/2] emacs: create patch filename from subject for inline patch fake...
authorDavid Edmondson <dme@dme.org>
Mon, 26 Dec 2011 12:06:02 +0000 (12:06 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:18 +0000 (09:41 -0800)
fe/6e65296af7ad223cd04aa071d04b4a9caba960 [new file with mode: 0644]

diff --git a/fe/6e65296af7ad223cd04aa071d04b4a9caba960 b/fe/6e65296af7ad223cd04aa071d04b4a9caba960
new file mode 100644 (file)
index 0000000..accedfd
--- /dev/null
@@ -0,0 +1,102 @@
+Return-Path: <dme@dme.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 7D925431FD0\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Dec 2011 04:06:13 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 3MgyOCSUMBbW for <notmuch@notmuchmail.org>;\r
+       Mon, 26 Dec 2011 04:06:13 -0800 (PST)\r
+Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
+       [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id C3BD2431FB6\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Dec 2011 04:06:12 -0800 (PST)\r
+Received: by werm12 with SMTP id m12so6186739wer.26\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Dec 2011 04:06:11 -0800 (PST)\r
+Received: by 10.216.139.222 with SMTP id c72mr19413176wej.4.1324901171545;\r
+       Mon, 26 Dec 2011 04:06:11 -0800 (PST)\r
+Received: from hotblack-desiato.hh.sledj.net\r
+       (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])\r
+       by mx.google.com with ESMTPS id ei9sm56506986wid.0.2011.12.26.04.06.08\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 26 Dec 2011 04:06:10 -0800 (PST)\r
+Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
+       id AA52EA0765; Mon, 26 Dec 2011 12:06:06 +0000 (GMT)\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 1/2] emacs: create patch filename from subject for\r
+       inline patch fake parts\r
+In-Reply-To:\r
+ <aa55383e8609a2e0d376744ff3e982fd072c58d6.1324849534.git.jani@nikula.org>\r
+References: <1321657368-13872-1-git-send-email-jani@nikula.org>\r
+       <cover.1324849534.git.jani@nikula.org>\r
+       <aa55383e8609a2e0d376744ff3e982fd072c58d6.1324849534.git.jani@nikula.org>\r
+User-Agent: Notmuch/0.10.2+107~ga2d0215 (http://notmuchmail.org)\r
+       Emacs/24.0.92.1 (x86_64-pc-linux-gnu)\r
+From: David Edmondson <dme@dme.org>\r
+Date: Mon, 26 Dec 2011 12:06:02 +0000\r
+Message-ID: <cun62h3tu51.fsf@hotblack-desiato.hh.sledj.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 26 Dec 2011 12:06:13 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain\r
+\r
+On Mon, 26 Dec 2011 00:00:05 +0200, Jani Nikula <jani@nikula.org> wrote:\r
+> +(defun notmuch-wash-subject-to-patch-filename (subject)\r
+> +  "Convert a patch mail SUBJECT into a filename.\r
+> +\r
+> +The resulting filename is similar to the names generated by \"git\r
+> +format-patch\". If the patch mail was generated and sent using\r
+> +\"git format-patch/send-email\", this should re-create the\r
+> +original filename the sender had."\r
+> +  (let* ((n (notmuch-wash-subject-to-patch-sequence-number subject))\r
+> +     (n (if n n 1)))\r
+> +    (format "%04d-%s.patch" n (notmuch-wash-subject-to-filename subject 52))))\r
+> +\r
+\r
+(format "%04d-%s.patch"\r
+  (or (notmuch-wash-subject-to-patch-sequence-number subject) 1)\r
+  (notmuch-wash-subject-to-filename subject 52))\r
+\r
+or something would be more lispy.\r
+\r
+Clicking on the button for the part saves the wrong thing, though,\r
+because it's not a real MIME part. That looks a bit awkward to fix, so\r
+perhaps you could still prefix the name with "inline: " to indicate that\r
+it's odd?\r
+\r
+Otherwise, looks good.\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iEYEARECAAYFAk74YyoACgkQaezQq/BJZRarEgCePK2RJpFrgdpUt0PWPmvg9xIn\r
+TjMAn1e8sUzwxk4qY/tPvwJQpRKtD1Su\r
+=l/h/\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r