From: Tomi Ollila Date: Tue, 30 Jul 2013 21:00:07 +0000 (+0300) Subject: Re: [PATCH] emacs: bugfix attachment content-type as mime-type handling X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b92524802f399f4b22e7f46a23e34b1d7d6f5834;p=notmuch-archives.git Re: [PATCH] emacs: bugfix attachment content-type as mime-type handling --- diff --git a/c0/1b1a20494b9dba6053a94fb9d896a4b780f1c8 b/c0/1b1a20494b9dba6053a94fb9d896a4b780f1c8 new file mode 100644 index 000000000..bff7a1f75 --- /dev/null +++ b/c0/1b1a20494b9dba6053a94fb9d896a4b780f1c8 @@ -0,0 +1,84 @@ +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 39137431FC0 + for ; Tue, 30 Jul 2013 14:00:26 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +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 V-TwCPDis0Ci for ; + Tue, 30 Jul 2013 14:00:17 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id A0D96431FBF + for ; Tue, 30 Jul 2013 14:00:17 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 38D70100033; + Wed, 31 Jul 2013 00:00:08 +0300 (EEST) +From: Tomi Ollila +To: Mark Walters , notmuch@notmuchmail.org +Subject: Re: [PATCH] emacs: bugfix attachment content-type as mime-type + handling +In-Reply-To: <1375200900-5650-1-git-send-email-markwalters1009@gmail.com> +References: <87li4om623.fsf@qmul.ac.uk> + <1375200900-5650-1-git-send-email-markwalters1009@gmail.com> +User-Agent: Notmuch/0.15.2+225~g6062adf (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Tue, 30 Jul 2013 21:00:26 -0000 + +On Tue, Jul 30 2013, Mark Walters wrote: + +> Notmuch puts attachments in as declared content-type except when the +> content-type is application/octet-stream it tries to guess the type +> from the filename/extension. This means that viewing a pdf (for +> example) which is sent as application/octet-strem invokes the pdf +> viewer rather than just offering to save the part. +> +> Recent changes to the attachment handling (commit 1546387d) changed +> (broke) this. This patch stores the calculated mime-type with the part +> and changes the attachment part handlers can use it instead. +> --- +> This seems to fix the bug for me. I am not sure I like the naming +> (mime-type/content-type). Maybe it would be better to be explicit with +> something like calculated-content-type but probably that should be a +> more wholesale renaming. + +I tested this (before and after applying the patch), using notmuch +remotely and viewing id:87ppu0t7yf.fsf@qmul.ac.uk . +Before applying emacs promted me an output file, after applying xdg-open +was executed - which executed evince to show the pdf document in that email. + +If this restores the behaviour that was experienced with notmuch 0.15(.2) +then this imho is a good fix to be applied quickly before 0.16 is released... + +> +> Best wishes +> +> Mark + +Tomi +