unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19921: Support URL open for upcomming Mozilla Firefox 36
@ 2015-02-22  8:01 Ryo ONODERA
  2015-02-24 23:05 ` Glenn Morris
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ryo ONODERA @ 2015-02-22  8:01 UTC (permalink / raw)
  To: 19921

Hi,

Firefox 36 or later has no "-remote" command line option anymore.
browse-url-firefox of Emacs uses this "-remote" option
to open URL as new window or new tab.
We should use "--new-tab URLString" or "--new-window URLString" instead.

See
https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#-remote_remote_command
> This feature has been removed in Firefox 36.


Following patch uses --new-tab or --new-window command line option.
This works with Mozilla Firefox 36.0 build 10.

diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 42fb954..6ad14a2 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1137,15 +1137,12 @@ URL in a new window."
 		 (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
+		       (if (browse-url-maybe-new-window new-window)
+			   (if browse-url-firefox-new-window-is-tab
+			       "--new-tab"
+			     "--new-window"))
+		       url)
 		    (list url))))))
     ;; If we use -remote, the process exits with status code 2 if
     ;; Firefox is not already running.  The sentinel runs firefox

--
Ryo ONODERA // ryo_on@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#19921: Support URL open for upcomming Mozilla Firefox 36
  2015-02-22  8:01 bug#19921: Support URL open for upcomming Mozilla Firefox 36 Ryo ONODERA
@ 2015-02-24 23:05 ` Glenn Morris
  2015-03-02  8:49   ` Peter Münster
  2015-02-27  8:12 ` bug#19921: SIGHUP related subtlety remains Teika Kazura
  2015-03-07 11:16 ` bug#19921: [PATCH] browse-url-firefox: Remove MS-Windows special case Ulrich Mueller
  2 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2015-02-24 23:05 UTC (permalink / raw)
  To: 19921-done

Version: 24.5

I see that Firefox 36 is now released, so fixed in emacs-24.

(Someone really needs to take a sledgehammer to the plethora of options
and functions in browse-url.)





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19921: SIGHUP related subtlety remains
  2015-02-22  8:01 bug#19921: Support URL open for upcomming Mozilla Firefox 36 Ryo ONODERA
  2015-02-24 23:05 ` Glenn Morris
@ 2015-02-27  8:12 ` Teika Kazura
  2015-03-07 11:16 ` bug#19921: [PATCH] browse-url-firefox: Remove MS-Windows special case Ulrich Mueller
  2 siblings, 0 replies; 9+ messages in thread
From: Teika Kazura @ 2015-02-27  8:12 UTC (permalink / raw)
  To: 19921

Thanks for fixing, but there remains a flaw, at least for me.

