Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences

From: Петров Андрей <[email-masked]>
Date: Sun, 27 Feb 2022 12:50:32 +0000

Dmitry,

I have installed the lastest Emacs from master branch. The searching
works slightly different but acceptable.

Thank you for supporting Emacs, guys! You are my heroes!

Best regards,
Andrey Petrov.

________________________________________
От: DG <[email-masked]> от имени Dmitry Gutov <[email-masked]>
Отправлено: 27 февраля 2022 г. 7:50:20
Кому: Петров Андрей; Michael Albinus
Копия: [email-masked]
Тема: Re: bug#54025: 27.2; dired-do-find-regexp skips occurences

Hi Andrey,

On 26.02.2022 16:54, Петров Андрей wrote:
> Michael, Dmitry,
>
> - I think it is not the best idea to search in files and directories
>    visited through tramp (does internal grep call have an optimized
>    version for that?).

Try it, it works well enough already. Or at least much better than the
previous approach for searching across many files (exemplified by 'M-x
project-search').

> - I believe what saving buffers before operation involves more traffic
>    then checking for modification time.
>
> - Also if I remember correctly I saw some inflating transcoding while
>    copying files into local machine using tramp (that's why I prefer
>    using tar/ssh/untar or scp over dired tools for copying files
>    between machines) - aggressive traffic optimization is not always
>    used.

Good thing project-find-regxp does not do that.

> - When I trying to type something in buffer visiting modified from
>    outside file I am prompted to confirm my intention (really edit the
>    buffer?) - if I'm not wrong, it should involve some network
>    activity.
>
> So does the time modification checking give so much overhead?

It would take roughly (network rtt)x(number of open buffers with found
matches). Or more: there might be a multiplier on rtt, depending on how
this is implemented in Tramp.

> I found
> the synchronizing of search results in xref buffers with buffer
> contents (when you passes through an xref) very comfortable. It might
> be more confusing when user clicks to xref and jumps into non-matching
> text area.

Check the current code in master out. It should be working fine for most
cases, but not, alas, for remote files edited outside of the Emacs
process. Those might see result in discrepancies.