Tassilo Horn <[EMAIL PROTECTED]> writes:

> Tim X <[EMAIL PROTECTED]> writes:
>
> Hi Tim,
>
>>>>> 5. Dired key: It would be nice to have a defcustom value that would
>>>>> specify a dired map key that would call doc-view on a file (with a
>>>>> new doc-view function that doesn't prompt for the file name). This
>>>>> would make it easier to "browse" pdf files in dired.
>>>>
>>>> Good idea.  I'll add that.  Do you have a good suggestion what key
>>>> could be used and is free?
>>>
>>> How about "b" (for browse) or "V" (for View)?
>>
>> I think 'b' is available. However, you may find it useful to do what I
>> did in my txutils.el package. I used defadvice around view-file (which
>> is bound to v in dired).
>
> Since I was asked to include doc-view.el in Emacs I'm not sure if
> defadvice would be too good.  AFAIK RMS doesn't like it too much.
>

Actually, this is a misunderstanding of RMS' position. It is true he
doesn't want defadvice used in packages that are part of emacs, but thats
not because he doesn't like the mechanism. His view is that it could make
debugging of problems harder because it can obscure what is going on. As a
facility to change exisitnig functionality, he has no issue with it. 

So, yes, your right you shouldn't use it if the package is going to be part
of emacs, but incorrect on the reason. However, since it will be part of
emacs, there is no reason you couldn't ask for a change - either to how
view-file works or to how/what is bound to the 'v' key in dired. For
exmaple, you could create a new funciton that is bound to v which does
things specific based on the file extension. 

>> So, now if I hit v on a pdf, ps, doc, ppt html etc file, it converts
>> the file to either text or html and then displays it in a buffer (in
>> the case of html output and .html files, it just uses browse-url to
>> display the rendered version).
>
> At least for PS files that may not be the right thing.  Users might want
> to view it with `ps-mode' instead.
>

One of the nice things about advising view-file is that you still get
standard behavior if you just hit enter i.e. if you hit enter on a ps file,
it will just open the file in ps-mode. However, ps-mode is I think for
hacking at the postscript level rather than for viewing. 

The nice thing about the txutils package is that all of this is controlled
by a customizable variable. If you remove the translation entry for
PostScript, then no conversion will occur.

Tim

>
>
>

-- 
tcross (at) rapttech dot com dot au
_______________________________________________
gnu-emacs-sources mailing list
gnu-emacs-sources@gnu.org
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources

Reply via email to