Starting from firefox-36, it (`browse-url-firefox') doesn't work, due to bug #16019 (http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16019)

My fix is to make firefox SIGHUP-immune, by adding the following line to /usr/bin/firefox (I'm using Linux.):
------------------------------------------------------------------------
trap "" SIGHUP
------------------------------------------------------------------------

Should I open a separate bug report? Dropping "-remote" was handled correctly by the commit http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-24&id=1b0ebbdb566a8dfa5f45ce121b2c835e9760091f, and my complaint may not be reproduced by others. (Perhaps this bug is due to the fact that my PC is slower than most's.)





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19921: Support URL open for upcomming Mozilla Firefox 36
  2015-02-24 23:05 ` Glenn Morris
@ 2015-03-02  8:49   ` Peter Münster
  2015-03-02 17:01     ` Glenn Morris
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Münster @ 2015-03-02  8:49 UTC (permalink / raw)
  To: 19921, Glenn Morris

On Tue, Feb 24 2015, Glenn Morris wrote:

> Version: 24.5
>
> I see that Firefox 36 is now released, so fixed in emacs-24.

Hi,

About when will this be fixed in the master-branch please?

Thanks,
-- 
           Peter





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19921: Support URL open for upcomming Mozilla Firefox 36
  2015-03-02  8:49   ` Peter Münster
@ 2015-03-02 17:01     ` Glenn Morris
  0 siblings, 0 replies; 9+ messages in thread
From: Glenn Morris @ 2015-03-02 17:01 UTC (permalink / raw)
  To: Peter Münster; +Cc: 19921

Peter Münster wrote:

> About when will this be fixed in the master-branch please?

Whenever someone complies with my request to merge emacs-24 to master.

http://lists.gnu.org/archive/html/emacs-devel/2015-02/msg01345.html





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19921: [PATCH] browse-url-firefox: Remove MS-Windows special case.
  2015-02-22  8:01 bug#19921: Support URL open for upcomming Mozilla Firefox 36 Ryo ONODERA
  2015-02-24 23:05 ` Glenn Morris
  2015-02-27  8:12 ` bug#19921: SIGHUP related subtlety remains Teika Kazura
@ 2015-03-07 11:16 ` Ulrich Mueller
  2015-03-07 12:16   ` Eli Zaretskii
  2 siblings, 1 reply; 9+ messages in thread
From: Ulrich Mueller @ 2015-03-07 11:16 UTC (permalink / raw)
  To: 19921

Firefox on MS-Windows supports both the -new-tab and -new-window
options, so the special case is no longer necessary there. I have
tested this with Firefox 11.0 under Windows XP and Firefox 36.0.1
under MS-Windows 8.1.

See patch below. It should be pushed to the emacs-24 branch, I guess?


From 3e3f9ade6aa13fbeb93ee2eee117ef8e04aec5d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@gentoo.org>
Date: Sat, 7 Mar 2015 11:47:56 +0100
Subject: [PATCH] browse-url-firefox: Remove MS-Windows special case.

* lisp/net/browse-url.el (browse-url-firefox): Remove MS-Windows
special case.
---
 lisp/ChangeLog         |  5 +++++
 lisp/net/browse-url.el | 17 +++++------------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0e4e463..95ab6cc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-07  Ulrich Müller  <ulm@gentoo.org>
+
+	* net/browse-url.el (browse-url-firefox): Remove MS-Windows
+	special case.
+
 2015-03-07  Eli Zaretskii  <eliz@gnu.org>
 
 	* dired.el (dired-delete-file): Doc fix.  (Bug#20021)
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 4819cdc..d82d447 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1117,11 +1117,7 @@ whenever a document would otherwise be loaded in a new window, it
 is loaded in a new tab in an existing window instead.
 
 Non-interactively, this uses the optional second argument NEW-WINDOW
-instead of `browse-url-new-window-flag'.
-
-On MS Windows, this ignores `browse-url-new-window-flag' and
-`browse-url-firefox-new-window-is-tab', as well as the NEW-WINDOW argument.
-It always uses a new window."
+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)))
@@ -1130,13 +1126,10 @@ It always uses a new window."
            browse-url-firefox-program
            (append
             browse-url-firefox-arguments
-            ;; FIXME someone should check if this limitation
-            ;; still applies.
-            (unless (memq system-type '(windows-nt ms-dos))
-              (if (browse-url-maybe-new-window new-window)
-                  (if browse-url-firefox-new-window-is-tab
-                      '("-new-tab")
-                    '("-new-window"))))
+	    (if (browse-url-maybe-new-window new-window)
+		(if browse-url-firefox-new-window-is-tab
+		    '("-new-tab")
+		  '("-new-window")))
             (list url)))))
 
 ;;;###autoload
-- 
2.3.1






^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#19921: [PATCH] browse-url-firefox: Remove MS-Windows special case.
  2015-03-07 11:16 ` bug#19921: [PATCH] browse-url-firefox: Remove MS-Windows special case Ulrich Mueller
@ 2015-03-07 12:16   ` Eli Zaretskii
  2015-03-07 12:50     ` Ulrich Mueller
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2015-03-07 12:16 UTC (permalink / raw)
  To: Ulrich Mueller; +Cc: 19921

> Date: Sat, 7 Mar 2015 12:16:23 +0100
> From: Ulrich Mueller <ulm@gentoo.org>
> 
> Firefox on MS-Windows supports both the -new-tab and -new-window
> options, so the special case is no longer necessary there. I have
> tested this with Firefox 11.0 under Windows XP and Firefox 36.0.1
> under MS-Windows 8.1.

AFAIU, this was already fixed on master by Óscar, see commit 20c6b22.

> It should be pushed to the emacs-24 branch, I guess?

No, emacs-24 is only for fixing regressions wrt 24.3.

Thanks.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19921: [PATCH] browse-url-firefox: Remove MS-Windows special case.
  2015-03-07 12:16   ` Eli Zaretskii
@ 2015-03-07 12:50     ` Ulrich Mueller
  2015-03-07 13:17       ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Ulrich Mueller @ 2015-03-07 12:50 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 19921

>>>>> On Sat, 07 Mar 2015, Eli Zaretskii wrote:

> AFAIU, this was already fixed on master by Óscar, see commit 20c6b22.

Right. I had missed this.

>> It should be pushed to the emacs-24 branch, I guess?

> No, emacs-24 is only for fixing regressions wrt 24.3.

Then I wonder why commit 1b0ebbd (which introduces the -new-tab and
-new-window options) was applied to the branch. I is not a regression
fix because the issue already existed in 24.3 and 24.4.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19921: [PATCH] browse-url-firefox: Remove MS-Windows special case.
  2015-03-07 12:50     ` Ulrich Mueller
@ 2015-03-07 13:17       ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2015-03-07 13:17 UTC (permalink / raw)
  To: Ulrich Mueller; +Cc: 19921

> Date: Sat, 7 Mar 2015 13:50:42 +0100
> Cc: 19921@debbugs.gnu.org
> From: Ulrich Mueller <ulm@gentoo.org>
> 
> > No, emacs-24 is only for fixing regressions wrt 24.3.
> 
> Then I wonder why commit 1b0ebbd (which introduces the -new-tab and
> -new-window options) was applied to the branch. I is not a regression
> fix because the issue already existed in 24.3 and 24.4.

I share your wondering.





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-03-07 13:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-22  8:01 bug#19921: Support URL open for upcomming Mozilla Firefox 36 Ryo ONODERA
2015-02-24 23:05 ` Glenn Morris
2015-03-02  8:49   ` Peter Münster
2015-03-02 17:01     ` Glenn Morris
2015-02-27  8:12 ` bug#19921: SIGHUP related subtlety remains Teika Kazura
2015-03-07 11:16 ` bug#19921: [PATCH] browse-url-firefox: Remove MS-Windows special case Ulrich Mueller
2015-03-07 12:16   ` Eli Zaretskii
2015-03-07 12:50     ` Ulrich Mueller
2015-03-07 13:17       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).