]> git.notmuchmail.org Git - notmuch/commitdiff
Expand scope of items considered when saving attachments
authorKeith Amidon <keith@nicira.com>
Sat, 5 Dec 2009 22:53:59 +0000 (14:53 -0800)
committerCarl Worth <cworth@cworth.org>
Fri, 11 Dec 2009 00:26:24 +0000 (16:26 -0800)
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

index fb112f97665c82b81dfe320d1a384270f60261f1..31e9d585fdd98a8880f7755c0060a53e22f15926 100644 (file)
@@ -322,7 +322,9 @@ buffer."
      (lambda (p)
        (let ((disposition (mm-handle-disposition p)))
          (and (listp disposition)
      (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))
               (incf count))))
      mm-handle)
     count))
@@ -332,7 +334,9 @@ buffer."
    (lambda (p)
      (let ((disposition (mm-handle-disposition p)))
        (and (listp disposition)
    (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)) "' ")))
             (or (not queryp)
                 (y-or-n-p
                  (concat "Save '" (cdr (assq 'filename disposition)) "' ")))