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

Re: How to make browse-url-default-browser use emacs-w3m?



jidanni@xxxxxxxxxxx writes:

> How do I make (define-key dired-mode-map "b"
> browse-url-of-dired-file) use emacs-w3m and not
> Firefox.  Should I do (... browse-url-default-browser
> ... w3m-browse-url) ?

Would you like to view a .html file, listed in dired,
with w3m? In that case try:

(defun dired-view-in-w3m ()
  "View the file in `w3m'."
  (interactive)
  (w3m-find-file (dired-get-filename) ))

You can then set it up with a keystroke you like just
as you did, only you need to quote it:

(define-key dired-mode-map "A" 'dired-view-in-w3m)

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573