From de80d5e2a6bc6233801387adac9975dfd54294a5 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Thu, 1 Aug 2013 11:05:31 +2000 Subject: [PATCH] Re: problems viewing attachments in emacs ui --- 20/a59050025b0140c51c3b169e03e0c6481cccc9 | 132 ++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 20/a59050025b0140c51c3b169e03e0c6481cccc9 diff --git a/20/a59050025b0140c51c3b169e03e0c6481cccc9 b/20/a59050025b0140c51c3b169e03e0c6481cccc9 new file mode 100644 index 000000000..0f368ad23 --- /dev/null +++ b/20/a59050025b0140c51c3b169e03e0c6481cccc9 @@ -0,0 +1,132 @@ +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 DC350431FC0 + for ; Wed, 31 Jul 2013 08:05:44 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 bKYge5oGcGEI for ; + Wed, 31 Jul 2013 08:05:37 -0700 (PDT) +Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu + [18.9.25.12]) + by olra.theworths.org (Postfix) with ESMTP id 3F551431FBF + for ; Wed, 31 Jul 2013 08:05:37 -0700 (PDT) +X-AuditID: 1209190c-b7fa48e000000947-1a-51f927c012bd +Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) + by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP + id C5.5B.02375.0C729F15; Wed, 31 Jul 2013 11:05:36 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id r6VF5ZRq003448; + Wed, 31 Jul 2013 11:05:36 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r6VF5XOY000491 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); + Wed, 31 Jul 2013 11:05:34 -0400 +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) + (envelope-from ) + id 1V4Xy0-0002Cc-Ht; Wed, 31 Jul 2013 11:05:32 -0400 +Date: Wed, 31 Jul 2013 11:05:31 -0400 +From: Austin Clements +To: Jameson Graef Rollins +Subject: Re: problems viewing attachments in emacs ui +Message-ID: <20130731150531.GX2214@mit.edu> +References: <87hafe4ox6.fsf@servo.finestructure.net> + <87ehai4ns3.fsf@servo.finestructure.net> + <20130731025303.GV2214@mit.edu> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <20130731025303.GV2214@mit.edu> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFvrPIsWRmVeSWpSXmKPExsUixG6nontA/WegwekmXYs9+7wsrt+cyezA + 5HH3NJfHs1W3mAOYorhsUlJzMstSi/TtErgyzrbNZynYJVpx6M4zpgbGNsEuRg4OCQETiRPX + jLoYOYFMMYkL99azdTFycQgJ7GOUeNa0hQXC2cgo0XH9D1TmNJNE1+d3jCAtQgJLGCWWfA0F + sVkEVCX2P9/LCmKzCWhIbNu/HKxGRMBMoufLHzCbWUBa4tvvZiYQW1jAVGLJ4pnsIDavgLbE + t6vboWY2Mkpc/K4MEReUODnzCQtEr5bEjX8vmUCuBpmz/B8HiMkpoCOxdocTSIWogIrElJPb + 2CYwCs1C0jwLSfMshOYFjMyrGGVTcqt0cxMzc4pTk3WLkxPz8lKLdA31cjNL9FJTSjcxgsKZ + U5JnB+Obg0qHGAU4GJV4eB0vfA8UYk0sK67MPcQoycGkJMprq/QzUIgvKT+lMiOxOCO+qDQn + tfgQowQHs5II7x5WoBxvSmJlVWpRPkxKmoNFSZz36dOzgUIC6YklqdmpqQWpRTBZGQ4OJQne + QDWgRsGi1PTUirTMnBKENBMHJ8hwHqDhYDW8xQWJucWZ6RD5U4yKUuK8c0ASAiCJjNI8uF5Y + unnFKA70ijDvZZAqHmCqgut+BTSYCWjwbpVvIINLEhFSUg2MkTzzEpOtTyZUan+6FnMmdHu+ + oGjnjW37RH/LK09JTdIXfeu/89fJk/dN9kzqFCnX+btjYVRFXAqHwoo1tkr+65L0X5jabRVj + s66bUS5ut6XwoXLglEcMNv53VwusSWhs3xChdyCto0bt18PnyR2XlXJN1644UX6h9IPfT0aT + aTL5T+Ydm9qtxFKckWioxVxUnAgAmt3wehIDAAA= +Cc: notmuch@notmuchmail.org +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: Wed, 31 Jul 2013 15:05:45 -0000 + +Quoth myself on Jul 30 at 10:53 pm: +> Quoth Jameson Graef Rollins on Jul 28 at 10:06 am: +> > On Sun, Jul 28 2013, Jameson Graef Rollins wrote: +> > > For instance, if I launch notmuch-show-view-part on an html part, my +> > > browser opens pointed at e.g. the following file: +> > > +> > > file:///home/jrollins/tmp/emm.610040w/mm.6100F_2.htm +> > > +> > > But the browser shows the following error: +> > > +> > > File not found +> > > Iceweasel can't find the file at /home/jrollins/tmp/emm.610040w/mm.6100F_2.htm. +> > +> > I'm now realizing that my problem with html parts is probably that +> > browser is attempting to open the temporary file in the background. +> > When the browser call returns, the caller assumes the application is +> > done with the temp file and purges it. So for this issue at least I +> > need to either convince my browser to not open the file in the +> > background, or tell emacs to cleanup temp files at some later time +> > (session termination, for instance). +> +> As pointed out by David, the root of this problem is in +> mm-display-external in mm-decode.el. mm-display-external was mostly +> rewritten between Emacs 24.1 and Emacs 24.2 (Emacs commit 1354a694). +> The Emacs 24.1 implementation would wait for the spawned process to +> exit or 30 seconds to elapse, whichever was longer, before deleting +> the file (Emacs 23 was much the same, but waited only 2 seconds). +> Based on the source comments, this appears to be the *intent* of the +> Emacs 24.2 implementation, but what the code actually does is to wait +> for whichever of these events happens *first*. So, if the spawned +> process exits immediately (like in your situation), the file will be +> deleted immediately, and even if the viewer sticks around, the file +> will be deleted after 30 seconds anyway. +> +> This must be affecting Gnus users the same way, but I haven't found +> any evidence that they're aware of it. The mm-display-external code +> still has this problem in both the current Emacs master and the +> current Gnus master. + +I dug into the Gnus repository to find the original source of this +change. For those who are curious, it's commit dce35658 from Feb. 9, +2012. Interestingly, the commit message is + + Output text from external commands in the article buffer + + * gnus-compat.el: Define `timer-set-function'. + + * mm-decode.el (mm-display-external): Output the text from the command + in the buffer after the command finished. This makes text-based + commands behave better. + +which says nothing about the complete restructuring of the timer +handling, which further reinforces my suspicion that the behavioral +change was unintentional. -- 2.26.2