From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id Q1oyAszYL2AYFQAA0tVLHw (envelope-from ) for ; Fri, 19 Feb 2021 15:27:08 +0000 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CEU4OcvYL2CtGgAA1q6Kng (envelope-from ) for ; Fri, 19 Feb 2021 15:27:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx2.migadu.com (Postfix) with ESMTPS id 72033AA1E for ; Fri, 19 Feb 2021 16:27:04 +0100 (CET) Received: from localhost ([::1]:40604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lD7gN-0006Ya-1H for larch@yhetil.org; Fri, 19 Feb 2021 10:27:03 -0500 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 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 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 Subject: bug#44824: [PATCH] org.el: Avoid xdg-open silent failure 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 To: Maxim Nikulin Received: via spool by 44824-submit@debbugs.gnu.org id=B44824.161374644613047 (code B ref 44824); Fri, 19 Feb 2021 14:55:01 +0000 Received: (at 44824) by debbugs.gnu.org; 19 Feb 2021 14:54:06 +0000 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 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 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 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 Date: Fri, 19 Feb 2021 16:54:11 +0200 Message-Id: <83blcg2jn0.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <1a7077ea-c3ad-be6b-6303-f3ed225ec6f8@gmail.com> (message from Maxim Nikulin on Fri, 19 Feb 2021 19:29:49 +0700) 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> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: emacs-orgmode@gnu.org List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 44824@debbugs.gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.87 Authentication-Results: aspmx2.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx2.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 72033AA1E X-Spam-Score: -2.87 X-Migadu-Scanner: scn0.migadu.com X-TUID: tZaodpU8bnC/ > 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?