* Gnu Emacs: browse-url launches Firefox with 2 tabs with same link
@ 2011-06-23 1:27 qkbeyond
0 siblings, 0 replies; only message in thread
From: qkbeyond @ 2011-06-23 1:27 UTC (permalink / raw)
To: bug-gnu-emacs
i meet the same problem as
http://groups.google.com/group/gnu.emacs.bug/browse_thread/thread/60f417ceccbd5f76/c2ed5a0bdd3f6d74?tvc=2#c2ed5a0bdd3f6d74
emacs 23.3 with firefox 3.5.19 in debian linux and emacs 24.0.50 with
firefox 4.0.1 in w32 also have this problem.
i find the solve in emacswiki.org and the following code solved the
problem instead.
;; http://www.emacswiki.org/emacs/BrowseUrl#toc7
;; firefox -a firefox -remote 'openURL(http://emacswiki.org/, new-
tab)'
(setq browse-url-firefox-program "C:/Program Files/Mozilla Firefox/
firefox.exe")
(setq browse-url-browser-function 'my-browse-url-firefox-new-tab)
(defun my-browse-url-firefox-new-tab (url &optional new-window)
"Open URL in a new tab in Firefox."
(interactive (browse-url-interactive-arg "URL: "))
(let ((cmd (shell-command-to-string
(concat browse-url-firefox-program " -a firefox 'openURL("
url ",new-tab)'"))))
(unless (string= "" cmd)
(message "Starting Firefox...")
(start-process (concat "firefox " url) nil browse-url-firefox-
program url)
(message "Starting Firefox...done"))))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-23 1:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-23 1:27 Gnu Emacs: browse-url launches Firefox with 2 tabs with same link qkbeyond
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.