Re: problems viewing attachments in emacs ui
authorAustin Clements <amdragon@MIT.EDU>
Wed, 31 Jul 2013 02:53:03 +0000 (22:53 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:56:12 +0000 (09:56 -0800)
e2/79df8f089d363d24bd28928745774996c56652 [new file with mode: 0644]

diff --git a/e2/79df8f089d363d24bd28928745774996c56652 b/e2/79df8f089d363d24bd28928745774996c56652
new file mode 100644 (file)
index 0000000..f94aab0
--- /dev/null
@@ -0,0 +1,114 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 887FA431FC0\r
+       for <notmuch@notmuchmail.org>; Tue, 30 Jul 2013 19:53:19 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id CNNlSwKQEtcA for <notmuch@notmuchmail.org>;\r
+       Tue, 30 Jul 2013 19:53:11 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-2.mit.edu (dmz-mailsec-scanner-2.mit.edu\r
+       [18.9.25.13])\r
+       by olra.theworths.org (Postfix) with ESMTP id 3F23E431FBF\r
+       for <notmuch@notmuchmail.org>; Tue, 30 Jul 2013 19:53:11 -0700 (PDT)\r
+X-AuditID: 1209190d-b7f078e000000937-10-51f87c15a4f0\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id B2.6D.02359.51C78F15; Tue, 30 Jul 2013 22:53:09 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r6V2r579010371; \r
+       Tue, 30 Jul 2013 22:53:06 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r6V2r3wm017733\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Tue, 30 Jul 2013 22:53:05 -0400\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1V4MX9-0006y8-HY; Tue, 30 Jul 2013 22:53:03 -0400\r
+Date: Tue, 30 Jul 2013 22:53:03 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>\r
+Subject: Re: problems viewing attachments in emacs ui\r
+Message-ID: <20130731025303.GV2214@mit.edu>\r
+References: <87hafe4ox6.fsf@servo.finestructure.net>\r
+       <87ehai4ns3.fsf@servo.finestructure.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87ehai4ns3.fsf@servo.finestructure.net>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IRYrdT1xWt+RFo0HlTyWLPPi+L6zdnMjsw\r
+       edw9zeXxbNUt5gCmKC6blNSczLLUIn27BK6MH99fMxXs46/Y9Ho7awPjEZ4uRk4OCQETiamr\r
+       TrJC2GISF+6tZ+ti5OIQEtjHKLFyyXlWCGcjo8SJ/ZOhnNNMEuue/mSCcJYwStxsPQvWzyKg\r
+       KjH7w3QWEJtNQENi2/7ljCC2iICZRM+XP2A2s4C0xLffzUwgtrCAqcSSxTPZQWxeAW2JK6tu\r
+       g/UKCcRLLPq6gREiLihxcuYTFoheLYkb/14C9XKAzVn+jwMkzAk0Zu+2XWDlogIqElNObmOb\r
+       wCg0C0n3LCTdsxC6FzAyr2KUTcmt0s1NzMwpTk3WLU5OzMtLLdI10svNLNFLTSndxAgKak5J\r
+       3h2M7w4qHWIU4GBU4uF1uPA9UIg1say4MvcQoyQHk5Ior0z5j0AhvqT8lMqMxOKM+KLSnNTi\r
+       Q4wSHMxKIrzyQUA53pTEyqrUonyYlDQHi5I479OnZwOFBNITS1KzU1MLUotgsjIcHEoSvFur\r
+       gBoFi1LTUyvSMnNKENJMHJwgw3mAhveA1PAWFyTmFmemQ+RPMSpKifPOAEkIgCQySvPgemFJ\r
+       5xWjONArwrwtIFU8wIQF1/0KaDAT0ODdKt9ABpckIqSkGhjbi18dyZeYcVnYdatchvOC7s8p\r
+       K2dfL0+sV2rpDojnlDpwaFOonaJs5/atT1hV4gU29kuZC8nKBCttnu+6fDX3ptmPK3IWnKqJ\r
+       OrC8Yrn0Buv0km2LjlbENgfdzWF33Dxh7RFn9nX830u0n2fnsGnPXOHAUDjxw70vF0rumvSV\r
+       xzj4vyuJaVViKc5INNRiLipOBACj/8/pFQMAAA==\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 31 Jul 2013 02:53:19 -0000\r
+\r
+Quoth Jameson Graef Rollins on Jul 28 at 10:06 am:\r
+> On Sun, Jul 28 2013, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
+> > For instance, if I launch notmuch-show-view-part on an html part, my\r
+> > browser opens pointed at e.g. the following file:\r
+> >\r
+> >   file:///home/jrollins/tmp/emm.610040w/mm.6100F_2.htm\r
+> >\r
+> > But the browser shows the following error:\r
+> >\r
+> >   File not found\r
+> >   Iceweasel can't find the file at /home/jrollins/tmp/emm.610040w/mm.6100F_2.htm.\r
+> \r
+> I'm now realizing that my problem with html parts is probably that\r
+> browser is attempting to open the temporary file in the background.\r
+> When the browser call returns, the caller assumes the application is\r
+> done with the temp file and purges it.  So for this issue at least I\r
+> need to either convince my browser to not open the file in the\r
+> background, or tell emacs to cleanup temp files at some later time\r
+> (session termination, for instance).\r
+\r
+As pointed out by David, the root of this problem is in\r
+mm-display-external in mm-decode.el.  mm-display-external was mostly\r
+rewritten between Emacs 24.1 and Emacs 24.2 (Emacs commit 1354a694).\r
+The Emacs 24.1 implementation would wait for the spawned process to\r
+exit or 30 seconds to elapse, whichever was longer, before deleting\r
+the file (Emacs 23 was much the same, but waited only 2 seconds).\r
+Based on the source comments, this appears to be the *intent* of the\r
+Emacs 24.2 implementation, but what the code actually does is to wait\r
+for whichever of these events happens *first*.  So, if the spawned\r
+process exits immediately (like in your situation), the file will be\r
+deleted immediately, and even if the viewer sticks around, the file\r
+will be deleted after 30 seconds anyway.\r
+\r
+This must be affecting Gnus users the same way, but I haven't found\r
+any evidence that they're aware of it.  The mm-display-external code\r
+still has this problem in both the current Emacs master and the\r
+current Gnus master.\r