(resend: no posting in 24 hours) --------------------------------------------------------------------- I'm unsure of the syntax of browse-url-browser-function. evaluating the following:
(setq browse-url-browser-function "fire-fox") ;; where fire-fox is a simple script that I use to launch firefox ;; on my RH Linux 9.0 maching
Results in the following error message: "Wrong type argument: listp, fire-fox"
Pointers to docs or examples are welcome. thanks tim
On Thu, 2006-04-06 at 07:09 -0800, Tim Johnson wrote:
(setq browse-url-browser-function "fire-fox") ;; where fire-fox is a simple script that I use to launch firefox ;; on my RH Linux 9.0 maching
Emacs is a self-documenting editor. C-h v browse-url-browser-function for all you could possibly want. For example, mine is the symbol w3m-browse-url.
Here is what I used to use; I copied it from another browse-url function; edit as necessary. Note it is not very robust. The current Emacs development includes a `browse-url-firefox' that is much better all around.
(defun s11-browse-url-firefox (url &optional new-window-ignore) (interactive (browse-url-interactive-arg "URL: ")) (while (string-match "[,)$]" url) (setq url (replace-match (format "%%%x" (string-to-char (match-string 0 url))) t t url))) (call-process "/usr/bin/mozilla-firefox" ;firefox on my system nil 0 nil "-remote" (format "openURL(%s,new-tab)" url)))
Hi All: Thanks for all of the help so far....
FYI: I'm *some what* familiar with emacs (it's my programming platform), so I must apologize for not reading the slime docs well enough to determine that this was more of an emacs issue than a slime issue.
:-) But then I wouldn't have gotten all of these nice examples..
cheers tim
(defun s11-browse-url-firefox (url &optional new-window-ignore) (interactive (browse-url-interactive-arg "URL: ")) (while (string-match "[,)$]" url) (setq url (replace-match (format "%%%x" (string-to-char (match-string 0 url))) t t url))) (call-process "/usr/bin/mozilla-firefox" ;firefox on my system nil 0 nil "-remote" (format "openURL(%s,new-tab)" url)))
-- Stephen Compall http://scompall.nocandysw.com/blog
On Thu, 6 Apr 2006 07:09:36 -0800, tim@johnsons-web.com wrote:
(resend: no posting in 24 hours)
I'm unsure of the syntax of browse-url-browser-function. evaluating the following:
Pointers to docs or examples are welcome.
(custom-set-variables ; from GUI buttons
...
'(browse-url-browser-function (quote browse-url-generic)) '(browse-url-generic-program "opera") '(browse-url-generic-args '("-newpage")) '(browse-url-netscape-program "nil")
...
)
I think I spent about 30 minutes in trial-and-error-then-read-more-source-code to get it working as desired. As I recall, it's basically designed for Netscape with everything else patched in.
Tim Johnson tim@johnsons-web.com writes:
I'm unsure of the syntax of browse-url-browser-function. evaluating the following:
(setq browse-url-browser-function "fire-fox")
The thing assigned to the variable must be an appropriate elisp function. Try
(setq browse-url-firefox-program "/path/to/fire-fox" browse-url-browser-function 'browse-url-firefox)
PS. Try "M-x apropos firefox" and "M-x apropos browse-url".
Cheers,
-- Nikodemus Schemer: "Buddha is small, clean, and serious." Lispnik: "Buddha is big, has hairy armpits, and laughs."