From 56f9a00471a9ca42341a82dd49a01515fd871e3b Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Wed, 31 Jul 2013 22:53:03 +2000 Subject: [PATCH] Re: problems viewing attachments in emacs ui --- e2/79df8f089d363d24bd28928745774996c56652 | 114 ++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 e2/79df8f089d363d24bd28928745774996c56652 diff --git a/e2/79df8f089d363d24bd28928745774996c56652 b/e2/79df8f089d363d24bd28928745774996c56652 new file mode 100644 index 000000000..f94aab05f --- /dev/null +++ b/e2/79df8f089d363d24bd28928745774996c56652 @@ -0,0 +1,114 @@ +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 887FA431FC0 + for ; Tue, 30 Jul 2013 19:53:19 -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 CNNlSwKQEtcA for ; + Tue, 30 Jul 2013 19:53:11 -0700 (PDT) +Received: from dmz-mailsec-scanner-2.mit.edu (dmz-mailsec-scanner-2.mit.edu + [18.9.25.13]) + by olra.theworths.org (Postfix) with ESMTP id 3F23E431FBF + for ; Tue, 30 Jul 2013 19:53:11 -0700 (PDT) +X-AuditID: 1209190d-b7f078e000000937-10-51f87c15a4f0 +Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) + by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP + id B2.6D.02359.51C78F15; Tue, 30 Jul 2013 22:53:09 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r6V2r579010371; + Tue, 30 Jul 2013 22:53:06 -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 r6V2r3wm017733 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); + Tue, 30 Jul 2013 22:53:05 -0400 +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) + (envelope-from ) + id 1V4MX9-0006y8-HY; Tue, 30 Jul 2013 22:53:03 -0400 +Date: Tue, 30 Jul 2013 22:53:03 -0400 +From: Austin Clements +To: Jameson Graef Rollins +Subject: Re: problems viewing attachments in emacs ui +Message-ID: <20130731025303.GV2214@mit.edu> +References: <87hafe4ox6.fsf@servo.finestructure.net> + <87ehai4ns3.fsf@servo.finestructure.net> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <87ehai4ns3.fsf@servo.finestructure.net> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IRYrdT1xWt+RFo0HlTyWLPPi+L6zdnMjsw + edw9zeXxbNUt5gCmKC6blNSczLLUIn27BK6MH99fMxXs46/Y9Ho7awPjEZ4uRk4OCQETiamr + TrJC2GISF+6tZ+ti5OIQEtjHKLFyyXlWCGcjo8SJ/ZOhnNNMEuue/mSCcJYwStxsPQvWzyKg + KjH7w3QWEJtNQENi2/7ljCC2iICZRM+XP2A2s4C0xLffzUwgtrCAqcSSxTPZQWxeAW2JK6tu + g/UKCcRLLPq6gREiLihxcuYTFoheLYkb/14C9XKAzVn+jwMkzAk0Zu+2XWDlogIqElNObmOb + wCg0C0n3LCTdsxC6FzAyr2KUTcmt0s1NzMwpTk3WLU5OzMtLLdI10svNLNFLTSndxAgKak5J + 3h2M7w4qHWIU4GBU4uF1uPA9UIg1say4MvcQoyQHk5Ior0z5j0AhvqT8lMqMxOKM+KLSnNTi + Q4wSHMxKIrzyQUA53pTEyqrUonyYlDQHi5I479OnZwOFBNITS1KzU1MLUotgsjIcHEoSvFur + gBoFi1LTUyvSMnNKENJMHJwgw3mAhveA1PAWFyTmFmemQ+RPMSpKifPOAEkIgCQySvPgemFJ + 5xWjONArwrwtIFU8wIQF1/0KaDAT0ODdKt9ABpckIqSkGhjbi18dyZeYcVnYdatchvOC7s8p + K2dfL0+sV2rpDojnlDpwaFOonaJs5/atT1hV4gU29kuZC8nKBCttnu+6fDX3ptmPK3IWnKqJ + OrC8Yrn0Buv0km2LjlbENgfdzWF33Dxh7RFn9nX830u0n2fnsGnPXOHAUDjxw70vF0rumvSV + xzj4vyuJaVViKc5INNRiLipOBACj/8/pFQMAAA== +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 02:53:19 -0000 + +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. -- 2.26.2