From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/85406 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Trouble viewing PDF attachments (with patches) Date: Wed, 31 Dec 2014 09:20:22 +0800 Message-ID: <87iogszkbt.fsf@ericabrahamsen.net> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1419988558 21541 80.91.229.3 (31 Dec 2014 01:15:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2014 01:15:58 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M33648@lists.math.uh.edu Wed Dec 31 02:15:51 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y67t8-0004Qm-Ok for ding-account@gmane.org; Wed, 31 Dec 2014 02:15:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Y67s9-0001hF-5E; Tue, 30 Dec 2014 19:14:49 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Y67s6-0001h3-HJ for ding@lists.math.uh.edu; Tue, 30 Dec 2014 19:14:46 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1Y67rw-0007Nb-8a for ding@lists.math.uh.edu; Tue, 30 Dec 2014 19:14:46 -0600 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1Y67ru-0005UY-51 for ding@gnus.org; Wed, 31 Dec 2014 02:14:34 +0100 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Y67rr-0003R8-F9 for ding@gnus.org; Wed, 31 Dec 2014 02:14:32 +0100 Original-Received: from 222.128.166.127 ([222.128.166.127]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 31 Dec 2014 02:14:31 +0100 Original-Received: from eric by 222.128.166.127 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 31 Dec 2014 02:14:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 48 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 222.128.166.127 User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:XXu+lup+rjSct+tWBPM1jm8Eim4= X-Spam-Score: -0.4 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:85406 Archived-At: peder@news.klingenberg.no (Peder O. Klingenberg) writes: > Lately, all my attempts to view PDF attachments have ended in > 'mailcap-save-binary-file instead of popping up xpdf like they used to. > After spending far to long last night digging through sources, the > culprit turned out to be Lars' commit f8b31759 from December 6, which > added the symbol doc-view-mode to mailcap-mime-data as a PDF viewer.[1] Thanks for digging into this! I've been annoyed by the same problem for quite a while, though obviously not annoyed enough to actually go looking for the problem. I hope your solution or something like it is accepted! Eric > This confused mm-display-part, which thought all methods should be > strings. Removing that test passes doc-view-mode on to > mm-display-external, which already has provisions for funcalling > symbols. That's what the first attached patch does. > > However, the support for lisp-based "external" viewers in > mm-display-external seems not exactly complete. When I tried to show > attachments with only the first patch applied, a doc-view-mode buffer > replaced my article buffer, but focus remained in the summary buffer, > and thus the keymaps were not those of DocView. > > The second patch below tries to alleviate that, but I'm out of my depth > and not really happy with it. What I wanted to do was to let DocView > (or in general, whatever lisp-based viewer mailcap would return) take > over the frame, and when I'm done with it, pop back to my gnus windows. > Ideally, I also think that it should be configurable to pop up a new > frame, so I can keep reading the article while looking at the PDF. > > I settled instead for popping back to just the summary buffer, which > means another keystroke to reopen the article. And the way I did that > seems ugly and hackish to me. Thoughts? > > (emacs copyright assignment is on file, should you choose to apply > either of these patches) > > ...Peder... > > Footnotes: > [1] I'm not really conviced that was a good idea, but there's no reason > it shouldn't work in principle. If it can be made to work as well > as an external viewer, I'm probably in favour, as DocView in my > already open emacs is much faster than spawning an external program > when running X remotely over the wet string they label broadband.