[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please install: Some improvements to doc-view.el

From: Tassilo Horn
Subject: Re: Please install: Some improvements to doc-view.el
Date: Tue, 09 Oct 2007 11:02:34 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

Juri Linkov <address@hidden> writes:

>>>> Since doc-view-mode doesn't call an external viewer, but instead
>>>> renders the file as an image inside the Emacs buffer, I think a
>>>> good solution would be to use the same user interface as is
>>>> implemented by image-mode: by default, visiting a pdf/dvi file
>>>> could display a rendered image (which is more preferable for most
>>>> users than editing them, I guess).  But if the user still wants to
>>>> edit the source file or to view it as text, then the user could
>>>> type `C-c C-c'.
>>> +1
>> Would be ok for me, but I'll wait for a decision for the doc-view
>> vs. Gnus mechanism before implementing it.
> I think Gnus mechanism is irrelevant to doc-view.  Gnus uses mailcap
> mechanisms to find the appropriate mailcap entry and run an external
> program in a separate process.  doc-view displays the rendered image
> in the Emacs buffer.  So it could work exactly as image-mode for
> pdf/ps/dvi files.

Ok, that sounds reasonable to me and I'm willing to implement it.  If I
understand correctly, I have to add entries to `auto-mode-alist' and
change `doc-view-mode' so that it calls `doc-view' for the current
`buffer-file-name' plus a binding `C-c C-c' to toggle between the
rendered image presentation and the text representation.  Is that

One problem I see: Should `doc-view' called with NO-CACHE set to t?
Personally I prefer calling (doc-view nil file) and adding a binding to
the mode to reconvert the document.

> As for the mailcap feature, I recall there was a proposal to put
> programs from the mailcap entry to the default value of the ! command
> (`dired-do-shell-command').

I'd second that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]