help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: browse-url


From: David Kastrup
Subject: Re: browse-url
Date: Tue, 05 Apr 2005 03:29:18 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Hugh Lawson <hlawson@triad.rr.com> writes:

> David Kastrup <dak@gnu.org> writes:
>
>> This is why you need an Elisp function that will use call-process
>> instead of start-process for starting Firefox if it is supposed to
>> survive detaching.
>
> Thanks for the explanation, David.  I had trouble making it work, so
>as a trial, I added the following two functions to my ~/.emacs file.
>
> Please critique. I did this purely empirically, with no real
> understanding.
>
>
>
> (defun browse-url-firefox (url &optional new-window )
>   ;;new-window ignored
> "Ask the firefox browser to  load URL."
>  (apply 'call-process "firefox" nil
>          0 nil (list url)))

Well, looks a bit more complicated than necessary.  It should be
sufficient to write something like

(defun browse-url-firefox (url &optional new-window)
  (call-process "firefox" nil 0 nil url))

However, this should be quite equivalent to what you wrote, so if you
are experiencing problems, you'll need to describe them in more detail
to make it possible to guess what might be amiss.  At least in my
opinion, what you wrote looks like it should work.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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