* bug#19270: 25.0.50; Make PDF Mode in EWW customizable
2014-12-04 16:20 ` bug#19270: 25.0.50; Make PDF Mode " Stefan Monnier
@ 2014-12-04 16:29 ` Lars Magne Ingebrigtsen
2014-12-04 20:23 ` Stefan Monnier
` (2 more replies)
2014-12-04 17:10 ` Ivan Shmakov
2014-12-05 11:02 ` bug#19270: 25.0.50; Make PDF Mode " Sebastian Wiesner
2 siblings, 3 replies; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 2014-12-04 16:29 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Sebastian Wiesner, 19270
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> IOW, maybe adding configurability to EWW is good in itself, but I think
> your use case would be better served by a config elsewhere, which would
> cover EWW as well as other cases where we might want to view PDF files.
Yes, this sounds like a good idea. We already have too many ways to
customise this stuff.
`auto-mode-alist' is used for file-ending-based discovery, and
`mailcap-mime-data' (etc.) is used for MIME-based decisions. The latter
would make more sense in eww, but I don't think anybody has been
maintaining that much. For instance, `doc-view-mode-maybe' is not a
default there, which it should be.
Perhaps we need a MIME type to file ending map. :-)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#19270: 25.0.50; Make PDF Mode in EWW customizable
2014-12-04 16:29 ` Lars Magne Ingebrigtsen
@ 2014-12-04 20:23 ` Stefan Monnier
2014-12-05 13:57 ` Lars Magne Ingebrigtsen
2014-12-05 15:52 ` Lars Magne Ingebrigtsen
2014-12-05 17:32 ` Rüdiger Sonderfeld
2 siblings, 1 reply; 14+ messages in thread
From: Stefan Monnier @ 2014-12-04 20:23 UTC (permalink / raw)
To: Lars Magne Ingebrigtsen; +Cc: Sebastian Wiesner, 19270
> Perhaps we need a MIME type to file ending map. :-)
I think we'd be better off the other way around.
Stefan
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#19270: 25.0.50; Make PDF Mode in EWW customizable
2014-12-04 20:23 ` Stefan Monnier
@ 2014-12-05 13:57 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 2014-12-05 13:57 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Sebastian Wiesner, 19270
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Perhaps we need a MIME type to file ending map. :-)
>
> I think we'd be better off the other way around.
Indeed, and that rings a vague bell...
*grepping happens here*
`mailcap-mime-extensions' has this mapping. (Well, it goes the other
way around, but that's not really a problem.) So writing a
MIME-type-to-action list based on `auto-mode-alist' should be trivial.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#19270: 25.0.50; Make PDF Mode in EWW customizable
2014-12-04 16:29 ` Lars Magne Ingebrigtsen
2014-12-04 20:23 ` Stefan Monnier
@ 2014-12-05 15:52 ` Lars Magne Ingebrigtsen
2014-12-05 17:32 ` Rüdiger Sonderfeld
2 siblings, 0 replies; 14+ messages in thread
From: Lars Magne Ingebrigtsen @ 2014-12-05 15:52 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Sebastian Wiesner, 19270
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> `auto-mode-alist' is used for file-ending-based discovery, and
> `mailcap-mime-data' (etc.) is used for MIME-based decisions.
I made eww use this. Viewers when looking at mail and the web should be
a similar-ish decision.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#19270: 25.0.50; Make PDF Mode in EWW customizable
2014-12-04 16:29 ` Lars Magne Ingebrigtsen
2014-12-04 20:23 ` Stefan Monnier
2014-12-05 15:52 ` Lars Magne Ingebrigtsen
@ 2014-12-05 17:32 ` Rüdiger Sonderfeld
2 siblings, 0 replies; 14+ messages in thread
From: Rüdiger Sonderfeld @ 2014-12-05 17:32 UTC (permalink / raw)
To: 19270; +Cc: larsi, swiesner
On Thursday 04 December 2014 17:29:06 Lars Magne Ingebrigtsen wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > IOW, maybe adding configurability to EWW is good in itself, but I think
> > your use case would be better served by a config elsewhere, which would
> > cover EWW as well as other cases where we might want to view PDF files.
>
> Yes, this sounds like a good idea. We already have too many ways to
> customise this stuff.
>
> `auto-mode-alist' is used for file-ending-based discovery, and
> `mailcap-mime-data' (etc.) is used for MIME-based decisions. The latter
> would make more sense in eww, but I don't think anybody has been
> maintaining that much. For instance, `doc-view-mode-maybe' is not a
> default there, which it should be.
>
> Perhaps we need a MIME type to file ending map. :-)
I'd also like to point out, that we have a `eww-use-external-browser-for-
content-type' variable. Maybe there is a way to incorporate this as well?
Regards,
Rüdiger
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#19270: 25.0.50; Make PDF Mode in EWW customizable
2014-12-04 16:20 ` bug#19270: 25.0.50; Make PDF Mode " Stefan Monnier
2014-12-04 16:29 ` Lars Magne Ingebrigtsen
@ 2014-12-04 17:10 ` Ivan Shmakov
2014-12-04 20:25 ` Stefan Monnier
2014-12-05 11:02 ` bug#19270: 25.0.50; Make PDF Mode " Sebastian Wiesner
2 siblings, 1 reply; 14+ messages in thread
From: Ivan Shmakov @ 2014-12-04 17:10 UTC (permalink / raw)
To: 19270
>>>>> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Currently EWW uses `doc-view-mode' to view PDF data. This choice is
>> hard-coded in `eww-display-pdf' and cannot be customized.
> I wonder: do you sometimes prefer doc-view-mode?
> If not, then rather than configuring EWW, you'd probably be better
> off with a way to configure Emacs to always use my-pdf-mode for PDF
> files.
> IOW, maybe adding configurability to EWW is good in itself, but I
> think your use case would be better served by a config elsewhere,
> which would cover EWW as well as other cases where we might want to
> view PDF files.
How would that help if EWW will still launch doc-view-mode for
any PDF files going through it?
As in: M-x eww RET hello, world! RET, find some link among the
search results, RET over it. Now, should retrieving that link
result in a Content-Type: application/pdf document, –
doc-view-mode is sure to be invoked.
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#19270: 25.0.50; Make PDF Mode in EWW customizable
2014-12-04 17:10 ` Ivan Shmakov
@ 2014-12-04 20:25 ` Stefan Monnier
2014-12-04 21:24 ` bug#19270: 25.0.50; make PDF mode " Ivan Shmakov
0 siblings, 1 reply; 14+ messages in thread
From: Stefan Monnier @ 2014-12-04 20:25 UTC (permalink / raw)
To: Ivan Shmakov; +Cc: 19270
>> IOW, maybe adding configurability to EWW is good in itself, but I
>> think your use case would be better served by a config elsewhere,
>> which would cover EWW as well as other cases where we might want to
>> view PDF files.
> How would that help if EWW will still launch doc-view-mode for
> any PDF files going through it?
I don't understand: did you maybe fail to notice the "which would cover
EWW" in my message above?
Stefan
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#19270: 25.0.50; make PDF mode in EWW customizable
2014-12-04 20:25 ` Stefan Monnier
@ 2014-12-04 21:24 ` Ivan Shmakov
0 siblings, 0 replies; 14+ messages in thread
From: Ivan Shmakov @ 2014-12-04 21:24 UTC (permalink / raw)
To: 19270
>>>>> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> IOW, maybe adding configurability to EWW is good in itself, but I
>>> think your use case would be better served by a config elsewhere,
>>> which would cover EWW as well as other cases where we might want to
>>> view PDF files.
>> How would that help if EWW will still launch doc-view-mode for any
>> PDF files going through it?
> I don't understand: did you maybe fail to notice the "which would
> cover EWW" in my message above?
Somehow, I’ve interpreted that as “EWW is covered already,”
which is contrary to my observations. Sorry for the noise.
Otherwise, indeed, relying on the mailcap.el facilities there
may be the way to go. I guess that might require some work,
though. (As in: allow the user to choose among the several
handlers provided for a given Content-Type:.)
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#19270: 25.0.50; Make PDF Mode in EWW customizable
2014-12-04 16:20 ` bug#19270: 25.0.50; Make PDF Mode " Stefan Monnier
2014-12-04 16:29 ` Lars Magne Ingebrigtsen
2014-12-04 17:10 ` Ivan Shmakov
@ 2014-12-05 11:02 ` Sebastian Wiesner
2014-12-05 15:40 ` Stefan Monnier
2 siblings, 1 reply; 14+ messages in thread
From: Sebastian Wiesner @ 2014-12-05 11:02 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 19270
> Am 04.12.2014 um 17:20 schrieb Stefan Monnier <monnier@iro.umontreal.ca>:
>
>> Currently EWW uses `doc-view-mode' to view PDF data. This choice is
>> hard-coded in `eww-display-pdf' and cannot be customized.
>
> I wonder: do you sometimes prefer doc-view-mode?
>
> If not, then rather than configuring EWW, you'd probably be better off
> with a way to configure Emacs to always use my-pdf-mode for PDF files.
That's not possible either. As I said, it's hard-coded in EWW currently.
> IOW, maybe adding configurability to EWW is good in itself, but I think
> your use case would be better served by a config elsewhere, which would
> cover EWW as well as other cases where we might want to view PDF files.
Well, whatever way you want, but just add a way to tell EWW what to use for PDFs.
But do we really need a new setting? I don't know EWW, so please excuse me, if I'm asking a stupid question, but why does EWW not rely on `auto-mode-alist'? Instead of using a generic buffer without a file name, it could create a separate buffer and set it's name and file name according to the URL of the PDF file, and then just use `set-auto-mode'. Would that work, or am I missing something?
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#19270: 25.0.50; Make PDF Mode in EWW customizable
2014-12-05 11:02 ` bug#19270: 25.0.50; Make PDF Mode " Sebastian Wiesner
@ 2014-12-05 15:40 ` Stefan Monnier
2014-12-05 16:13 ` Sebastian Wiesner
0 siblings, 1 reply; 14+ messages in thread
From: Stefan Monnier @ 2014-12-05 15:40 UTC (permalink / raw)
To: Sebastian Wiesner; +Cc: 19270
>> If not, then rather than configuring EWW, you'd probably be better off
>> with a way to configure Emacs to always use my-pdf-mode for PDF files.
Here I talk about making a change to Emacs.
> That's not possible either. As I said, it's hard-coded in EWW currently.
Here you talk about Emacs as it currently is. We agree.
Stefan
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#19270: 25.0.50; Make PDF Mode in EWW customizable
2014-12-05 15:40 ` Stefan Monnier
@ 2014-12-05 16:13 ` Sebastian Wiesner
0 siblings, 0 replies; 14+ messages in thread
From: Sebastian Wiesner @ 2014-12-05 16:13 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 19270
Am 5. Dezember 2014 16:40:16 MEZ, schrieb Stefan Monnier <monnier@iro.umontreal.ca>:
>>> If not, then rather than configuring EWW, you'd probably be better
>off
>>> with a way to configure Emacs to always use my-pdf-mode for PDF
>files.
>
>Here I talk about making a change to Emacs.
>
>> That's not possible either. As I said, it's hard-coded in EWW
>currently.
>
>Here you talk about Emacs as it currently is. We agree.
Oh, I've misunderstood your message then. I'm sorry.
^ permalink raw reply [flat|nested] 14+ messages in thread