From: Liu Hui <liuhui1610@gmail.com>
To: larsi@gnus.org
Cc: michael.albinus@gmx.de, pogonyshev@gmail.com, 56865@debbugs.gnu.org
Subject: bug#56865: M-x find-dired fails with "Wrong type: processp, nil"
Date: Thu, 01 Dec 2022 15:33:08 +0800 [thread overview]
Message-ID: <87y1rrlgsr.fsf@gmail.com> (raw)
In-Reply-To: <874jygl66s.fsf@gnus.org>
[-- Attachment #1: Type: text/plain, Size: 94 bytes --]
Hi,
I create a patch according to the discussion and find-dired works well
now.
Best,
Hui
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Set-the-filter-sentinel-of-find-process-reliably-in-.patch --]
[-- Type: text/x-diff, Size: 1438 bytes --]
From 8fbd85c80909b4cb560ec77cf84374e0a16b41df Mon Sep 17 00:00:00 2001
From: Liu Hui <liuhui1610@gmail.com>
Date: Thu, 1 Dec 2022 15:03:06 +0800
Subject: [PATCH] Set the filter/sentinel of find process reliably in
find-dired
* lisp/find-dired.el (find-dired-with-command): Use `make-process'
rather than `shell-command' to start a find process.
---
lisp/find-dired.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lisp/find-dired.el b/lisp/find-dired.el
index be3d106912..3d1ece2003 100644
--- a/lisp/find-dired.el
+++ b/lisp/find-dired.el
@@ -240,12 +240,13 @@ find-dired-with-command
(erase-buffer)
(setq default-directory dir)
;; Start the find process.
- (shell-command (concat command "&") (current-buffer))
- (let ((proc (get-buffer-process (current-buffer))))
- ;; Initialize the process marker; it is used by the filter.
- (move-marker (process-mark proc) (point) (current-buffer))
- (set-process-filter proc #'find-dired-filter)
- (set-process-sentinel proc #'find-dired-sentinel))
+ (make-process
+ :name "find-dired"
+ :buffer (current-buffer)
+ :command (split-string-shell-command command)
+ :filter #'find-dired-filter
+ :sentinel #'find-dired-sentinel
+ :file-handler t)
(dired-mode dir (cdr find-ls-option))
(let ((map (make-sparse-keymap)))
(set-keymap-parent map (current-local-map))
--
2.25.1
next prev parent reply other threads:[~2022-12-01 7:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 8:06 bug#56865: M-x find-dired fails with "Wrong type: processp, nil" Paul Pogonyshev
2022-08-02 10:34 ` Lars Ingebrigtsen
2022-08-02 11:24 ` Paul Pogonyshev
2022-08-02 11:28 ` Lars Ingebrigtsen
2022-08-10 13:26 ` Paul Pogonyshev
2022-08-12 15:04 ` Lars Ingebrigtsen
2022-08-12 15:33 ` Michael Albinus
2022-08-13 11:43 ` Lars Ingebrigtsen
2022-12-01 7:33 ` Liu Hui [this message]
2022-12-01 9:21 ` Michael Albinus
2022-12-03 13:38 ` Paul Pogonyshev
2023-09-06 22:41 ` Stefan Kangas
2022-08-12 15:12 ` Paul Pogonyshev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1rrlgsr.fsf@gmail.com \
--to=liuhui1610@gmail.com \
--cc=56865@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=michael.albinus@gmx.de \
--cc=pogonyshev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).