From unknown Tue Aug 19 10:09:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8917: browse-url-xdg-open can fail to return Resent-From: Lawrence Mitchell Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Jun 2011 09:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8917 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 8917@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13087343392121 (code B ref -1); Wed, 22 Jun 2011 09:19:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jun 2011 09:18:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QZJaM-0000YA-F4 for submit@debbugs.gnu.org; Wed, 22 Jun 2011 05:18:58 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QZJaJ-0000Xy-9B for submit@debbugs.gnu.org; Wed, 22 Jun 2011 05:18:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZJaC-0004zQ-E1 for submit@debbugs.gnu.org; Wed, 22 Jun 2011 05:18:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:51210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZJaC-0004zJ-3X for submit@debbugs.gnu.org; Wed, 22 Jun 2011 05:18:48 -0400 Received: from eggs.gnu.org ([140.186.70.92]:57485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZJaA-00022e-CO for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2011 05:18:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZJa8-0004yu-OK for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2011 05:18:46 -0400 Received: from lo.gmane.org ([80.91.229.12]:52280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZJa8-0004yf-8s for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2011 05:18:44 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QZJa5-00073Q-Vg for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2011 11:18:41 +0200 Received: from e4300lm.epcc.ed.ac.uk ([129.215.63.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Jun 2011 11:18:41 +0200 Received: from wence by e4300lm.epcc.ed.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Jun 2011 11:18:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ From: Lawrence Mitchell Date: Wed, 22 Jun 2011 10:18:28 +0100 Lines: 62 Message-ID: <87pqm66x7f.fsf@gmx.li> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: e4300lm.epcc.ed.ac.uk User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Xt9EwdDpeKqWU44gOJxPzWt53Io= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.4 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2011-06-06 on e4300lm Windowing system distributor `The X.Org Foundation', version 11.0.11001000 configured using `configure '-C'' If Emacs uses browse-url-xdg-open to open URLs, and the browser is /not/ already running, browse-url starts a new browser process and then sits waiting for it to complete. Control does not return to Emacs until the browser is quit. I believe this is an unintended side-effect of this change: | 2010-10-08 Andreas Schwab | * net/browse-url.el (browse-url-xdg-open): Remove use of /bin/sh. I think the correct fix is to just discard output from the command and return immediately (nohup is then also not needed). Here's a patch: --8<---------------cut here---------------start------------->8--- >From c7183b3a4886a65951b155b1e0d57e0b50e19504 Mon Sep 17 00:00:00 2001 From: Lawrence Mitchell Date: Wed, 22 Jun 2011 10:08:29 +0100 Subject: [PATCH] browse-url: Don't wait for xdg-open to return * net/browse-url.el (browse-url-xdg-open): Use 0, rather than nil BUFFER in call-process. --- lisp/ChangeLog | 5 +++++ lisp/net/browse-url.el | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1ab91cf..4511dbc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-06-22 Lawrence Mitchell + + * net/browse-url.el (browse-url-xdg-open): Use 0, rather than nil + BUFFER in call-process. + 2011-06-21 Tim Harper * term/ns-win.el (ns-initialize-window-system): set diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index c1ec3f0..d9e6827 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -958,7 +958,7 @@ Galeon, Konqueror, Netscape, Mosaic, Lynx in an xterm, and then W3." ;;;###autoload (defun browse-url-xdg-open (url &optional new-window) (interactive (browse-url-interactive-arg "URL: ")) - (call-process "nohup" nil nil nil "xdg-open" url)) + (call-process "xdg-open" nil 0 nil url)) ;;;###autoload (defun browse-url-netscape (url &optional new-window) --8<---------------cut here---------------end--------------->8--- From unknown Tue Aug 19 10:09:03 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Lawrence Mitchell Subject: bug#8917: closed (Re: bug#8917: browse-url-xdg-open can fail to return) Message-ID: References: <4E021C2A.1040704@swipnet.se> <87pqm66x7f.fsf@gmx.li> X-Gnu-PR-Message: they-closed 8917 X-Gnu-PR-Package: emacs Reply-To: 8917@debbugs.gnu.org Date: Wed, 22 Jun 2011 16:46:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1308761162-32526-1" This is a multi-part message in MIME format... ------------=_1308761162-32526-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #8917: browse-url-xdg-open can fail to return which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 8917@debbugs.gnu.org. --=20 8917: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D8917 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1308761162-32526-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 8917-done) by debbugs.gnu.org; 22 Jun 2011 16:45:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QZQYg-0008S8-NV for submit@debbugs.gnu.org; Wed, 22 Jun 2011 12:45:43 -0400 Received: from smtprelay-b21.telenor.se ([195.54.99.212]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QZQYc-0008OC-0x for 8917-done@debbugs.gnu.org; Wed, 22 Jun 2011 12:45:39 -0400 Received: from ipb3.telenor.se (ipb3.telenor.se [195.54.127.166]) by smtprelay-b21.telenor.se (Postfix) with ESMTP id BEA49E9DFA for <8917-done@debbugs.gnu.org>; Wed, 22 Jun 2011 18:45:31 +0200 (CEST) X-SENDER-IP: [85.225.45.100] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As9TAA4bAk5V4S1kPGdsb2JhbABUiRGdfgsBAQEBNzKIdcAWhi0Elk+ER4Zi X-IronPort-AV: E=Sophos;i="4.65,407,1304287200"; d="scan'208";a="23514187" Received: from c-642de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.100]) by ipb3.telenor.se with ESMTP; 22 Jun 2011 18:45:31 +0200 Received: from [172.20.199.2] (gaffa [172.20.199.2]) by coolsville.localdomain (Postfix) with ESMTP id 90BCF7FA05A; Wed, 22 Jun 2011 18:45:30 +0200 (CEST) Message-ID: <4E021C2A.1040704@swipnet.se> Date: Wed, 22 Jun 2011 18:45:30 +0200 From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: Lawrence Mitchell Subject: Re: bug#8917: browse-url-xdg-open can fail to return References: <87pqm66x7f.fsf@gmx.li> In-Reply-To: <87pqm66x7f.fsf@gmx.li> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 8917-done Cc: 8917-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) Hello. That works, applied. Thanks, Jan D. 2011-06-22 11:18, Lawrence Mitchell skrev: > In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) > of 2011-06-06 on e4300lm > Windowing system distributor `The X.Org Foundation', version 11.0.11001000 > configured using `configure '-C'' > > If Emacs uses browse-url-xdg-open to open URLs, and the browser > is /not/ already running, browse-url starts a new browser process > and then sits waiting for it to complete. Control does not > return to Emacs until the browser is quit. > > I believe this is an unintended side-effect of this change: > > | 2010-10-08 Andreas Schwab > > | * net/browse-url.el (browse-url-xdg-open): Remove use of /bin/sh. > > > I think the correct fix is to just discard output from the > command and return immediately (nohup is then also not needed). > Here's a patch: > > --8<---------------cut here---------------start------------->8--- >> From c7183b3a4886a65951b155b1e0d57e0b50e19504 Mon Sep 17 00:00:00 2001 > From: Lawrence Mitchell > Date: Wed, 22 Jun 2011 10:08:29 +0100 > Subject: [PATCH] browse-url: Don't wait for xdg-open to return > > * net/browse-url.el (browse-url-xdg-open): Use 0, rather than nil > BUFFER in call-process. > --- > lisp/ChangeLog | 5 +++++ > lisp/net/browse-url.el | 2 +- > 2 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/lisp/ChangeLog b/lisp/ChangeLog > index 1ab91cf..4511dbc 100644 > --- a/lisp/ChangeLog > +++ b/lisp/ChangeLog > @@ -1,3 +1,8 @@ > +2011-06-22 Lawrence Mitchell > + > + * net/browse-url.el (browse-url-xdg-open): Use 0, rather than nil > + BUFFER in call-process. > + > 2011-06-21 Tim Harper > > * term/ns-win.el (ns-initialize-window-system): set > diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el > index c1ec3f0..d9e6827 100644 > --- a/lisp/net/browse-url.el > +++ b/lisp/net/browse-url.el > @@ -958,7 +958,7 @@ Galeon, Konqueror, Netscape, Mosaic, Lynx in an xterm, and then W3." > ;;;###autoload > (defun browse-url-xdg-open (url&optional new-window) > (interactive (browse-url-interactive-arg "URL: ")) > - (call-process "nohup" nil nil nil "xdg-open" url)) > + (call-process "xdg-open" nil 0 nil url)) > > ;;;###autoload > (defun browse-url-netscape (url&optional new-window) > > --8<---------------cut here---------------end--------------->8--- > > > ------------=_1308761162-32526-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Jun 2011 09:18:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QZJaM-0000YA-F4 for submit@debbugs.gnu.org; Wed, 22 Jun 2011 05:18:58 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QZJaJ-0000Xy-9B for submit@debbugs.gnu.org; Wed, 22 Jun 2011 05:18:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZJaC-0004zQ-E1 for submit@debbugs.gnu.org; Wed, 22 Jun 2011 05:18:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:51210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZJaC-0004zJ-3X for submit@debbugs.gnu.org; Wed, 22 Jun 2011 05:18:48 -0400 Received: from eggs.gnu.org ([140.186.70.92]:57485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZJaA-00022e-CO for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2011 05:18:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZJa8-0004yu-OK for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2011 05:18:46 -0400 Received: from lo.gmane.org ([80.91.229.12]:52280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZJa8-0004yf-8s for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2011 05:18:44 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QZJa5-00073Q-Vg for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2011 11:18:41 +0200 Received: from e4300lm.epcc.ed.ac.uk ([129.215.63.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Jun 2011 11:18:41 +0200 Received: from wence by e4300lm.epcc.ed.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 22 Jun 2011 11:18:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Lawrence Mitchell Subject: browse-url-xdg-open can fail to return Date: Wed, 22 Jun 2011 10:18:28 +0100 Lines: 62 Message-ID: <87pqm66x7f.fsf@gmx.li> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: e4300lm.epcc.ed.ac.uk User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Xt9EwdDpeKqWU44gOJxPzWt53Io= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2011-06-06 on e4300lm Windowing system distributor `The X.Org Foundation', version 11.0.11001000 configured using `configure '-C'' If Emacs uses browse-url-xdg-open to open URLs, and the browser is /not/ already running, browse-url starts a new browser process and then sits waiting for it to complete. Control does not return to Emacs until the browser is quit. I believe this is an unintended side-effect of this change: | 2010-10-08 Andreas Schwab | * net/browse-url.el (browse-url-xdg-open): Remove use of /bin/sh. I think the correct fix is to just discard output from the command and return immediately (nohup is then also not needed). Here's a patch: --8<---------------cut here---------------start------------->8--- >From c7183b3a4886a65951b155b1e0d57e0b50e19504 Mon Sep 17 00:00:00 2001 From: Lawrence Mitchell Date: Wed, 22 Jun 2011 10:08:29 +0100 Subject: [PATCH] browse-url: Don't wait for xdg-open to return * net/browse-url.el (browse-url-xdg-open): Use 0, rather than nil BUFFER in call-process. --- lisp/ChangeLog | 5 +++++ lisp/net/browse-url.el | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1ab91cf..4511dbc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-06-22 Lawrence Mitchell + + * net/browse-url.el (browse-url-xdg-open): Use 0, rather than nil + BUFFER in call-process. + 2011-06-21 Tim Harper * term/ns-win.el (ns-initialize-window-system): set diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index c1ec3f0..d9e6827 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -958,7 +958,7 @@ Galeon, Konqueror, Netscape, Mosaic, Lynx in an xterm, and then W3." ;;;###autoload (defun browse-url-xdg-open (url &optional new-window) (interactive (browse-url-interactive-arg "URL: ")) - (call-process "nohup" nil nil nil "xdg-open" url)) + (call-process "xdg-open" nil 0 nil url)) ;;;###autoload (defun browse-url-netscape (url &optional new-window) --8<---------------cut here---------------end--------------->8--- ------------=_1308761162-32526-1--