GNU bug report logs - #64897
29.0.91; Bug (and patch) in find-dired-with-command

Previous Next

Package: emacs;

Reported by: Warren Lynn <wrn.lynn <at> gmail.com>

Date: Thu, 27 Jul 2023 14:25:02 UTC

Severity: normal

Found in version 29.0.91

Fixed in version 29.2

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Warren Lynn <wrn.lynn <at> gmail.com>
To: 64897 <at> debbugs.gnu.org
Subject: bug#64897: 29.0.91; Bug (and patch) in find-dired-with-command
Date: Thu, 27 Jul 2023 10:24:37 -0400
[Message part 1 (text/plain, inline)]
On Linux. When I call "find-name-dired" command, which in turn invokes
"find-dired-with-command" function, in a multi-hop tramp remote directory,
an error will occur in side the function, with backtrace (only shown lowest
level):

Debugger entered--Lisp error: (wrong-type-argument processp nil)
  process-mark(nil)
  (move-marker (process-mark proc) (point) (current-buffer))

The issue is around this part of the code:

    ;; Start the find process.
    (shell-command (concat command "&") (current-buffer))
    (let ((proc (get-buffer-process (current-buffer)))) ;; !!!!!!!! proc
could be nil here !!!!!!!!!!
      ;; Initialize the process marker; it is used by the filter.
      (move-marker (process-mark proc) (point) (current-buffer))

After changing the code to:

    ;; Start the find process.
    (let ((proc (shell-command (concat command "&") (current-buffer))))
      ;; Initialize the process marker; it is used by the filter.
      (move-marker (process-mark proc) (point) (current-buffer))

I do not have the error any more.

However, I observe that even with my fix above, the behavior is not
completely right. Sometimes, the (found) file entries appear before the
dired buffer header line. My impression of the code is it does not handle
asynchronous timing in a robust way, and that is more of a problem when the
command is invoked from a remote directory. Probably some serious revamp is
needed here, which is beyond my expertise. Maybe Emacs should include the
"aio" package and rely on that for asynchronous event handling.
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 9 days ago.

Previous Next


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