all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nikolaj Schumacher <n_schumacher@web.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Open Firefox from Emacs on MacOSX
Date: Wed, 16 May 2007 00:39:49 +0200	[thread overview]
Message-ID: <m2y7jpemoa.fsf@nschum.de> (raw)
In-Reply-To: <pcok5v9wzuw.fsf@shuttle.math.ntnu.no> (Harald Hanche-Olsen's message of "Tue\, 15 May 2007 23\:17\:43 +0200")

Harald Hanche-Olsen <hanche@math.ntnu.no> writes:

> + Stefan Nobis <snobis@gmx.de>:
>
> | I'm new to MacOSX and just tried to setup (Carbon) Emacs (22.0.97) to open a
> | new Firefox (2.0) tab for e.g. browse-url-at-point:
> |
> |   (setq browse-url-browser-function 'browse-url-firefox)
> |   (setq browse-url-firefox-program "/Applications/Firefox.app/Contents/MacOS/firefox")
> |
> I run emacs 23, so I am not sure this is in emacs 22, but I think it's
> likely, in which case something like this works for me:
>
> (defun browse-url-firefox-on-mac (url &rest ignored)
>   (do-applescript
>    (format "tell application \"Firefox\" to Get URL \"%s\"" url)))
> (setq browse-url-browser-function 'browse-url-firefox-on-mac)
>
> Not sure what to do with any extra arguments.

I'm using the latest Emacs 22 from CVS, and `browse-url-at-point' works
out of the box.  It uses `browse-url-default-macosx-browser'.  If you
need to specify Firefox, you just need add an argument to the "open"
command.

(defun browse-url-firefox-macosx (url &optional new-window)
  (interactive (browse-url-interactive-arg "URL: "))
  (start-process (concat "open -a Firefox" url) nil "open" url))

(setq browse-url-browser-function 'browse-url-firefox-macosx)


regards,
Nikolaj Schumacher

  reply	other threads:[~2007-05-15 22:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-15 19:28 Open Firefox from Emacs on MacOSX Stefan Nobis
2007-05-15 21:11 ` Joost Kremers
2007-05-15 22:42   ` Peter Dyballa
2007-05-15 21:17 ` Harald Hanche-Olsen
2007-05-15 22:39   ` Nikolaj Schumacher [this message]
     [not found]   ` <mailman.719.1179269285.32220.help-gnu-emacs@gnu.org>
2007-05-15 23:23     ` Harald Hanche-Olsen
2007-05-16 11:50   ` Stefan Nobis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2y7jpemoa.fsf@nschum.de \
    --to=n_schumacher@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.