--- Begin Message ---
Subject: |
browse-url patch |
Date: |
Mon, 26 Jan 2004 12:02:31 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 |
Hi.
In the process of maintaining <url: http://emacro.sourceforge.net/ > I
wrote some code, which may be useful to include into browse-url.el.
If you do have time to review the code that I've written in
e-browser.el; it may be that I am writing unnecessary code, as it was
started before browse-url got to be as good as it currently is.
Essentially, e-browser.el tries to be a little more user-friendly, by
check the PATH to the browser, and choosing one.
I noticed that you do look somewhat at the gnome default browser, in
browse-url, but this may be better code.
This snippet of code sets "use-browser" to the default under Gnome (or w32)
(let ((e-def-browser (shell-command-to-string
"gconftool-2 --get /desktop/gnome/url-handlers/http/command")))
(cond
;; ((string-match "w32" (symbol-name window-system))
;; (defconst use-browser 'default)) ;w32 supports a default browser
;;Else assume this is Gnome v2, and check for default browser
(e-def-browser
(defconst use-browser ;Trim any typical " %s" off end
(substring e-def-browser 0 (string-match "[ \t]%s" e-def-browser))))
Does this get synched automatically with Emacs, or do I have to send
this patch seperately to the maintainer of browse-url.el for FSF/Gnu Emacs?
I also include code in e-browser, such as
(defconst browse-url-browser-function 'browse-url-netscape)
(defconst browse-url-netscape-program "MozillaFirebird")))
However, this leads to an annoying message at the bottom
"Starting Netscape..."
How can I override this?
I would like to support other text-mode browsers, such as links and
elinks, but lynx is hard coded and not overridable in browse-url.
Thanks for this wonderful piece of software!
--- End Message ---