From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.bugs Subject: bug#56865: M-x find-dired fails with "Wrong type: processp, nil" Date: Tue, 2 Aug 2022 13:24:25 +0200 Message-ID: References: <87pmhjylv1.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000088615905e5405c77" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35332"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56865@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 02 13:25:23 2022 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 1oIq1a-0008zt-Up for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Aug 2022 13:25:23 +0200 Original-Received: from localhost ([::1]:53338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIq1Z-0004KV-Ce for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Aug 2022 07:25:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIq1I-0004JW-Vs for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 07:25:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52877) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIq1G-0007DT-De for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 07:25:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIq1G-0004l1-9b for bug-gnu-emacs@gnu.org; Tue, 02 Aug 2022 07:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Pogonyshev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Aug 2022 11:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56865 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 56865-submit@debbugs.gnu.org id=B56865.165943948318254 (code B ref 56865); Tue, 02 Aug 2022 11:25:02 +0000 Original-Received: (at 56865) by debbugs.gnu.org; 2 Aug 2022 11:24:43 +0000 Original-Received: from localhost ([127.0.0.1]:42626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIq0x-0004kM-G8 for submit@debbugs.gnu.org; Tue, 02 Aug 2022 07:24:43 -0400 Original-Received: from mail-oi1-f172.google.com ([209.85.167.172]:38729) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIq0w-0004k9-Bm for 56865@debbugs.gnu.org; Tue, 02 Aug 2022 07:24:42 -0400 Original-Received: by mail-oi1-f172.google.com with SMTP id s204so16176838oif.5 for <56865@debbugs.gnu.org>; Tue, 02 Aug 2022 04:24:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oQ7RdH3mGTHITGD6kuRDgIXfzIxQAWV5Rqoruuno1TU=; b=VorjDTrAGyaBGLCYrZhlioVM0nSOG7xa9D67r3MdF85h1K3kq/2TxFqNSU7sx44EzG sG8CvD5ibs2TBeASXJmylP3tw9M2JZhNqQcsjLqWPaer56CgJIPasWnJrP3lmVlGmJLO Wmu7sI5+xerWG1Q/FBbJtMSwCsl0sD05wH4rju/6G8MdEIHCgatWBcgYQR6kUYRY3ZYk 8YXiCgkBv5UCigAqayVE8blQiT78Unm2C+LhAwWUmvS4h8xlJh8JASATqG1VT4WVvATd rr8iWjAIFVOG2MoaMsUx3lpuxJ1IW5EZ8k+tAdq0+lLykcqGjfRVZGozGg2CacZp+Mge HtHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oQ7RdH3mGTHITGD6kuRDgIXfzIxQAWV5Rqoruuno1TU=; b=tCNdasYMA/Vah/8NJa5VnzIO4WwpbN4AKvoxzwRKq22Tbo7AVtGuem6ZKFlrWs8J4h Pn9wKE4im4hA89CUSqz7WkxoVetnZdryWugBFeNI+GtoxGwBlPqqh2uu6lIXYmN4qAU2 l4FCXujV6HEN9jaw4LCOSc59UM/IfEP+txijqWAwYccLgZcBW4Bvib5SAjf6ZfSiLgex HDs82nr7oxNFcSMPq4Juso+fM4q528fDceSsyje53WuhK1Trg1nrWCHYhEcsd21fULCI F3gYKYMsYjKGscUMWGq8SsG54OtUckpkdh+laD3bxPqR1ykJtvezxtApks6oRBABMlHy A0uA== X-Gm-Message-State: AJIora+3Fc9DI3mx/N/pmyIQy+jnmlG+2WpI8nAOqsgeGMNsHJ6EFq58 /PqglxYHqVP37tcvMakFGigUXNgKdATDLc4wzWhTEoIj8A== X-Google-Smtp-Source: AGRyM1syDBQb/ZsjtTYHAcuFhP1r66t6c20MrJfSuTLhtS9YwruftVPH7wOUNcyqB4h2qfEBQXqu6/F+SR18UgyR9ik= X-Received: by 2002:a05:6808:1285:b0:33a:c5c8:45bd with SMTP id a5-20020a056808128500b0033ac5c845bdmr8076464oiw.27.1659439476661; Tue, 02 Aug 2022 04:24:36 -0700 (PDT) In-Reply-To: <87pmhjylv1.fsf@gnus.org> 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:238530 Archived-At: --00000000000088615905e5405c77 Content-Type: text/plain; charset="UTF-8" Seems so. I guess with the way Elisp works it is even correct, because (as I understand) Elisp has no way to notice that process has died if there are no IO calls between `shell-process' and `set-process-*'. But it does feel dirty. (Also that `(sit-for 1)' a few lines above feels dirty.) Paul On Tue, 2 Aug 2022 at 12:35, Lars Ingebrigtsen wrote: > Paul Pogonyshev writes: > > > Tested also with `emacs -Q', so this is not a problem of my > configuration. > > > > 1. Open (a slow) remote connection, with TRAMP > > 2. Run M-x find-dired RET, arguments not important > > 3. Internal error "Wrong type: processp, nil" appears > > > > Debugging suggests that it happens in `find-dired-with-command' when > calling > > `set-process-filter'. Apparently the asynchronously started shell > command started ~ > > 30 lines above counts as having finished (?) by then. > > The proper fix here would be to have a way to specify the > filter/sentinel in `shell-command', since that's the only way to really > guarantee that we'll be getting the output here. > > But some testing seems to indicate that just moving the settings up > until right after the `shell-command' makes things work, so I've now > made that trivial fix in Emacs 29. Does this fix this issue for you, > too? > > > --00000000000088615905e5405c77 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Seems so. I guess with the way Elisp works it is even corr= ect, because (as I understand) Elisp has no way to notice that process has = died if there are no IO calls between `shell-process' and `set-process-= *'. But it does feel dirty. (Also that `(sit-for 1)'=C2=A0 a few li= nes above feels dirty.)

Paul

On Tue, 2 Aug 2022 a= t 12:35, Lars Ingebrigtsen <larsi@gnus= .org> wrote:
Paul Pogonyshev <pogonyshev@gmail.com> writes:

> Tested also with `emacs -Q', so this is not a problem of my config= uration.
>
> 1. Open (a slow) remote connection, with TRAMP
> 2. Run M-x find-dired RET, arguments not important
> 3. Internal error "Wrong type: processp, nil" appears
>
> Debugging suggests that it happens in `find-dired-with-command' wh= en calling
> `set-process-filter'. Apparently the asynchronously started shell = command started ~
> 30 lines above counts as having finished (?) by then.

The proper fix here would be to have a way to specify the
filter/sentinel in `shell-command', since that's the only way to re= ally
guarantee that we'll be getting the output here.

But some testing seems to indicate that just moving the settings up
until right after the `shell-command' makes things work, so I've no= w
made that trivial fix in Emacs 29.=C2=A0 Does this fix this issue for you,<= br> too?


--00000000000088615905e5405c77--