all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 43318@debbugs.gnu.org
Subject: bug#43318: Unable to open remote pdf directly with eww
Date: Thu, 10 Sep 2020 14:25:55 -0700	[thread overview]
Message-ID: <CADwFkmk2cTU2BUXHKWFs0S6KNFCOh+1=2MeRNxvyamMxTRYE7A@mail.gmail.com> (raw)
In-Reply-To: <878sdh5paf.fsf@gnus.org>

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Lars Ingebrigtsen <larsi@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...

Sounds like a good analysis.

In my case I'm using evince, because at some point I put this in my
"~/.mailcap":

    application/pdf; evince %s

And I guess evince doesn't read from stdin, as you say...





  reply	other threads:[~2020-09-10 21:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 19:39 bug#43318: Unable to open remote pdf directly with eww Stefan Kangas
2020-09-10 19:55 ` Lars Ingebrigtsen
2020-09-10 20:51   ` Lars Ingebrigtsen
2020-09-10 21:25     ` Stefan Kangas [this message]
2020-09-11 12:07       ` Lars Ingebrigtsen
2020-10-02 14:31         ` Stefan Kangas
2020-10-02 14:32           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkmk2cTU2BUXHKWFs0S6KNFCOh+1=2MeRNxvyamMxTRYE7A@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=43318@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.