[notmuch] [PATCH 1/2] Expand scope of items considered when saving attachments

2009-12-10 Thread Carl Worth
On Sat,  5 Dec 2009 14:53:59 -0800, Keith Amidon  wrote:
> Previously only mime parts that indicated specified a "disposition" of
> "attachment" were saved.  However there are time when it is important
> to be able to save inline content as well.  After this commit any mime
> part that specifies a filename will be considered when saving
> attachments.

Yes, this seems obviously like what we want---thanks!

I've pushed this out now.

-Carl
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 



Re: [notmuch] [PATCH 1/2] Expand scope of items considered when saving attachments

2009-12-10 Thread Carl Worth
On Sat,  5 Dec 2009 14:53:59 -0800, Keith Amidon ke...@nicira.com wrote:
 Previously only mime parts that indicated specified a disposition of
 attachment were saved.  However there are time when it is important
 to be able to save inline content as well.  After this commit any mime
 part that specifies a filename will be considered when saving
 attachments.

Yes, this seems obviously like what we want---thanks!

I've pushed this out now.

-Carl


pgpyL7q9Lx30S.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[notmuch] [PATCH 1/2] Expand scope of items considered when saving attachments

2009-12-05 Thread Keith Amidon
Previously only mime parts that indicated specified a "disposition" of
"attachment" were saved.  However there are time when it is important
to be able to save inline content as well.  After this commit any mime
part that specifies a filename will be considered when saving
attachments.
---
 notmuch.el |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/notmuch.el b/notmuch.el
index c504f46..8d51709 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -322,7 +322,9 @@ buffer."
  (lambda (p)
(let ((disposition (mm-handle-disposition p)))
  (and (listp disposition)
-  (equal (car disposition) "attachment")
+  (or (equal (car disposition) "attachment")
+  (and (equal (car disposition) "inline")
+   (assq 'filename disposition)))
   (incf count
  mm-handle)
 count))
@@ -332,7 +334,9 @@ buffer."
(lambda (p)
  (let ((disposition (mm-handle-disposition p)))
(and (listp disposition)
-(equal (car disposition) "attachment")
+(or (equal (car disposition) "attachment")
+(and (equal (car disposition) "inline")
+ (assq 'filename disposition)))
 (or (not queryp)
 (y-or-n-p
  (concat "Save '" (cdr (assq 'filename disposition)) "' ")))
-- 
1.6.5.4