Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A1B80431FBD; Thu, 10 Dec 2009 17:35:04 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HeQDraplFiyg; Thu, 10 Dec 2009 17:35:03 -0800 (PST) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 43E33431FAE; Thu, 10 Dec 2009 17:35:02 -0800 (PST) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id 9D7F6254312; Thu, 10 Dec 2009 16:57:01 -0800 (PST) From: Carl Worth To: Keith Amidon , notmuch@notmuchmail.org In-Reply-To: <1260053640-10034-3-git-send-email-keith@nicira.com> References: <1260053640-10034-1-git-send-email-keith@nicira.com> <1260053640-10034-2-git-send-email-keith@nicira.com> <1260053640-10034-3-git-send-email-keith@nicira.com> Date: Thu, 10 Dec 2009 16:57:01 -0800 Message-ID: <878wda49b6.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: Keith Amidon Subject: Re: [notmuch] [PATCH 2/2] Save all attachments to a directory X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 01:35:04 -0000 --=-=-= On Sat, 5 Dec 2009 14:54:00 -0800, Keith Amidon wrote: > Prompt for a directory and write all attachments of the current > message to that directory, prompting for a filename for each with a > default value of the filename specified in the attachment. I really like the idea of this function. I'd just like to see a few, little improvements. > The behavior of this function differs in two ways from the existing > notmuch-show-save-attachments function: First, I'm not sure whether we need two different variations of what's effectively the same operation here ("save all attachments"). What I would like is one command to save a single attachment, and then one command to save all attachments. So if we assume that the current 'w' keybinding is really for "write one attachment" (with a lame implementation currently), and 'W' is for "write all attachments", then I think I'd be OK with that. As for the changes we need here, the prompting for the directory needs a string telling the user what's being prompted for. Something like "Save all attachments to: ", which should just be another argument to the interactive call, right? Second, the command needs to provide a little bit of feedback as to what was saved. I ended up running this command a couple of times before I realized it was never going to save the inline patch with no filename that I was looking at[*]. So it at least needs to message something like "N files written to DIR" or so. Should be fairly trivial improvements to the current patch I think. -Carl [*] So there's something else I think we need here. I was seeing a patch in a message, but wanted to get it into a file before piping it off to something, (so '|' didn't work). The patch wasn't an attachment so 'w' didn't work as described above. I tried using 'V' to view the raw message, but then found that the MIME part I wanted was actually encoded as quoted-printable, so just saving the raw message wasn't useful either. So do we need a command to write the current "cooked" message to a file? I suppose I could have just used: | cat > /some/filename but that feels a little bit like cat abuse. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLIZjd6JDdNq8qSWgRAhCkAJ95AkjH1ya1tLW0CZfg8GyLqHrtlACfdaon +6RMkn9ZVx5NFBpzPRpIFec= =lSmQ -----END PGP SIGNATURE----- --=-=-=--