From fd19dadba178f781117dfe524de834f337cbb1a6 Mon Sep 17 00:00:00 2001 From: Andreas Amann Date: Mon, 2 Mar 2015 16:49:15 +0000 Subject: [PATCH] support for "-remote" was removed in firefox 36.0 Use "--new-tab" and "--new-window" instead in browse-url-firefox --- lisp/ChangeLog | 6 ++++++ lisp/net/browse-url.el | 45 +++++++-------------------------------------- 2 files changed, 13 insertions(+), 38 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ce2e81..d39ed27 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-03-02 Andreas Amann + + * net/browse-url.el (browse-url-firefox): support for "-remote" + was removed in firefox 36.0. Use "--new-tab" and "--new-window" + instead. + 2015-03-02 Daniel Colascione * vc/vc.el (vc-responsible-backend): Add autoload cooking for diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 42fb954..b0c6064 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -1117,53 +1117,22 @@ whenever a document would otherwise be loaded in a new window, it is loaded in a new tab in an existing window instead. When called non-interactively, optional second argument -NEW-WINDOW is used instead of `browse-url-new-window-flag'. - -On MS-Windows systems the optional `new-window' parameter is -ignored. Firefox for Windows does not support the \"-remote\" -command line parameter. Therefore, the -`browse-url-new-window-flag' and `browse-url-firefox-new-window-is-tab' -are ignored as well. Firefox on Windows will always open the requested -URL in a new window." +NEW-WINDOW is used instead of `browse-url-new-window-flag'." (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) (let* ((process-environment (browse-url-process-environment)) - (use-remote - (not (memq system-type '(windows-nt ms-dos)))) (process (apply 'start-process (concat "firefox " url) nil browse-url-firefox-program (append browse-url-firefox-arguments - (if use-remote - (list "-remote" - (concat - "openURL(" - url - (if (browse-url-maybe-new-window new-window) - (if browse-url-firefox-new-window-is-tab - ",new-tab" - ",new-window")) - ")")) - (list url)))))) - ;; If we use -remote, the process exits with status code 2 if - ;; Firefox is not already running. The sentinel runs firefox - ;; directly if that happens. - (when use-remote - (set-process-sentinel process - `(lambda (process change) - (browse-url-firefox-sentinel process ,url)))))) - -(defun browse-url-firefox-sentinel (process url) - "Handle a change to the process communicating with Firefox." - (or (eq (process-exit-status process) 0) - (let* ((process-environment (browse-url-process-environment))) - ;; Firefox is not running - start it - (message "Starting Firefox...") - (apply 'start-process (concat "firefox " url) nil - browse-url-firefox-program - (append browse-url-firefox-startup-arguments (list url)))))) + (if (browse-url-maybe-new-window new-window) + (if browse-url-firefox-new-window-is-tab + '("--new-tab") + '("--new-window")) + '("--new-tab")) + (list url))))))) ;;;###autoload (defun browse-url-chromium (url &optional _new-window) -- 2.3.1