Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag more inline attachements than just images. #63

Closed
martinbalfanz opened this issue Sep 4, 2012 · 11 comments
Closed

Flag more inline attachements than just images. #63

martinbalfanz opened this issue Sep 4, 2012 · 11 comments

Comments

@martinbalfanz
Copy link

Apple Mail inlines different kinds of attachments, e.g. PDF documents. It would be great to see them indexed and flagged as attachments too.

I managed to include them with mu4e by changing parts of mu4e~view-construct-attachments-header[1], but to make it perfect they should be searchable.

[1]

(defun mu4e~view-construct-attachments-header (msg)
  [...]
  (let* ((id 0)
         (attachments
          (remove-if
           (lambda (part)
             (and (string-match "^[0-9]+\.part$" (plist-get part :name)) ;; <= exclude parts named 0.part, 1.part, ...
                  (not (member 'attachment (plist-get part :type)))
                  (not (string-match "^image" (plist-get part :mime-type)))))
           (plist-get msg :parts)))
  [...]
@djcb
Copy link
Owner

djcb commented Sep 4, 2012

You mean scanning attached pdf documents during 'mu index'?

@martinbalfanz
Copy link
Author

I don't mean the pdf's contents, but if the file is inlined (Content-Disposition: inline;) the message should be flagged with a as if it was a "real" attachment.

I hope that clarifies it a little :-)

@djcb
Copy link
Owner

djcb commented Sep 6, 2012

Sure, thanks. I've pushed some changes, which hopefully help wrt the mu4e part of this.

@djcb
Copy link
Owner

djcb commented Sep 16, 2012

Ok, this should be fixed in git.

@djcb djcb closed this as completed Sep 16, 2012
@akopytov
Copy link
Contributor

I stll have a problem with inline attachments in 0.9.9.5-dev4. Attachments with the following headers neither flag the message with 'a', nor do the show up in the message body (i.e. they are absolutely invisible without using mu4e-view-raw-message):

Content-Disposition: inline; filename="review-diff.txt"
MIME-Version: 1.0
Content-Type: text/x-diff; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

@djcb
Copy link
Owner

djcb commented Nov 18, 2012

Can you attach an example message file that has this problem? Thanks!

@akopytov
Copy link
Contributor

Not sure how to properly attach files on github. Hope this will work: https://gist.github.com/4107377

In that email, there's no way to read (or even know it exists) review-diff.txt other than mu4e-view-raw-message.

@djcb
Copy link
Owner

djcb commented Nov 24, 2012

Sadly, that didn't work (I get a 20 byte file from that link). Can you send it to me through normal email? Thanks.

@akopytov
Copy link
Contributor

Sorry, I have updated that link, it should have the email contents now.

I also did some quick tests. It appears that the root cause is a combination of "text/x-diff" for the Content-Type header and "inline" for Content-Disposition. Sending "text/plain" attachments inline works just fine, i.e. they are both indexed and visible in the mu4e message view.

@djcb
Copy link
Owner

djcb commented Nov 26, 2012

Thanks -- I've made a change, hopefully in the latest git, it is fixed.

@djcb djcb reopened this Nov 26, 2012
@djcb
Copy link
Owner

djcb commented Dec 9, 2012

Closing.

@djcb djcb closed this as completed Dec 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants