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? > > >