From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeff Kowalski Newsgroups: gmane.emacs.bugs Subject: bug#56013: 28.1; "gio open" and "xdg-open" fail silently under eshell Date: Thu, 3 Oct 2024 19:33:19 -0700 Message-ID: References: <87h74kes5l.fsf@gnus.org> <87czf88yre.fsf@igel.home> <87ilozbivd.fsf@gnus.org> <292942b6-4a7f-0002-2af4-210b32612ba1@gmail.com> <381f9df9-4442-4580-17f5-6590f7326e3b@gmail.com> <18d536c3-13c7-f1cf-ab64-72ba7b8931dc@gmail.com> <87msjlr4kb.fsf@linux-m68k.org> <626a55fd-409d-a670-1677-0f58eb257b7f@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000434d8906239d7fd8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37102"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56013@debbugs.gnu.org, Lars Ingebrigtsen , Andreas Schwab To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 04 04:35:25 2024 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 1swYA9-0009VH-21 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Oct 2024 04:35:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swY9m-0008BH-1B; Thu, 03 Oct 2024 22:35:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1swY9k-0008B3-FS for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2024 22:35:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swY9k-0006QE-7E for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2024 22:35:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=5mCafL7a3Vzl3Uj8FdHteG5WmqoCCH2pYEWpnAuxsr4=; b=rW1ZZ4uTx8leoXIw6qFcdiFjcpyZMzlSrc/yy13KeKQJpl7Z8Y3HKX25MUKh6EvjnvMpmn0fJhonIXhRBiwrzvOElU1772CuvkvxxrJI9o9eCLBtQ/tvZ/JPkK6JpcjufTDik33k3Nilr1bv9Bd2JLyMm6ovtYYR87hvThWv++cwlsgw5gw7AIiWS47qXgLWI+6m93ks2WSfqK8qPjZXwUUrDA3uRvKgyq8KH3F2sbFEqKdKGTL4uJgpwDKz/XDeC6lRIveSGGQGg706YsgG00uVB3r3tJEl/B8/J8aiPl5lcSVjna3/oxavNQV0F8uGKlZSxQaNximfcoUFQ84oDg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1swY9m-0004Vn-Dc for bug-gnu-emacs@gnu.org; Thu, 03 Oct 2024 22:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jeff Kowalski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Oct 2024 02:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56013 X-GNU-PR-Package: emacs Original-Received: via spool by 56013-submit@debbugs.gnu.org id=B56013.172800928317310 (code B ref 56013); Fri, 04 Oct 2024 02:35:02 +0000 Original-Received: (at 56013) by debbugs.gnu.org; 4 Oct 2024 02:34:43 +0000 Original-Received: from localhost ([127.0.0.1]:34175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swY9S-0004V8-Vn for submit@debbugs.gnu.org; Thu, 03 Oct 2024 22:34:43 -0400 Original-Received: from mail-wm1-f51.google.com ([209.85.128.51]:57725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swY9Q-0004Uq-Ug for 56013@debbugs.gnu.org; Thu, 03 Oct 2024 22:34:41 -0400 Original-Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-42e5e1e6d37so15240105e9.3 for <56013@debbugs.gnu.org>; Thu, 03 Oct 2024 19:34:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728009212; x=1728614012; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5mCafL7a3Vzl3Uj8FdHteG5WmqoCCH2pYEWpnAuxsr4=; b=XzT0946X3op6tYmWVU6XHKu7G6dMJK9uyR3NMYLDts7jyv1CYqKSPDSTTBsX3p8ByJ s/1zB7NcXiSLfx8rDXLqHJrzyvoqubiYOn+v9iVGiDsnfZEIRZcNspZJQeC7WtWcdAik b03hptHJEF6rE+J+0ITGiBEu1wvswR1qoFP5blxLB2OeX8rVPJDCH0keHdqUGYE1IAjq y1r7cdT4oqTky2m5O6NHWX6mbwGG5Y/OEfB++jWrjwGzxcGQe/cvrc4/rlkFfxjkqz6p vg2/4MTQbaXHfxRSQLcQ+qeU7PuNsH0mnLDgcclu0Zw83Jvmy0kY3iFNMbAIDpCKslrY Gl4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728009212; x=1728614012; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5mCafL7a3Vzl3Uj8FdHteG5WmqoCCH2pYEWpnAuxsr4=; b=g6WQkcPps1NDTUB5GKHXgop/eTmIaqQGIKnueJyGB1X9OvrBBgcL1CQeZwZjOnx17U lHTH06lGXh9Gkym/g1lCAuo0z4Uv0yTGdtxREcu7qb7UZMi2JRrK8JtO0H7DM98At0W/ mypppXYTFfkNSavDe9fK7sdLeehpUwUo6jMTziycZ5oE82m9g32CO/ubtmAFQY14oyyh rlZuiFt8FdqNl0pYLPAbSV+rMpsK7peP4EOfMMy6ZNONrpHl+q45iOAhrm8aeCJVPxTd t9axGB/RQ9CamUfosXRkHszLLO9tr/6aCJYlwPZySOqv9ZRHFxMiyhMTri1mNV2HoBxG pk6g== X-Forwarded-Encrypted: i=1; AJvYcCVj9QcjAufUqjAoMohgqs0i5SAc4OQ9wWJkqxfvhzO22jnzjyIYwZ3kdwCFc9abA51ri/8LpA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzGkbT2lWjxijC4z66dJdh53by5YoWTOUgqpIknlmZH00614RBE p/F4SN8yiKZdgE8JCexCa2ny/0iQ0VXD8n3jIOqnwCFfpVTaXIxRRaKdJAbDvAL2hMECdRg5tkj ndH0+bttiUyp2aHa2cI+Tn2oGxaw= X-Google-Smtp-Source: AGHT+IHePtxLVwSK/nvdffWcduDHvDX2BHREcjBvqN59T9bwgV8eApVU0KFRUIN+F2WfsY4CSd5kyOoiMG9BxcJg4qI= X-Received: by 2002:a5d:5610:0:b0:374:c56c:fbb4 with SMTP id ffacd0b85a97d-37d0e769454mr767462f8f.22.1728009212216; Thu, 03 Oct 2024 19:33:32 -0700 (PDT) In-Reply-To: <626a55fd-409d-a670-1677-0f58eb257b7f@gmail.com> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292940 Archived-At: --000000000000434d8906239d7fd8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the replies. I had hoped that there was indeed that change in process creation, but I can live with the current implementation. I am currently using a shortcut "o", defined as: ~ =CE=BB which o o is an alias, defined as "setsid -w gio open $*" Best regards, Jeff On Thu, Oct 3, 2024 at 4:46=E2=80=AFPM Jim Porter w= rote: > On 10/3/2024 1:09 AM, Andreas Schwab wrote: > > On Okt 02 2024, Jeff Kowalski wrote: > > > >> Recall we're still trying to get the "xdg-open file.txt" case to work > >> correctly. > > > > This is not possible as long as eshell creates a new session for each > > command and closes it immediately after the command exits. You can > > observe the same effect if you run "xterm -e 'xdg-open file.txt'". > > I'm not sure there's a way to avoid creating a new session for each > command, at least not without a bunch of changes to process.c (though if > someone disagrees, I'd be happy for some pointers in the right > direction). As a workaround, if you make sure that the I/O handles for > "xdg-open" are all pipes, that should outsmart it, e.g.: > > echo | xdg-open |& cat > --000000000000434d8906239d7fd8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the replies.=C2=A0 I had hoped that there was i= ndeed that change in process creation, but I can live with the current impl= ementation.
I am currently using a shortcut "o", defined as:<= /div>

~ =CE=BB which o
o is an alias, defined as &quo= t;setsid -w gio open $*"

Best regards,
Jeff

On Thu, Oct 3, 2024 at 4:46=E2=80=AFPM Jim Porter <jporterbugs@gmail.com> wrote:<= br>
On 10/3/2024 1:0= 9 AM, Andreas Schwab wrote:
> On Okt 02 2024, Jeff Kowalski wrote:
>
>> Recall we're still trying to get the "xdg-open file.txt&q= uot; case to work
>> correctly.
>
> This is not possible as long as eshell creates a new session for each<= br> > command and closes it immediately after the command exits.=C2=A0 You c= an
> observe the same effect if you run "xterm -e 'xdg-open file.t= xt'".

I'm not sure there's a way to avoid creating a new session for each=
command, at least not without a bunch of changes to process.c (though if someone disagrees, I'd be happy for some pointers in the right
direction). As a workaround, if you make sure that the I/O handles for
"xdg-open" are all pipes, that should outsmart it, e.g.:

=C2=A0 =C2=A0echo | xdg-open <whatever> |& cat
--000000000000434d8906239d7fd8--