GNU bug report logs - #43318
Unable to open remote pdf directly with eww

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Thu, 10 Sep 2020 19:41:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 43318 <at> debbugs.gnu.org
Subject: bug#43318: Unable to open remote pdf directly with eww
Date: Thu, 10 Sep 2020 22:51:04 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> In that case, it should try using a different pdf viewer, but I'm not
> quite sure how that's handled.  mailcap should probably be consulted?

Oh, that is what it's doing:

(defun mailcap-view-mime (type)
  "View the data in the current buffer that has MIME type TYPE.
`mailcap--computed-mime-data' determines the method to use."
  (let ((method (mailcap-mime-info type)))
    (if (stringp method)
	(shell-command-on-region (point-min) (point-max)
				 ;; Use stdin as the "%s".
				 (format method "-")
				 (current-buffer)
				 t)
      (funcall method))))

eww puts the pdf data in a buffer and calls (for instance) "xpdf -" on
the data.

But this'll fail for most pdf viewers -- most of them don't read from
stdin, so this seems like a pretty gross hack...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 291 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.