emacs-wiki-discuss
[Top][All Lists]
Advanced

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

Re: [emacs-wiki-discuss] open link in emacs (and not in firefox)


From: Jim Ottaway
Subject: Re: [emacs-wiki-discuss] open link in emacs (and not in firefox)
Date: Tue, 20 Dec 2005 11:21:46 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>>>>> Pedro Kroger <address@hidden> writes:

> Hi,

> What should I do to make emacs-wiki open a file link like this:

> file:///tmp/foo.txt

> inside emacs itself, and not use firefox?

You could do something like:

(defun browse-url-local-file (file &rest args)
  (find-file (match-string 1 file)))

(setq browse-url-browser-function
      '(("\\`file://\\(.+\\)\\'" . browse-url-local-file)
        ("."                     . browse-url-firefox)))

[substitute browse-url-foo for your prefered browser]

That seems to work.  I use w3m-browse-url; that seems to treat file://
urls appropriately without the above set up.

Regards,

-- 
Jim Ottaway




reply via email to

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