emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64897: closed (29.0.91; Bug (and patch) in find-dired-with-command)


From: GNU bug Tracking System
Subject: bug#64897: closed (29.0.91; Bug (and patch) in find-dired-with-command)
Date: Mon, 31 Jul 2023 15:54:02 +0000

Your message dated Mon, 31 Jul 2023 17:53:43 +0200
with message-id <87edko6prs.fsf@gmx.de>
and subject line Re: bug#64897: 29.0.91; Bug (and patch) in 
find-dired-with-command
has caused the debbugs.gnu.org bug report #64897,
regarding 29.0.91; Bug (and patch) in find-dired-with-command
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
64897: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64897
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 29.0.91; Bug (and patch) in find-dired-with-command Date: Thu, 27 Jul 2023 10:24:37 -0400
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.


--- End Message ---
--- Begin Message --- Subject: Re: bug#64897: 29.0.91; Bug (and patch) in find-dired-with-command Date: Mon, 31 Jul 2023 17:53:43 +0200 User-agent: Gnus/5.13 (Gnus v5.13)
Version: 29.2

Warren Lynn <wrn.lynn@gmail.com> writes:

> Hi Michael:

Hi Warren,

> I tried out your patch and could no longer reproduce the problem, of
> either the nil proc or the timing. Thanks a lot for such quick work.

I've pushed the patch to the emacs-29 branch. Closing the bug.

> Warren

Best regards, Michael.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]