unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 56865@debbugs.gnu.org
Subject: bug#56865: M-x find-dired fails with "Wrong type: processp, nil"
Date: Fri, 12 Aug 2022 17:12:07 +0200	[thread overview]
Message-ID: <CAG7BpaoAq32Wt7UBjKzB+Ksrwtn7VaG5LE1-kvy+jtzE24oFSg@mail.gmail.com> (raw)
In-Reply-To: <CAG7Bpaq_DyjQioOzoGbm7vBvr2azCY05CjTkYiKMesAnSChuAQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2210 bytes --]

For what it's worth, I use `grep-find' a lot over Tramp and have never had
problems with it. (Other than when it finds a match in something like a 500
KB minified JS, but this is not Tramp-specific; Emacs in general sucks with
very long lines in text files.) It works over compilation infrastructure
apparently. Compilation itself also works fine for me.

Paul

On Wed, 10 Aug 2022 at 15:26, Paul Pogonyshev <pogonyshev@gmail.com> wrote:

> 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@gnus.org> wrote:
>
>> Paul Pogonyshev <pogonyshev@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.
>>
>>

[-- Attachment #2: Type: text/html, Size: 3225 bytes --]

      parent reply	other threads:[~2022-08-12 15:12 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
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 [this message]

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=CAG7BpaoAq32Wt7UBjKzB+Ksrwtn7VaG5LE1-kvy+jtzE24oFSg@mail.gmail.com \
    --to=pogonyshev@gmail.com \
    --cc=56865@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /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).