GNU bug report logs - #56865
M-x find-dired fails with "Wrong type: processp, nil"

Previous Next

Package: emacs;

Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>

Date: Mon, 1 Aug 2022 08:08:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Paul Pogonyshev <pogonyshev <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 56865 <at> debbugs.gnu.org
Subject: bug#56865: M-x find-dired fails with "Wrong type: processp, nil"
Date: Wed, 10 Aug 2022 15:26:03 +0200
[Message part 1 (text/plain, inline)]
Actually no, it doesn't help in all cases. It got better, but sometimes
still dies with the same error:

Debugger entered--Lisp error: (wrong-type-argument processp nil)
  process-mark(nil)
  (move-marker (process-mark proc) (point) (current-buffer))
  (let ((proc (get-buffer-process (current-buffer)))) (message "@ %S %S"
(current-buffer) proc) (move-marker (process-mark proc) (point)
(current-buffer)) (set-process-filter proc #'find-dired-filter)
(set-process-sentinel proc #'find-dired-sentinel))
  ...

For debugging I also added this line:

     (shell-command (concat command "&") (current-buffer))
     (let ((proc (get-buffer-process (current-buffer))))
 +     (message "@ %S %S" (current-buffer) proc)
       ;; Initialize the process marker; it is used by the filter.
       (move-marker (process-mark proc) (point) (current-buffer))  ;; <--
dies here

Here is the resut in buffer *Messages*:

@ #<buffer *Find*> nil

So, the process can be nil immediately after `shell-command' returns too.

Paul


On Tue, 2 Aug 2022 at 13:28, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Paul Pogonyshev <pogonyshev <at> gmail.com> writes:
>
> > 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-*'.
>
> Yes, but I'm not quite sure that's actually the case in all
> circumstances (especially when Tramp is involved)...
>
> > But it does feel dirty. (Also that `(sit-for 1)' a few lines above
> > feels dirty.)
>
> Yeah, much of the code in find-dired.el looks pretty fragile.
>
> But I guess this works now, so I'm closing this bug report.
>
>
[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 283 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.