From unknown Tue Aug 19 05:11:06 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#8917 <8917@debbugs.gnu.org> To: bug#8917 <8917@debbugs.gnu.org> Subject: Status: browse-url-xdg-open can fail to return Reply-To: bug#8917 <8917@debbugs.gnu.org> Date: Tue, 19 Aug 2025 12:11:06 +0000 retitle 8917 browse-url-xdg-open can fail to return reassign 8917 emacs submitter 8917 Lawrence Mitchell severity 8917 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 22 05:18:58 2011 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--- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 22 12:45:43 2011 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--- > > > From unknown Tue Aug 19 05:11:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 21 Jul 2011 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator