From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#44824: [PATCH] org.el: Avoid xdg-open silent failure Date: Fri, 19 Feb 2021 16:54:11 +0200 Message-ID: <83blcg2jn0.fsf__4207.35591776378$1613748530$gmane$org@gnu.org> References: <87y2gfcape.fsf_-_@gnus.org> <87a6st7oi1.fsf@gnus.org> <108399a5-66ad-eee6-572b-b3f2181e4e6c@gmail.com> <87lfccxs5a.fsf@gnus.org> <875z3f2bwx.fsf@gnus.org> <838s8aak8j.fsf@gnu.org> <83sg6i8rht.fsf@gnu.org> <5f1a0018-56a4-7f00-68bc-eeb93631f102@gmail.com> <83lfca8k4e.fsf@gnu.org> <83y2g96ta6.fsf@gnu.org> <7635bde2-8590-f555-0d3b-7fa818d812c6@gmail.com> <83o8h56p7o.fsf__8661.17158891342$1612110869$gmane$org@gnu.org> <83a6s15t51.fsf__31631.6350990505$1613659778$gmane$org@gnu.org> <1a7077ea-c3ad-be6b-6303-f3ed225ec6f8@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9689"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44824@debbugs.gnu.org To: Maxim Nikulin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 19 16:28:46 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lD7i2-0002RX-27 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Feb 2021 16:28:46 +0100 Original-Received: from localhost ([::1]:49186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lD7i1-0001kc-0s for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Feb 2021 10:28:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lD7BO-0003cO-5v; Fri, 19 Feb 2021 09:55:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37513) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lD7BN-0006mT-Ub; Fri, 19 Feb 2021 09:55:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lD7BN-0003Pm-R7; Fri, 19 Feb 2021 09:55:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org Resent-Date: Fri, 19 Feb 2021 14:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44824 X-GNU-PR-Package: emacs,org-mode X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 44824-submit@debbugs.gnu.org id=B44824.161374644613047 (code B ref 44824); Fri, 19 Feb 2021 14:55:01 +0000 Original-Received: (at 44824) by debbugs.gnu.org; 19 Feb 2021 14:54:06 +0000 Original-Received: from localhost ([127.0.0.1]:49058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lD7AT-0003ON-Kt for submit@debbugs.gnu.org; Fri, 19 Feb 2021 09:54:06 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lD7AQ-0003Ns-AI for 44824@debbugs.gnu.org; Fri, 19 Feb 2021 09:54:04 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50027) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lD7AL-0006N3-0p; Fri, 19 Feb 2021 09:53:57 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2944 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lD7AK-00055F-9X; Fri, 19 Feb 2021 09:53:56 -0500 In-Reply-To: <1a7077ea-c3ad-be6b-6303-f3ed225ec6f8@gmail.com> (message from Maxim Nikulin on Fri, 19 Feb 2021 19:29:49 +0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:200344 Archived-At: > From: Maxim Nikulin > Date: Fri, 19 Feb 2021 19:29:49 +0700 > Cc: 44824@debbugs.gnu.org > > > On Windows Emacs always uses pipes, because we don't have PTYs there. > > And there's no xdg-open on MS-Windows anyway, so it's a moot point. > > Should I consider your response as a suggestion to remove the `if' > related to `system-type'? Yes, that 'if' isn't necessary. > If I remember correctly, on windows it is possible to communicate with a > process through stdin and stdout only if the application is compiled as > a *console* one. That's true. But in this case we don't really want to communicate with the sub-process, do we? We just want to invoke it and let it run. So the fact that there's no way of communicating with the sub-process is not important here, as the pipes will not be used. We just need to specify pipes because that works around the problem with xdg-open. > "start file.pdf" executed in cmd.exe launches an application that does > not block command prompt. In this sense it similar to background > processes launched by kde-open5 or "gio open". However I am unaware if > there is something similar to process groups on windows that leads to > termination of all group members when leader process finishes. Things are fairly similar on Windows. But is this really relevant to the issue at hand? There's no xdg-open on Windows, so whatever problems you had with xdg-open will never happen on Windows. the proposed patch fixes the problem only on systems where org.el invokes the PDF viewer via xdg-open. Right?