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

Re: Open file types with emacs-w3m



>>>>> In [emacs-w3m : No.09145] harry meyers wrote:

> I use emacs-w3m (especially w3m-namazu), but I do not succeed to
> open files with external viewers. For dired I have extview.el
> installed which apparently has no influence on emacs-w3m.
> So I tried to customize emacs-w3m via w3m Content Type Alist, that
> means I specified xpdf for a pdf viewer, which does not work.
> Something like that

> (setq w3m-content-type-alist
> ('("application/postscript" "\\.e?ps\\'" ("gv" file) nil)
>           ("application/pdf" "\\.pdf\\'" ("xpdf" file) nil)))

> does not work either. What else can I do?

Emacs-w3m uses external commands specified by the variable
`w3m-content-type-alist' to browse remote files like:

http://focus.ti.com/lit/ds/symlink/sn74hc00.pdf

But you'd like to browse local files, such as

file:///home/harry/document.pdf

, don't you?  By default, emacs-w3m uses a Lisp function specified
by the `w3m-local-find-file-function' variable for those files.
To let emacs-w3m use external commands even for browsing local
files, simply set this to nil as follows:

(setq w3m-local-find-file-function nil)

By the way, "gv" and "xpdf" should be set as the viewers for ps
files and pdf files in the `w3m-content-type-alist' variable by
default, if you have those commands installed in PATH (of which
the value is inherited into the `exec-path' variable in Emacs).
So, you don't seem to need to customize it.

Regards,