bug in attachment handling
Mark Walters
markwalters1009 at gmail.com
Tue Jul 30 08:16:36 PDT 2013
Hi
On Tue, 30 Jul 2013, Mark Walters <markwalters1009 at gmail.com> wrote:
> Hi
>
> I have been seeing a bug in attachment handling in recent notmuch. If a
> pdf part is sent as application/octet-stream then notmuch says
> [[file.pdf: application/octet-stream (as application/pdf) ] but when
> viewing it with . v or the default button action (when customised to
> view) it treats it as application/octet-stream.
>
> I think this is a regression but haven't checked yet: it probably has a
> simple fix so we may want to fix it before 0.16 (users may be grumpy
> about the key binding changes etc as it is!)
>
> I attach a pdf with this message (just a mozilla print-to-file of the
> notmuch webpage) which should demonstrate the problem.
I have now checked that it is a regression: 0.15 is fine and git bisect
gives the first bad commit as 1546387d723ec47cd281f3c2bf6da2fddf18c045.
The problem comes because we used to store the content-type with the
button: it was called content-type but in the function
notmuch-show-insert-part-header this was the "calculated content-type"
(with declared-type being the originally declared type).
Elsewhere though content-type is used for the original declared-type
including where the version post 1546 above picks it up (in
notmuch-show-current-part-handle).
So somehow we need to get the calculated content-type into that
function. I am not sure what the cleanest way to do that is so will
just post this for now.
Best wishes
Mark
More information about the notmuch
mailing list