Re: [PATCH v2 1/2] emacs: create patch filename from subject for inline patch fake...
authorJani Nikula <jani@nikula.org>
Mon, 26 Dec 2011 12:24:42 +0000 (14:24 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:18 +0000 (09:41 -0800)
0b/c55174b43855b9c73df69f74e1ef8e327c1999 [new file with mode: 0644]

diff --git a/0b/c55174b43855b9c73df69f74e1ef8e327c1999 b/0b/c55174b43855b9c73df69f74e1ef8e327c1999
new file mode 100644 (file)
index 0000000..57c2f47
--- /dev/null
@@ -0,0 +1,96 @@
+Return-Path: <jani@nikula.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 88FB4431FD0\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Dec 2011 04:24:50 -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 kN8LnR-moUDr for <notmuch@notmuchmail.org>;\r
+       Mon, 26 Dec 2011 04:24:50 -0800 (PST)\r
+Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com\r
+ [74.125.83.53])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ BAA52431FB6   for <notmuch@notmuchmail.org>; Mon, 26 Dec 2011 04:24:49 -0800\r
+ (PST)\r
+Received: by eekd41 with SMTP id d41so13305627eek.26\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Dec 2011 04:24:47 -0800 (PST)\r
+Received: by 10.213.11.12 with SMTP id r12mr1197231ebr.87.1324902286891;\r
+       Mon, 26 Dec 2011 04:24:46 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi.\r
+       [80.220.92.23])\r
+       by mx.google.com with ESMTPS id 13sm91183655eeu.1.2011.12.26.04.24.44\r
+       (version=SSLv3 cipher=OTHER); Mon, 26 Dec 2011 04:24:45 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: David Edmondson <dme@dme.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: <cun62h3tu51.fsf@hotblack-desiato.hh.sledj.net>\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
+       <cun62h3tu51.fsf@hotblack-desiato.hh.sledj.net>\r
+User-Agent: Notmuch/0.10.2+129~g311bcf8 (http://notmuchmail.org) Emacs/23.3.1\r
+       (i686-pc-linux-gnu)\r
+Date: Mon, 26 Dec 2011 14:24:42 +0200\r
+Message-ID: <87wr9ja5bp.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\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:24:50 -0000\r
+\r
+On Mon, 26 Dec 2011 12:06:02 +0000, David Edmondson <dme@dme.org> wrote:\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
+Yes, definitely. I am still very much a beginner in lisp.\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
+I'm not sure I follow you here. Could you elaborate what you mean by\r
+"the wrong thing", please?\r
+\r
+I don't think the user would want to have an "inline: " prefix in the\r
+filename that would have to be removed every time. I think that kind of\r
+defeats the purpose here. Or where exactly are you proposing to have the\r
+prefix?\r
+\r
+\r
+BR,\r
+Jani.\r