From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Feb 2022 11:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 54025@debbugs.gnu.org X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.16450116269843 (code B ref -1); Wed, 16 Feb 2022 11:41:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Feb 2022 11:40:26 +0000 Received: from localhost ([127.0.0.1]:47536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKIfa-0002Yh-E0 for submit@debbugs.gnu.org; Wed, 16 Feb 2022 06:40:26 -0500 Received: from lists.gnu.org ([209.51.188.17]:56938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKIfY-0002YX-AL for submit@debbugs.gnu.org; Wed, 16 Feb 2022 06:40:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKIfY-0005M5-1c for bug-gnu-emacs@gnu.org; Wed, 16 Feb 2022 06:40:24 -0500 Received: from mail1.itgrp.ru ([185.8.182.248]:28626) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKIfU-0003H8-EE for bug-gnu-emacs@gnu.org; Wed, 16 Feb 2022 06:40:23 -0500 IronPort-SDR: hkk/WbOJpBZnOUQ89U+a+wlGDeVScA8jvKug6+u9O7LIYm76cqPjN/C0vfi4P2tOzgzwIT6A8f r8ER866DYX2g== X-IronPort-AV: E=Sophos;i="5.88,373,1635195600"; d="scan'208";a="159590410" From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Thread-Topic: 27.2; dired-do-find-regexp skips occurences Thread-Index: AQHYIyjXtspqEmtb7Emo34ft0KOoIQ== Date: Wed, 16 Feb 2022 11:40:06 +0000 Message-ID: Accept-Language: ru-RU, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.24.4.20] Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Received-SPF: pass client-ip=185.8.182.248; envelope-from=prvs=03926dc0d=an.petrov@pay-lab.ru; helo=mail1.itgrp.ru X-Spam_score_int: 37 X-Spam_score: 3.7 X-Spam_bar: +++ X-Spam_report: (3.7 / 5.0 requ) BAYES_00=-1.9, CHARSET_FARAWAY_HEADER=3.2, MIME_CHARSET_FARAWAY=2.45, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hello, team! I found that `dired-do-find-regexp' does not show occurences in files where the occurences were deleted but not saved. Test: 1. Create directory 3 M-x + 3 [RET] =20 2. Create and save two files (1.txt, 2.txt) containing line "aaa" and the third containing lines "aaa", "bbb", "aaa": C-x C-f 1.txt [RET] aaa [RET] C-x C-f 2.txt [RET] aaa [RET] C-x C-f 3.txt [RET] aaa [RET] bbb [RET] aaa [RET] C-u C-x s 3. Now select the all in dired buffer and try searching for word "aaa": C-x b 3 [RET] t A \baaa\b [RET] Now dired buffer looks like: =20 /home/andrey/3: =C9=D4=CF=C7=CF 20 drwxr-xr-x 2 andrey andrey 4096 =C6=C5=D7 16 15:58 . drwx------ 48 andrey andrey 4096 =C6=C5=D7 16 15:57 .. * -rw-r--r-- 1 andrey andrey 4 =C6=C5=D7 16 15:58 1.txt * -rw-r--r-- 1 andrey andrey 4 =C6=C5=D7 16 15:58 2.txt * -rw-r--r-- 1 andrey andrey 4 =C6=C5=D7 16 15:58 3.txt =20 *xref* buffer contains: /home/andrey/3/1.txt 1: aaa /home/andrey/3/2.txt 1: aaa /home/andrey/3/3.txt 1: aaa 3: aaa =20 4. Choose the first occurence in 3.txt file and delete the line but DO NOT SAVE the buffer. 5. Go back to dired buffer and try searching for "aaa" again. Now *xref* does not contain 3.txt file although it has an occurence of "aaa". =20 /home/andrey/3/1.txt 1: aaa /home/andrey/3/2.txt 1: aaa =20 After saving 3.txt and repeating the search *xref* buffers shows all 3 entries as expected. Please take a look into `xref-revert-buffer' (g) inside *xref* buffer also. It seems that it shows only occurences of the first file. In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cair= o version 1.17.4) of 2021-03-26 built on juergen Windowing system distributor 'The X.Org Foundation', version 11.0.12101003 System Description: Arch Linux Configured using: 'configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib --localstatedir=3D/var --with-x-toolkit=3Dgtk3 --with-xft --with-wide-int --with-modules --with-cairo --with-harfbuzz 'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pipe -fno-plt' CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2 LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LANG: ru_RU.UTF-8 locale-coding-system: utf-8-unix Major mode: Dired by name Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr eieio-opt speedbar sb-image ezimage dframe find-func help-fns radix-tree emacsbug message rmc puny format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x pulse cl-extra help-mode easymenu seq xref cl-seq project eieio byte-opt bytecomp byte-compile cconv eieio-core cl-macs gv eieio-loaddefs grep compile comint ansi-color ring dired-aux cl-loaddefs cl-lib dired dired-loaddefs cyril-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 68400 9572) (symbols 48 8127 1) (strings 32 22571 1888) (string-bytes 1 741405) (vectors 16 14374) (vector-slots 8 182357 17890) (floats 8 37 22) (intervals 56 795 0) (buffers 1000 21)) Best regards, Andrey Petrov.= From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Feb 2022 00:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= , 54025@debbugs.gnu.org Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.16454037355086 (code B ref 54025); Mon, 21 Feb 2022 00:36:01 +0000 Received: (at 54025) by debbugs.gnu.org; 21 Feb 2022 00:35:35 +0000 Received: from localhost ([127.0.0.1]:34194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLwfv-0001Jy-6g for submit@debbugs.gnu.org; Sun, 20 Feb 2022 19:35:35 -0500 Received: from mail-wr1-f47.google.com ([209.85.221.47]:33457) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLwft-0001Ji-3B for 54025@debbugs.gnu.org; Sun, 20 Feb 2022 19:35:33 -0500 Received: by mail-wr1-f47.google.com with SMTP id e3so24324140wra.0 for <54025@debbugs.gnu.org>; Sun, 20 Feb 2022 16:35:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=XbeyJUNk8kLfbWgErQha5ZJV+nDa2K3DlAmfBS12w2Y=; b=QG0DfQvtzSmTssVr11Xdf0j4YMwfYOnuqpvCZBvgQ8ymLiqeKq7ygN7EVGd/olkVq4 c/H439mTjYScodnb4GxGadcx51Cn3wPuVJmGAg+ErTzendY5kciji53zs/zLBixEIq/k d88iyWuZypQCa2GwmErLtewrG7bzwkmhIQQfaGwqQHhesJsyDMXoC7LBwpcVxRkvGp0o kzvy9bOhWHWLy58BhpU51Noq2iSq6U7ml2+ekc0E6YwtnWL2ecyzCzujgZ9Um5vn18EF neHPkj2MivIfxFNp0Rxw/sIyghecGUZ1YbLwPAH29HMJDpkpeKq6sBa4Kj741EYB8rb9 fOxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=XbeyJUNk8kLfbWgErQha5ZJV+nDa2K3DlAmfBS12w2Y=; b=tj7Gb6mIhIAv00CNAHry/Q27c5NeXAFd2zIq0ihYiMxakGvq7Vgw/NiatCeEKMBMXg U/5dwxmCBc3fqH2RwQDCj84yvEufnaeBmi5WQw3CHTmU7OGOoszzjHlZE/pvTCOtI/Zr qH2NWtwnB4VIIlaCkD8tBepRYFf5EhWLUDaOLyVuzj/9F1KqWDgsIcJ+tIypUAUpODCG smv7TDD3jphEi6hTHIrL4IBcGz80HjQWEMHF/GdNhW0OfRt73Efy6Bvt30YrL3EKBqGY j2hl/04iU3G8E8D2/rQ4rMhZ5rDE/ktMafZusGxDHSNNRD6PrbdEtoWzP5nrqWEe3FNN meoA== X-Gm-Message-State: AOAM531cHZAasGwLwB3EBj/osm6BaB6h3SZvGJxJPNCsotEYNfZdY9UV wNYNfsVqc/hqXm53ON81PDQh3OMi8dU= X-Google-Smtp-Source: ABdhPJzs7xnMyEE3PlxEgQfHUZVr+UPmCjUDWhup4UXDMjsFlxR3qmf3PxZfsW/KqDVzlTeNtKDyvA== X-Received: by 2002:adf:e904:0:b0:1d6:64b3:fdd with SMTP id f4-20020adfe904000000b001d664b30fddmr13746696wrm.200.1645403726969; Sun, 20 Feb 2022 16:35:26 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id az13sm29108270wrb.39.2022.02.20.16.35.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Feb 2022 16:35:26 -0800 (PST) Message-ID: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> Date: Mon, 21 Feb 2022 02:35:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US References: From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Hi! On 16.02.2022 13:40, Петров Андрей wrote: > 5. Go back to dired buffer and try searching for "aaa" again. > > Now*xref* does not contain 3.txt file although it has an occurence of > "aaa". > > /home/andrey/3/1.txt > 1: aaa > /home/andrey/3/2.txt > 1: aaa > > After saving 3.txt and repeating the search*xref* buffers shows all 3 > entries as expected. > > Please take a look into `xref-revert-buffer' (g) inside*xref* buffer > also. It seems that it shows only occurences of the first file. The reason this happens is because xref-matches-in-files uses the contents of open buffers to verify the regexp matches, and to show the (possibly syntax-highlighted) text in matches. The fact that such buffers can be modified and unsaved is obviously a problem. I suggest we simply add a check before doing a search, which will remind you to save any such buffers. It will need to be added to project-find-regexp as well, naturally. Something like the patch below. What do you think? diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 41c45b4e51..c3b1b620bb 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -3266,6 +3266,12 @@ dired-do-find-regexp (require 'xref) (defvar grep-find-ignored-files) (declare-function rgrep-find-ignored-directories "grep" (dir)) + (save-some-buffers) + (or (not (memq t (mapcar (lambda (buf) + (and (buffer-file-name buf) + (buffer-modified-p buf))) + (buffer-list)))) + (user-error "Modified buffers exist; aborting")) (let* ((marks (dired-get-marked-files nil nil nil nil t)) (ignores (nconc (mapcar #'file-name-as-directory From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Feb 2022 03:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 54025@debbugs.gnu.org, an.petrov@pay-lab.ru Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.164541440515320 (code B ref 54025); Mon, 21 Feb 2022 03:34:02 +0000 Received: (at 54025) by debbugs.gnu.org; 21 Feb 2022 03:33:25 +0000 Received: from localhost ([127.0.0.1]:34358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLzS1-0003z2-7W for submit@debbugs.gnu.org; Sun, 20 Feb 2022 22:33:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLzRz-0003yn-Jz for 54025@debbugs.gnu.org; Sun, 20 Feb 2022 22:33:23 -0500 Received: from [2001:470:142:3::e] (port=39500 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLzRt-00020w-9M; Sun, 20 Feb 2022 22:33:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tStwSso91yXSlqmkw0ECQ9v6zyeiGyHQaRnVlqF/P+0=; b=sVPbBN94kciG 76aMhFciddrjp7rgsFxPSxczGGh3sJk4+f6pFoHwL5irpq55Smur8Rm4sG75a1D/CK6ewytF9rJRB 5Fq8NHQaVwBmw0/diO13tqhHJ1/USMlcKA7SdKgWxoXmK05zp2Fsz18MCtz6v1hGHeCz1wjkhHnt4 u7isIchCcwj6Z9RrDOiDO9QQRD0DaGpQSPVZqwV1mL+QisvhH3E7MDdydCFXKf3+7AYL7s1qg5tSz v36DNyd6EUzXRir+ilK/85OLUgMMhzoYzNGyILRQRceqhFNcnsXpKDvHxRDcrMuDP4pTUqUUxze2F BLA+g25jhcGywAKcIHTzTg==; Received: from [87.69.77.57] (port=2664 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLzRs-000473-KU; Sun, 20 Feb 2022 22:33:16 -0500 Date: Mon, 21 Feb 2022 05:33:21 +0200 Message-Id: <831qzwx5a6.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> (message from Dmitry Gutov on Mon, 21 Feb 2022 02:35:24 +0200) References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Mon, 21 Feb 2022 02:35:24 +0200 > From: Dmitry Gutov > > I suggest we simply add a check before doing a search, which will remind > you to save any such buffers. It will need to be added to > project-find-regexp as well, naturally. Something like the patch below. > > What do you think? > > diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el > index 41c45b4e51..c3b1b620bb 100644 > --- a/lisp/dired-aux.el > +++ b/lisp/dired-aux.el > @@ -3266,6 +3266,12 @@ dired-do-find-regexp > (require 'xref) > (defvar grep-find-ignored-files) > (declare-function rgrep-find-ignored-directories "grep" (dir)) > + (save-some-buffers) > + (or (not (memq t (mapcar (lambda (buf) > + (and (buffer-file-name buf) > + (buffer-modified-p buf))) > + (buffer-list)))) > + (user-error "Modified buffers exist; aborting")) > (let* ((marks (dired-get-marked-files nil nil nil nil t)) > (ignores (nconc (mapcar > #'file-name-as-directory I'd rather we gave the user the choice to either abort or proceed. It is not clear that the fact we search buffers cannot be a useful feature in some situations. From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Feb 2022 07:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Dmitry Gutov Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org> Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.164542685415142 (code B ref 54025); Mon, 21 Feb 2022 07:01:01 +0000 Received: (at 54025) by debbugs.gnu.org; 21 Feb 2022 07:00:54 +0000 Received: from localhost ([127.0.0.1]:34762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM2gn-0003w9-Vh for submit@debbugs.gnu.org; Mon, 21 Feb 2022 02:00:54 -0500 Received: from mail1.itgrp.ru ([185.8.182.248]:24703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM2gm-0003vw-DZ for 54025@debbugs.gnu.org; Mon, 21 Feb 2022 02:00:53 -0500 IronPort-SDR: n83PbBxGkzNYxptUwuLM2T82lB//eiCO6+/YNv5rSRJiwzmsh5GQjIgQkjU4QD6wzPC7nwkMDK j53JavhuYRQQ== X-IronPort-AV: E=Sophos;i="5.88,385,1635195600"; d="scan'208";a="159663836" From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Thread-Topic: bug#54025: 27.2; dired-do-find-regexp skips occurences Thread-Index: AQHYIyjXtspqEmtb7Emo34ft0KOoIayc/TcAgABkI0mAADe4/Q== Date: Mon, 21 Feb 2022 07:00:45 +0000 Message-ID: <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru>,<831qzwx5a6.fsf@gnu.org> In-Reply-To: <831qzwx5a6.fsf@gnu.org> Accept-Language: ru-RU, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.24.4.20] Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli, Dmitry, I think it is convenient to ask user to save some buffers (like `rgrep' do)= if the search algorithm implementation requires all files to be saved. Opt= ionally modified buffers can be skipped with appropriate logging into messa= ges buffer. =F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD, =E1=CE=C4=D2=C5=CA =F0=C5=D4=D2=CF=D7, =D0=D2=CF=C7=D2=C1=CD=CD=C9=D3=D4 =EF=EF=EF =E9=CE=D0=C1=D3-=F3=CF=C6=D4. ________________________________________ =EF=D4: Eli Zaretskii =EF=D4=D0=D2=C1=D7=CC=C5=CE=CF: 21 =C6=C5=D7=D2=C1=CC=D1 2022 =C7. 8:33:21 =EB=CF=CD=D5: Dmitry Gutov =EB=CF=D0=C9=D1: =F0=C5=D4=D2=CF=D7 =E1=CE=C4=D2=C5=CA; 54025@debbugs.gnu.o= rg =F4=C5=CD=C1: Re: bug#54025: 27.2; dired-do-find-regexp skips occurences > Date: Mon, 21 Feb 2022 02:35:24 +0200 > From: Dmitry Gutov > > I suggest we simply add a check before doing a search, which will remind > you to save any such buffers. It will need to be added to > project-find-regexp as well, naturally. Something like the patch below. > > What do you think? > > diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el > index 41c45b4e51..c3b1b620bb 100644 > --- a/lisp/dired-aux.el > +++ b/lisp/dired-aux.el > @@ -3266,6 +3266,12 @@ dired-do-find-regexp > (require 'xref) > (defvar grep-find-ignored-files) > (declare-function rgrep-find-ignored-directories "grep" (dir)) > + (save-some-buffers) > + (or (not (memq t (mapcar (lambda (buf) > + (and (buffer-file-name buf) > + (buffer-modified-p buf))) > + (buffer-list)))) > + (user-error "Modified buffers exist; aborting")) > (let* ((marks (dired-get-marked-files nil nil nil nil t)) > (ignores (nconc (mapcar > #'file-name-as-directory I'd rather we gave the user the choice to either abort or proceed. It is not clear that the fact we search buffers cannot be a useful feature in some situations. From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Feb 2022 23:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= , Eli Zaretskii Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org> Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.164548792824992 (code B ref 54025); Mon, 21 Feb 2022 23:59:01 +0000 Received: (at 54025) by debbugs.gnu.org; 21 Feb 2022 23:58:48 +0000 Received: from localhost ([127.0.0.1]:39455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMIZr-0006V0-MS for submit@debbugs.gnu.org; Mon, 21 Feb 2022 18:58:47 -0500 Received: from mail-wm1-f46.google.com ([209.85.128.46]:54872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMIZq-0006Up-88 for 54025@debbugs.gnu.org; Mon, 21 Feb 2022 18:58:46 -0500 Received: by mail-wm1-f46.google.com with SMTP id c192so10398665wma.4 for <54025@debbugs.gnu.org>; Mon, 21 Feb 2022 15:58:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=k7np6UVbbULfq0ytKww7c9VvoqdYHOn1g4CWeQ+7AkI=; b=A1v0SfCPljg6H8DUpyyb0GvGcJdVSYxUlDAXvUYQNVl3vx/X8NTsjqWrBJ7DFIbRzf lHG0csCFJO9lKL63avPd2ypNb3w6NWmDQNUp0ZIOZ7Gh2a2MaGCK+S6Da32gIRdyQPQp n3lQAUAs3vZvDwLOhKsiTriVpJDlSEnMokjDkEGED9VAUJrngSd2N3/B7PZO47OcyeGc jIVIO0zHAPBiFwYk9LBUImN9v2EGL4pXnLyUjTIyN5uzPysEsc2ifNyXnnlAkOsl+TM4 Mf7zFjKtiVjS8LqS8ealWOlCUQiTSANnyGSb+Fh99HCPAprFT6P8HMUC+MF/BZR5Qz3A KMGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=k7np6UVbbULfq0ytKww7c9VvoqdYHOn1g4CWeQ+7AkI=; b=r5iuGKYhHz7IoqRvad6FXU7BbDRE4kEsIThHd6JXhkNR3p1k+OQuwG9N085MS1L2gk gPPYvMnBzfIkDDEX4bevNNsHM7wEjAwAqnBpNVG3OVRLm5FXcGk9OGNJ/AQG3WYFfHg4 1pgPGz/vsNWehUTpC/n72+jth+IH2em8dpsPhlKDcDOQ2F1AYQuxTs9+DbLhyrmF6GuZ zL5EI9q9ryW03IDR25OC7VGMr9RG9yadCOAh8nv0Oo2Us3uI84X8HK2O5YyT7NHT59A/ 1Py2y0XP6eZmC+qwME7sZNJcN7vrXL/yXVkmT/KxwlMn4I2elpjcTbNyGXCxxciviJz3 BtPA== X-Gm-Message-State: AOAM531sn8NQi9Xi5UjFeQUtoEuDXotuNq7FqlnPJccJ4WLED0fBPRac VK92L4ZPdEJuXIiN3+jm8DY= X-Google-Smtp-Source: ABdhPJy8JjdwYI1aKd0Ep7qUuslBOVzUt0ihueQOP0JyKDek4uoO28jZjpZpfUZ2pwmJ2Jeqie3QeA== X-Received: by 2002:a7b:c3d3:0:b0:37b:ea2b:55a4 with SMTP id t19-20020a7bc3d3000000b0037bea2b55a4mr1058798wmj.85.1645487920503; Mon, 21 Feb 2022 15:58:40 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id o12sm2205412wrh.89.2022.02.21.15.58.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Feb 2022 15:58:40 -0800 (PST) Message-ID: <7b385367-7669-9a0c-3a75-b9b23f99a69e@yandex.ru> Date: Tue, 22 Feb 2022 01:58:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> From: Dmitry Gutov In-Reply-To: <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 21.02.2022 09:00, Петров Андрей wrote: > Eli, Dmitry, > I think it is convenient to ask user to save some buffers (like `rgrep' do) if the search algorithm implementation requires all files to be saved. Optionally modified buffers can be skipped with appropriate logging into messages buffer. Sure, that works for me. As long as we indeed add some logging when encountering modified buffers during the match verification phase. From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Feb 2022 02:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= , Eli Zaretskii Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org> Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.16455839081653 (code B ref 54025); Wed, 23 Feb 2022 02:39:01 +0000 Received: (at 54025) by debbugs.gnu.org; 23 Feb 2022 02:38:28 +0000 Received: from localhost ([127.0.0.1]:43292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMhXw-0000Qb-2s for submit@debbugs.gnu.org; Tue, 22 Feb 2022 21:38:28 -0500 Received: from mail-wr1-f43.google.com ([209.85.221.43]:46831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMhXu-0000QM-AM for 54025@debbugs.gnu.org; Tue, 22 Feb 2022 21:38:26 -0500 Received: by mail-wr1-f43.google.com with SMTP id j22so10928648wrb.13 for <54025@debbugs.gnu.org>; Tue, 22 Feb 2022 18:38:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=sm82bHDvL2ZCsyH1QIYrrcygfUxAdOUNYxaLAm4cjj4=; b=FHlWNcvCzO1moOOrQ961Od2fUtqUvg5Ja0+zN41SG2kcsFkym26jsm49yN3tkJOKuF ajfWyN7b8DwGD/h4J7FdBaE91SHMOF/IdC0vEHO9h8BRg2NSYWALa6ruHZsZ9c9RrxQ4 LpO7RJrjJ4WGhAU7MHnNK3SKyGTclz2oRbztgRAN7V3PgQWKl58QmfCbEf/wgLlyClHC osIYIdGuNd5G2a/dNboeh3yV4Yc8hj55tbVsK/Mvr0UzScfTKVo2iEWq9ucClVAzjxGk YxhP7NY3fjiT3EUqvDp3wjdhUz8ixw16KP/GFV7zXjmv5yMHSZWfnzCKZnefmzDxic9L aM5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=sm82bHDvL2ZCsyH1QIYrrcygfUxAdOUNYxaLAm4cjj4=; b=UwLzotYfbM1FbRU+hh/j2RSp4Mvzesepm6ItfV+FumK5VDfLvzEK/G2ljX7epdCxSO 5vf6wrnPn1R1A/4ZLtO/sDPaz7HunZUq0tCefKbnty2aQugmo3ke2Iq7+RWTpFbZ9VvU sNw7tPZvEK5r3kW+HIS8C/lLeqlAmIlRsX5SpUxIueXIkCRCUK/jtaIZEfaKykJWJDt6 7ISADR+hGrpTaJ5TurNizG8wEooaYQOi4I2jh7ycHfCMp68N5VkgC6o/li+ORuRl/j/A WJww3mF+yYTDMPhQr2s/ZJg6pCgQReVVgc7oTbWxk4dSgbegdqZfti2qopeq9FRKqyST opGw== X-Gm-Message-State: AOAM532z0N0UBaaeOP3dpfbWy/ovpEE0pjRt79nJ5pGT3zPPpnVyQwSH s+WltYz5CIqR4UH/0AybImqnXDgxgJE= X-Google-Smtp-Source: ABdhPJxBLVN0l3i3Dp/Nv7sxIuFKHnOoEDdilYaCoqKELhDHZl+HmZN+CQzmqbLNvmlVjsEYWUtl6A== X-Received: by 2002:a05:6000:11c9:b0:1ed:b92d:8c68 with SMTP id i9-20020a05600011c900b001edb92d8c68mr62672wrx.692.1645583900409; Tue, 22 Feb 2022 18:38:20 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id p7sm31549902wrr.95.2022.02.22.18.38.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Feb 2022 18:38:20 -0800 (PST) Message-ID: Date: Wed, 23 Feb 2022 04:38:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> From: Dmitry Gutov In-Reply-To: <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 21.02.2022 09:00, Петров Андрей wrote: > I think it is convenient to ask user to save some buffers (like `rgrep' do) if the search algorithm implementation requires all files to be saved. Optionally modified buffers can be skipped with appropriate logging into messages buffer. How about this? diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 56897826cb..16094f4551 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -3272,6 +3272,7 @@ dired-do-find-regexp (require 'xref) (defvar grep-find-ignored-files) (declare-function rgrep-find-ignored-directories "grep" (dir)) + (save-some-buffers) (let* ((marks (dired-get-marked-files nil nil nil nil t)) (ignores (nconc (mapcar #'file-name-as-directory diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 880c5b5517..f772871f72 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -834,6 +834,7 @@ project-or-external-find-regexp nil))) (defun project--find-regexp-in-files (regexp files) + (save-some-buffers) (unless files (user-error "Empty file list")) (let ((xrefs (xref-matches-in-files regexp files))) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index aa98aa89f1..ae19632974 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -273,6 +273,7 @@ xref-backend-references The default implementation uses `semantic-symref-tool-alist' to find a search tool; by default, this uses \"find | grep\" in the current project's main and external roots." + (save-some-buffers) (mapcan (lambda (dir) (message "Searching %s..." dir) @@ -2013,7 +2014,9 @@ xref--find-file-buffer (setq xref--last-file-buffer ;; `find-buffer-visiting' is considerably slower, ;; especially on remote files. - (cons file (get-file-buffer file)))) + (cons file (get-file-buffer file))) + (when (buffer-modified-p (cdr xref--last-file-buffer)) + (message "Buffer %s has unsaved changes" (cdr xref--last-file-buffer)))) (cdr xref--last-file-buffer)) (provide 'xref) From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Feb 2022 07:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov , Eli Zaretskii Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org> Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.164559967930448 (code B ref 54025); Wed, 23 Feb 2022 07:02:02 +0000 Received: (at 54025) by debbugs.gnu.org; 23 Feb 2022 07:01:19 +0000 Received: from localhost ([127.0.0.1]:43648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMleI-0007v0-MQ for submit@debbugs.gnu.org; Wed, 23 Feb 2022 02:01:18 -0500 Received: from mail1.itgrp.ru ([185.8.182.248]:43618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMleG-0007ul-G6 for 54025@debbugs.gnu.org; Wed, 23 Feb 2022 02:01:17 -0500 IronPort-SDR: fNPnGU/ZRMM+xwAyYHWCyKm8RK+NuMokIxgq6WeP0iNBkyQqYb5w8z9n2qBe8HR44QepnrVTZY 3Rsuo58CUg6w== X-IronPort-AV: E=Sophos;i="5.88,390,1635195600"; d="scan'208";a="159706328" From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Thread-Topic: bug#54025: 27.2; dired-do-find-regexp skips occurences Thread-Index: AQHYIyjXtspqEmtb7Emo34ft0KOoIayc/TcAgABkI0mAADe4/YACqySAgAB1HP4= Date: Wed, 23 Feb 2022 07:01:09 +0000 Message-ID: <0239f68191344ab49b23ddc96c7bd6e9@pay-lab.ru> References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru>, In-Reply-To: Accept-Language: ru-RU, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.24.4.20] Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry, Looks great! RecentlyI found a function `dired-do-search' which uses searching in buffer= s (and sees unsaved occurences). It seems that processing unmodified (or no= t open) files with grep and modified ones with searching in buffers would b= e a well-balanced approach saving both memory and possible network traffic = (or SSD rewrite cycles) but this is rather feature to make in the future th= en a hot fix )). People who expect searching in modified buffers still can use `dired-do-sea= rch' and `dired-do-query-replace-regexp' which may work slower. So I think the current decision is OK. Best regards, Andrey Petrov. ________________________________________ =EF=D4: DG =CF=D4 =C9=CD=C5=CE=C9 Dmitry Gutov =EF=D4=D0=D2=C1=D7=CC=C5=CE=CF: 23 =C6=C5=D7=D2=C1=CC=D1 2022 =C7. 7:38:17 =EB=CF=CD=D5: =F0=C5=D4=D2=CF=D7 =E1=CE=C4=D2=C5=CA; Eli Zaretskii =EB=CF=D0=C9=D1: 54025@debbugs.gnu.org =F4=C5=CD=C1: Re: bug#54025: 27.2; dired-do-find-regexp skips occurences On 21.02.2022 09:00, =F0=C5=D4=D2=CF=D7 =E1=CE=C4=D2=C5=CA wrote: > I think it is convenient to ask user to save some buffers (like `rgrep' d= o) if the search algorithm implementation requires all files to be saved. O= ptionally modified buffers can be skipped with appropriate logging into mes= sages buffer. How about this? diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 56897826cb..16094f4551 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -3272,6 +3272,7 @@ dired-do-find-regexp (require 'xref) (defvar grep-find-ignored-files) (declare-function rgrep-find-ignored-directories "grep" (dir)) + (save-some-buffers) (let* ((marks (dired-get-marked-files nil nil nil nil t)) (ignores (nconc (mapcar #'file-name-as-directory diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 880c5b5517..f772871f72 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -834,6 +834,7 @@ project-or-external-find-regexp nil))) (defun project--find-regexp-in-files (regexp files) + (save-some-buffers) (unless files (user-error "Empty file list")) (let ((xrefs (xref-matches-in-files regexp files))) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index aa98aa89f1..ae19632974 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -273,6 +273,7 @@ xref-backend-references The default implementation uses `semantic-symref-tool-alist' to find a search tool; by default, this uses \"find | grep\" in the current project's main and external roots." + (save-some-buffers) (mapcan (lambda (dir) (message "Searching %s..." dir) @@ -2013,7 +2014,9 @@ xref--find-file-buffer (setq xref--last-file-buffer ;; `find-buffer-visiting' is considerably slower, ;; especially on remote files. - (cons file (get-file-buffer file)))) + (cons file (get-file-buffer file))) + (when (buffer-modified-p (cdr xref--last-file-buffer)) + (message "Buffer %s has unsaved changes" (cdr xref--last-file-buffer)))) (cdr xref--last-file-buffer)) (provide 'xref) From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Feb 2022 02:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= , Eli Zaretskii Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org> Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.16456710449618 (code B ref 54025); Thu, 24 Feb 2022 02:51:01 +0000 Received: (at 54025) by debbugs.gnu.org; 24 Feb 2022 02:50:44 +0000 Received: from localhost ([127.0.0.1]:46970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nN4DM-0002V3-F7 for submit@debbugs.gnu.org; Wed, 23 Feb 2022 21:50:44 -0500 Received: from mail-wr1-f46.google.com ([209.85.221.46]:46617) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nN4DL-0002Ur-C4 for 54025@debbugs.gnu.org; Wed, 23 Feb 2022 21:50:43 -0500 Received: by mail-wr1-f46.google.com with SMTP id j22so782416wrb.13 for <54025@debbugs.gnu.org>; Wed, 23 Feb 2022 18:50:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=38KZY3Z2fOFIrY5wDyBMw0QpdeSTSx/oWO4A8r96ZMQ=; b=Md9QBHR9rZab2G/lpdmVT0zCIP4r8HjwEC0opYE1bVjH/hOvELFprDTCvFNj5j4nBg BVfKW2pnjKMymg7GlLp94MWbSpYi8qLXtMGKtDi2kcYHaS5HUm4Tgp26rkug6Vi8RGTX 0YINIl8IdsEtgvUUtVaJLXEA/VX5YPpj94F2cEf+A44b7LRqBER7sRk/q8C4pVK6UBS1 A28iuos9Xk5A63VP5RIyk5qsOtSHQqnO8Fj/T84oR0bya81FBewgph1cdwxUIkp3pxnh HfLNECO00ISNBR0O6/KcaI3votw2gzSKo2Y3ikP9xtAJ2KahPF1K8iZlOVv7PV/e0Gin NGRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=38KZY3Z2fOFIrY5wDyBMw0QpdeSTSx/oWO4A8r96ZMQ=; b=rKLV1E+dmaWnJGpiSeOwMPfa/zD/0u17dB/ZHqj0MPGsNcnQ6XHWx2tqqM5E/4X6Ac fEJN0qQ6LQ6PLTfB6T/TdCuBdaP+76fTdQUefoPv+s1UCWzdAjvgPc6U4D3CYFXsdXw6 uW89W9IlB4VxgbuWodX/IUHdkjCQFuyDjevfnJGCou+H7WEDdlY35D4Asch9nzlTh+Up 9yZ3CdZEX0w33oQnbBYlETinZ9Ke9NN8OAhWAwiP5irH3Mb5okz2mwkg/3bA6a0tgcLU Tfh7az6I12ssnDgUeO3CYZCWw0NcRb3MtUzz0xpEHK7UQ4voppYZixsw2wqiySY+WSYf ZgUQ== X-Gm-Message-State: AOAM531bAGAeIHjJxyzmk3S8UDZ/gYsJqhhO9XUShXingrCPEevGgSoh 3Osx8wsAMWRycYrf+mHWidg= X-Google-Smtp-Source: ABdhPJxEo37+2+Vr2yJWL8949D+bQVsXqZXeqmm+btinpRaMZToIRUmMsdolAhVO8+6UFeNAiI0aEA== X-Received: by 2002:a05:6000:108b:b0:1e3:222a:25dd with SMTP id y11-20020a056000108b00b001e3222a25ddmr425001wrw.481.1645671037185; Wed, 23 Feb 2022 18:50:37 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id k19-20020a05600c479300b00380e461a4d2sm1541741wmo.0.2022.02.23.18.50.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Feb 2022 18:50:36 -0800 (PST) Message-ID: Date: Thu, 24 Feb 2022 04:50:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> <0239f68191344ab49b23ddc96c7bd6e9@pay-lab.ru> From: Dmitry Gutov In-Reply-To: <0239f68191344ab49b23ddc96c7bd6e9@pay-lab.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 23.02.2022 09:01, Петров Андрей wrote: > It seems that processing unmodified (or not open) files with grep and modified ones with searching in buffers would be a well-balanced approach saving both memory and possible network traffic (or SSD rewrite cycles) but this is rather feature to make in the future then a hot fix )). This, together with the previous discussion, gave me an idea. Do you personally want to be prompted to save the buffers? If not, we could just do the "with appropriate logging" part. More than that, when the buffer is unsaved, we can just process the text returned by grep in a temp buffer (which is what we do for all non-visited files anyway). So, how about just the change below? Or should we add the prompting to save as well? diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index aa98aa89f1..96fb835d0f 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -2010,10 +2010,16 @@ xref--collect-matches-1 (defun xref--find-file-buffer (file) (unless (equal (car xref--last-file-buffer) file) - (setq xref--last-file-buffer - ;; `find-buffer-visiting' is considerably slower, - ;; especially on remote files. - (cons file (get-file-buffer file)))) + ;; `find-buffer-visiting' is considerably slower, + ;; especially on remote files. + (let ((buf (get-file-buffer file))) + (when (and buf + (or + (buffer-modified-p buf) + (not (verify-visited-file-modtime (current-buffer))))) + ;; We can't use buffers whose contents diverge from disk (bug#54025). + (setq buf nil)) + (setq xref--last-file-buffer (cons file buf)))) (cdr xref--last-file-buffer)) (provide 'xref) From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Feb 2022 07:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov , Eli Zaretskii Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org> Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.164568754625834 (code B ref 54025); Thu, 24 Feb 2022 07:26:01 +0000 Received: (at 54025) by debbugs.gnu.org; 24 Feb 2022 07:25:46 +0000 Received: from localhost ([127.0.0.1]:47391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nN8VW-0006ic-6g for submit@debbugs.gnu.org; Thu, 24 Feb 2022 02:25:46 -0500 Received: from mail2.itgrp.ru ([87.251.91.230]:35293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nN8VU-0006iN-9x for 54025@debbugs.gnu.org; Thu, 24 Feb 2022 02:25:44 -0500 IronPort-SDR: 4PdIpSkFUEh6gjy9SZWJrwbDWVzcCXs9QqZNwvnwWSvMig10+srIYGhb13uuSiEjJFmB0Rpsj4 vSbFHz90VEhA== X-IronPort-AV: E=Sophos;i="5.88,393,1635195600"; d="scan'208";a="154402316" From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Thread-Topic: bug#54025: 27.2; dired-do-find-regexp skips occurences Thread-Index: AQHYIyjXtspqEmtb7Emo34ft0KOoIayc/TcAgABkI0mAADe4/YACqySAgAB1HP6AASCpgIAAfuOK Date: Thu, 24 Feb 2022 07:25:35 +0000 Message-ID: <8017fbd711264d36ba69b62c480a55c6@pay-lab.ru> References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> <0239f68191344ab49b23ddc96c7bd6e9@pay-lab.ru>, In-Reply-To: Accept-Language: ru-RU, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.24.4.20] Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry, I tested your patch. As for me, it works the best way! =F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD, =E1=CE=C4=D2=C5=CA =F0=C5=D4=D2=CF=D7, =D0=D2=CF=C7=D2=C1=CD=CD=C9=D3=D4 =EF=EF=EF =E9=CE=D0=C1=D3-=F3=CF=C6=D4. ________________________________________ =EF=D4: DG =CF=D4 =C9=CD=C5=CE=C9 Dmitry Gutov =EF=D4=D0=D2=C1=D7=CC=C5=CE=CF: 24 =C6=C5=D7=D2=C1=CC=D1 2022 =C7. 7:50:35 =EB=CF=CD=D5: =F0=C5=D4=D2=CF=D7 =E1=CE=C4=D2=C5=CA; Eli Zaretskii =EB=CF=D0=C9=D1: 54025@debbugs.gnu.org =F4=C5=CD=C1: Re: bug#54025: 27.2; dired-do-find-regexp skips occurences On 23.02.2022 09:01, =F0=C5=D4=D2=CF=D7 =E1=CE=C4=D2=C5=CA wrote: > It seems that processing unmodified (or not open) files with grep and mod= ified ones with searching in buffers would be a well-balanced approach savi= ng both memory and possible network traffic (or SSD rewrite cycles) but thi= s is rather feature to make in the future then a hot fix )). This, together with the previous discussion, gave me an idea. Do you personally want to be prompted to save the buffers? If not, we could just do the "with appropriate logging" part. More than that, when the buffer is unsaved, we can just process the text returned by grep in a temp buffer (which is what we do for all non-visited files anyway). So, how about just the change below? Or should we add the prompting to save as well? diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index aa98aa89f1..96fb835d0f 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -2010,10 +2010,16 @@ xref--collect-matches-1 (defun xref--find-file-buffer (file) (unless (equal (car xref--last-file-buffer) file) - (setq xref--last-file-buffer - ;; `find-buffer-visiting' is considerably slower, - ;; especially on remote files. - (cons file (get-file-buffer file)))) + ;; `find-buffer-visiting' is considerably slower, + ;; especially on remote files. + (let ((buf (get-file-buffer file))) + (when (and buf + (or + (buffer-modified-p buf) + (not (verify-visited-file-modtime (current-buffer))))) + ;; We can't use buffers whose contents diverge from disk (bug#54025). + (setq buf nil)) + (setq xref--last-file-buffer (cons file buf)))) (cdr xref--last-file-buffer)) (provide 'xref) From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Feb 2022 01:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= , Eli Zaretskii Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org> Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.164575311016661 (code B ref 54025); Fri, 25 Feb 2022 01:39:02 +0000 Received: (at 54025) by debbugs.gnu.org; 25 Feb 2022 01:38:30 +0000 Received: from localhost ([127.0.0.1]:50782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNPZ0-0004Kf-Kg for submit@debbugs.gnu.org; Thu, 24 Feb 2022 20:38:30 -0500 Received: from mail-ej1-f50.google.com ([209.85.218.50]:39873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNPYy-0004KQ-TR for 54025@debbugs.gnu.org; Thu, 24 Feb 2022 20:38:29 -0500 Received: by mail-ej1-f50.google.com with SMTP id p9so7908389ejd.6 for <54025@debbugs.gnu.org>; Thu, 24 Feb 2022 17:38:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=icM8gJlG3SnM6AcgGHqjTLxPIIMCm/06aFBMBpUFYCA=; b=QfCjNdJdSMTHu+RVutTbW1c44Qwf5GdRD58cZQkoxwBlL614r47EF4t49nv/Qs9Qpv nuXlY9fGuCV+gOF5gtzMdkSfnSrkMFe80IKR6Bg08WJW8KKhLbA1WaSopnpJjBz30BVX gBqLsoLkgBZ1Ichywl77qu9X9ukjPBWf9EBC2zYibBdONZWPJfDe/5LyiUgjaeeL76sS yimFCDk+oEwNufvfR6LFbZAjKmmtImQXa5C0crdr1G1ZrA7WFFMXLMVk+apcf2nKrp23 lGPlDnszFeKe2F8ay2IqTkFfcH+G21vCTj1cNf3pUOY748zVRHf+jQxOtHHLpr0GkjGX P6EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=icM8gJlG3SnM6AcgGHqjTLxPIIMCm/06aFBMBpUFYCA=; b=0ogEBL57IGjOXFQBMZJO7xCLOj9ed7LTBTj7bslDo7gCAoKhM5be5B0j1UAk30swD/ PGAzGP10f4i/PCH/h7Q+wKhU3pfFgXyaJtmIUeH37zuk8BDglU4xtkbbfxBXGjABqkYr WlzUl2rFqdiwUFxuHEbcrv/88egWdXnwNwFgoU9piXFBcgE6VRcELywK4z1j0RzHZ6BM BhA4Uq6iOLHafwg9AwD5mvMtjAbntrnOU4j8F9x5LvdhRqeAtmV5Qn0XYWxUG1sMcDkw j4x83G6TqlSuhB2pgI441B+Sr8wxMggFGv47AWkSxGeeQGS+8py9otPyS2R4LhWjQNWJ 2Dpw== X-Gm-Message-State: AOAM5303tENYNWOKhkGcfbVVv/cbK3/75erv/xmsYX0A2hIP/hHBo7xh N3XCw/9ZdRjD1lFWtO+coqxBy5p78Ho= X-Google-Smtp-Source: ABdhPJw5VOl+xXUKfsw5Ux6hwnaocatiDp209eMLoYaPiVxVnQryIFyY2wZXnHzrERinIBS8tDSrEQ== X-Received: by 2002:a17:906:1b4a:b0:6ce:b0cf:7fb8 with SMTP id p10-20020a1709061b4a00b006ceb0cf7fb8mr4414147ejg.429.1645753102729; Thu, 24 Feb 2022 17:38:22 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id r3-20020aa7cb83000000b0040decce18bdsm547301edt.99.2022.02.24.17.38.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Feb 2022 17:38:22 -0800 (PST) Message-ID: <7f544a39-e32d-2d62-4db8-dc957d243aec@yandex.ru> Date: Fri, 25 Feb 2022 03:38:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> <0239f68191344ab49b23ddc96c7bd6e9@pay-lab.ru> <8017fbd711264d36ba69b62c480a55c6@pay-lab.ru> From: Dmitry Gutov In-Reply-To: <8017fbd711264d36ba69b62c480a55c6@pay-lab.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 24.02.2022 09:25, Петров Андрей wrote: > I tested your patch. As for me, it works the best way! Excellent. Pushed to master in fa2b60615b. Here's hoping it won't slow down the process on remote hosts, but IIUC Tramp should be caching that info heavily. From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Feb 2022 08:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org>, Eli Zaretskii , =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.164577679813537 (code B ref 54025); Fri, 25 Feb 2022 08:14:02 +0000 Received: (at 54025) by debbugs.gnu.org; 25 Feb 2022 08:13:18 +0000 Received: from localhost ([127.0.0.1]:51218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNVj4-0003WG-CE for submit@debbugs.gnu.org; Fri, 25 Feb 2022 03:13:18 -0500 Received: from mout.gmx.net ([212.227.17.22]:48115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNVj2-0003W3-HM for 54025@debbugs.gnu.org; Fri, 25 Feb 2022 03:13:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1645776789; bh=VHGX2Vv+4e0dAUAgfrYsdgvbx0L2nKvE8lGC2i6xuX4=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=R3brlIP+nbRYperfZxS1QTHxAbbOcomPUbLpgh3UaCw55dN99iNgDuSLuZFzxkgxr Bci9ETSna3tGmTrkAW8I7hI5MvIZlER/yQ7pL9UwXQMRF6X6NdMRv+k3dUb5kUz6Nz FwWxedZPCBA9whw0Z/Oqx54KE+SaZvfsiLA1O6Lo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.124.231]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MQMuX-1nb4OS29oX-00MLbf; Fri, 25 Feb 2022 09:13:09 +0100 From: Michael Albinus References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> <0239f68191344ab49b23ddc96c7bd6e9@pay-lab.ru> <8017fbd711264d36ba69b62c480a55c6@pay-lab.ru> <7f544a39-e32d-2d62-4db8-dc957d243aec@yandex.ru> Date: Fri, 25 Feb 2022 09:13:07 +0100 In-Reply-To: <7f544a39-e32d-2d62-4db8-dc957d243aec@yandex.ru> (Dmitry Gutov's message of "Fri, 25 Feb 2022 03:38:19 +0200") Message-ID: <87fso7mkj0.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:DIn+fu3ArryZKSJ7Dd0U/Ct/MaTTQOVO5PwNCVnOHDlt1v0nNg7 uE2qs+qdcUQ0xlcito5NHwD1FJSZz8nr732CTBVAGIiySZbDjRBYT1IyKAssKImR7j8LQaA xEI8WbjaClcggpRYw8po+wQ+m3pmKR6ITrceR2U2HTAbZYaU153EeZ14oYvjPedokxMw7u0 wViMIaVASy2RI92OHgQCQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Ct1P1cag8I8=:a7zAGlmRypyAOS4GlDJUBx SKwMDa2IY0F/Lsraca7WfX+5mkd5mBI2GbRkQnpDVIneAlUl4d97+GRM8a/xKXU1ssDy7umc3 uKM+rbammJ7/wiY6vkB1cCrCik9ke8Ocx13wRoNSMpmov9QvAZM/Fgj56EenclccGwa/KiQhC DQN+a4F6UFzBkfQz6Rwu86lCxs/58XeUa66Lg6oPO+y+Z7fsOBvljqGKupqRk2Ns1+Oyj/l1T 6vN4oUgRAyE/y5qM82cLN4/PAti0e1otGnZzNQK11Pi5Jrqx3jaAlt2YT3XPIlasRU8skYhZX GnsRlJQBm3lRi4ADZrftZiCxq5t0hIHZA0AhZEHlkFdDUv/JQfHwptGkYgOG7tW/W+MOWAT1y dWOmRZTfCDV9w96aMhsx25sLRftbYyLc56KvB9X9LT9VloEsEhvO9dbmNZRP7twRQ+XZu/jrw ZZk0pqNzuM2XAfxXrZP5ZYEHNLmTo68+AevO6fH+WD0oXVzwk/Voguyb1JQaV/YMHUHDd/2EI c3a8gvZKBC1A3zj4Mtt5nMuv0Ob0+EoP2qDKcr5mfQHMNGqyLKJosbHj7ggzZ038GFxqUVqls /uWuFASuqgZmz4t4QR79nxcKFPAbm9kzgYcbE7pbwW1+K3ae4lqG5QL+lZDIK/MrHjCmi4lQP xcHq/6IldHVJ7fDoEGgJFgBf3b6Ry973fBfT5HadY8hF6tbanUpmW3OFUIPHUIOH8J168cKbr Yb1/Zsa1ObaAxuie/H73x7kRMcgAoFXugcq+dZL3xJUpUeRPnDOgWC7DEknzvtPONDIRtBCj6 fXOL57NlMpsi/KhN6Cn7wEq1vgGmpHRk8ee3dh20CCkWvDJhFbOS86ojUrP1UH9bsBOnVIB1Q mXm5mL6QjT0nM7UD6s1dwhRM1P3Itbr0OkK6xYujiTyxI+5+rdUxN/k4H5+0uarBs0E86nL3z rSY05DlOHtXLHlqO/6Q5tPRjT1lD3SzRbXORNX/b5LlcogcuSI2EXAA9VnKIe8a3dizFFSUu0 pA7iCkKVrkY5jyTDEtSHfoYKE8I54eeYivTy3LUGvrOGKghISGZnTiYepynIMgJem1cvmBl84 wdLiGCbEovn+mw= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Dmitry Gutov writes: Hi Dmitry, > Here's hoping it won't slow down the process on remote hosts, but IIUC > Tramp should be caching that info heavily. Tramp does not use caches when computing verify-visited-file-modtime. Let's see how it goes. Best regards, Michael. From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Feb 2022 13:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org>, =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.164579686027024 (code B ref 54025); Fri, 25 Feb 2022 13:48:01 +0000 Received: (at 54025) by debbugs.gnu.org; 25 Feb 2022 13:47:40 +0000 Received: from localhost ([127.0.0.1]:51579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNawe-00071m-F3 for submit@debbugs.gnu.org; Fri, 25 Feb 2022 08:47:40 -0500 Received: from mail-wr1-f47.google.com ([209.85.221.47]:38697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNawd-000712-D8 for 54025@debbugs.gnu.org; Fri, 25 Feb 2022 08:47:39 -0500 Received: by mail-wr1-f47.google.com with SMTP id v21so4618269wrv.5 for <54025@debbugs.gnu.org>; Fri, 25 Feb 2022 05:47:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=u9+4b+qdVN3nETNsb5AiY/2B+t/+scoqzYUn/gX8Qa8=; b=gLaiknnyqQCVtoi2TzQTWxWXJbvVMvGJPn/e0nK43kwvTd+r5Q3cMIAWgiyXtxQdBm ZPw6q/Uo8uDrv9BB1OZTYHGzaO7Tv9QJKi+QYjx6AwOIRQYaH9LRVOL9+bRAkJZs0qhx H3i8nePo0OlzJXXmiDxed/FwfDHMGktZPhVhr17K2Im1PGCjVJcIOHXtWMFJRmVO886T JLn5mOzpsIMdVTlofqwCqyin+GiPqXG3QNMjcg0ZHqNjL1D/Ha6zfKY4fj/N2UmpIiEe SRkXAIiEWO4VpoQaKu+77RHRpItZ9yYsKG8I02Ryg8USYi/TNYFZ3azXmTZbUybhGT8O 7fag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=u9+4b+qdVN3nETNsb5AiY/2B+t/+scoqzYUn/gX8Qa8=; b=hlusodnaQbXKDGLaWmfFx+QMBHHD8a+mZDZcBoBHo/ClYbD3PnB6EtUqddciXARIgS e5Ko+Zm2T1REj8rT9dyxX8GM7d3n+msxG5ymRmmd6j73IoEapgOwcJygc/cQHxN7OgE0 2aOKjYGO6NT3PPnrILissRhKnJf+ESmhZH4OrdmVoiXB8waBBfRSO9T6Kd9Er9fbiH8d T/bPoXXJ3HR3p1/2Pm9mGspXriEi9Vh+M0sIbO3zONzkcxedTv1EDJfLQ8mRcMRQd2DV 0vB++CytwFQQAV2SEhcJvO7p9LSYiZmsKhX0QQQUrDyKFxgq+18Z1s8iz87EPljEKEgk Imlw== X-Gm-Message-State: AOAM532nFf94nqbuQuwYlcHdZ1+Nh/fWbvwWfCaBwouRf4WkUAdVeq7p X7fYPYPxhL7ddbNQJTwmK3A= X-Google-Smtp-Source: ABdhPJzZ3oPJpHfK6FkUaIioe+x3IErR9+IFs9vppB0hmEI0TPntIaDQ4uIOyl18Lcc7ORHS2nvpKA== X-Received: by 2002:a5d:480e:0:b0:1ed:9f27:47e with SMTP id l14-20020a5d480e000000b001ed9f27047emr6119800wrq.511.1645796853100; Fri, 25 Feb 2022 05:47:33 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id b10-20020a5d550a000000b001e551ce8a64sm3479986wrv.9.2022.02.25.05.47.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Feb 2022 05:47:32 -0800 (PST) Message-ID: <274c3d9c-205d-be47-1bc6-1aeeacd659e8@yandex.ru> Date: Fri, 25 Feb 2022 15:47:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> <0239f68191344ab49b23ddc96c7bd6e9@pay-lab.ru> <8017fbd711264d36ba69b62c480a55c6@pay-lab.ru> <7f544a39-e32d-2d62-4db8-dc957d243aec@yandex.ru> <87fso7mkj0.fsf@gmx.de> From: Dmitry Gutov In-Reply-To: <87fso7mkj0.fsf@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Hi Michael, On 25.02.2022 10:13, Michael Albinus wrote: > Tramp does not use caches when computing > verify-visited-file-modtime. Let's see how it goes. I certainly hope that it doesn't invoke a remote call every time this function is called (when called locally, it hits the disk). From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Feb 2022 15:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org>, =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.16458015684698 (code B ref 54025); Fri, 25 Feb 2022 15:07:02 +0000 Received: (at 54025) by debbugs.gnu.org; 25 Feb 2022 15:06:08 +0000 Received: from localhost ([127.0.0.1]:53479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNcAZ-0001Dh-N8 for submit@debbugs.gnu.org; Fri, 25 Feb 2022 10:06:07 -0500 Received: from mout.gmx.net ([212.227.15.15]:51545) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNcAY-0001DB-1M for 54025@debbugs.gnu.org; Fri, 25 Feb 2022 10:06:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1645801559; bh=tMtPd7c0artDxC9+sd2vPTG/Pd6lEqhhAxXUaSkzDt8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=W5xSL2YxT62xeqO6Q2EAdg6AuEvFhegGIrsh9uCejPCDMO20kjkSq65fG0oTHotyr 98vzuc7fsw0nr9eMTOpQ5bmmqVE3eZxD5BMHNxNCDOdkiy6ET1sRw0B+tXcp5U2tCN m4lleIn5TdDmdhsLQto+IPYwua0tr1XC6Ltatv/Y= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.124.231]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mel3n-1ny3Vq1gBx-00akTb; Fri, 25 Feb 2022 16:05:59 +0100 From: Michael Albinus References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> <0239f68191344ab49b23ddc96c7bd6e9@pay-lab.ru> <8017fbd711264d36ba69b62c480a55c6@pay-lab.ru> <7f544a39-e32d-2d62-4db8-dc957d243aec@yandex.ru> <87fso7mkj0.fsf@gmx.de> <274c3d9c-205d-be47-1bc6-1aeeacd659e8@yandex.ru> Date: Fri, 25 Feb 2022 16:05:56 +0100 In-Reply-To: <274c3d9c-205d-be47-1bc6-1aeeacd659e8@yandex.ru> (Dmitry Gutov's message of "Fri, 25 Feb 2022 15:47:30 +0200") Message-ID: <8735k7m1ez.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:YCSvQc2YVtevbD4IIrRZ+N1y8t9X92qUHV3kTp75zEv3Apx3QRI /qbHMBfogMCOPuQbtVfKOkSQ8yPb3IqjcJSQ/z3jZMZcWhYGPPsRDMUWI6rcwhuNNPGwans UPAqNHNN49jJlPWi+Wzj0NbG0hbe6M9KL39NzP3/953DtVIGfDOuamDM/0JGxlL9iiBGZnS TvHWHnIJT9ezepOScgZdg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Z2oNOXJ6/qQ=:Pk7bVThJSuHNIzsncHpT0R Kk74bBFJBnEiGtKePofbeXXowKsTnSgcYnbFYvWcWyzkaba8mzV0thQT5YNJLqW3qKHsJNKZg EE1b2Fki5TW06Px9uQREO6zwgmWVcw8pAnXJOQ3+af+kcVJRbxJDH9ZzomcQbq+mf489sZGem Y8qwhpPJ4EK0NS+/MQKNL3gebz8NjEqMmx7rebrghFS7H+XiyY5q2+gIXZCVP1MfqZNtgw+1W d4gAr5VHyFFS1ae9e7rY+ZNqb/oUwUN3VDxKmGf8pIgNKvoHnG/uK0LGZU5K3wQHe1SPv/gxs F7NhP7aXPMaljven3VoNtPs0mXwkU0auT/hSsaa2HCL0uxptPHEbx58D9OvcBsyC608+bJtN1 ZPNJuncduaP3x1C+muTOfQrNHFiU+VGypOPjpGI9Gld+o9AQ41vSHreYWmkXlYq27P5otWt4R 2oTwqaEm1urkYSfgh9Ict7CtL84oUkFcorX/MRkvGOcfiUsP3V7175wbIxej1laBxIktzHJTn XSooaAi6JNnDh0bz5wv1UR5iKFBQMX+7K88XIbjeGuYo41dUtri/zvqTCF6bvzy2zQAQxUid9 IEMPb0lzxQW3SkA8ZSyuiCG++aDPDUAFUky8QP0JUnUfS+YZ6OulqL+vw0L9UlUHTUJLf6JRo q6+XWgV7yiOc2wrN9Mx5sj4vyBKN9iRlgcD+UngtsED/mzJtWXLXMB0BuRfsQAJApK98Fj9Lk EkatqXs20Z0V6ErUADry6W8sBwyPWgkdytL59VQuuyuMs4Ba80EDlx+VlEXocegh6bVekbW7H VbFg4rKb0gMITiI40SuFTT7C723iwYtDT96QMtSjngZbfrd8lRAalgfvoTcTICjO/+ho8BLh/ rG6mdorR+SvGte3X1aInOPQ/0x/7ZeN6BdZ1Fr7WdS4ODPo6lfuBrx7PhesT3C51bO7NaVzvs mdcEA8DHs2VlAwcLQ0x8v4lLXP4k0xJ2KoReafg7cUJ8eSq4cuxvWHRWNSgmER3GiwUpXAApr cx2p4Gv9EpWcudFVteKbfy47A/qaqtDJuBFDaHdd8APVOJQ5V+Kwkzrywvzfwu/RxH+gTGd85 q3gPAdlnClAonE= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Dmitry Gutov writes: > Hi Michael, Hi Dmitry, > On 25.02.2022 10:13, Michael Albinus wrote: >> Tramp does not use caches when computing >> verify-visited-file-modtime. Let's see how it goes. > > I certainly hope that it doesn't invoke a remote call every time this > function is called (when called locally, it hits the disk). verify-visited-file-modtime needs to read the file-attributes. That's the idea of this function. Yes, every time it is called, it goes remote. Best regards, Michael. From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Feb 2022 00:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org>, =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.164583534026898 (code B ref 54025); Sat, 26 Feb 2022 00:29:02 +0000 Received: (at 54025) by debbugs.gnu.org; 26 Feb 2022 00:29:00 +0000 Received: from localhost ([127.0.0.1]:53942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNkxH-0006zm-SD for submit@debbugs.gnu.org; Fri, 25 Feb 2022 19:29:00 -0500 Received: from mail-wr1-f43.google.com ([209.85.221.43]:37704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNkxF-0006zY-Tz for 54025@debbugs.gnu.org; Fri, 25 Feb 2022 19:28:58 -0500 Received: by mail-wr1-f43.google.com with SMTP id d28so6735123wra.4 for <54025@debbugs.gnu.org>; Fri, 25 Feb 2022 16:28:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=hzxo4RwMhnVPC0DL4Ae+iRvDX0yaLTgCb//qV34Q3eU=; b=B4WXcU8arFm3PPPcZ6LUT3wL/z++ttcnZyYPcEj+O1uZbrSG4wwrgEVodUR2rEaabc EXF+wM4BKWBQt3OvEuTrg1V6Q+YrViMY7ZeHnmdsqqVtXqtg46DNevXwpYURqvSosLDB IEH3lU/IoVYhxA5D6HEgxvhZ+UspU14a96etaj7g0IngdkY6k1DZgkw1uy6v8EoxM9vm TGdLfxRWOcUTygxvD2duFt2fzJw/B5hhGebF9OSeZzwrkt2oPGBh3P/Wz+QaAx4CLO6b mZd6+f+bZ7G43wXnZNna07pMBdSQBzcIUv1lg5zwhSDIB3SLMZXtu7uy4EFtGnfiIte6 rZfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=hzxo4RwMhnVPC0DL4Ae+iRvDX0yaLTgCb//qV34Q3eU=; b=7dcHL00nqK/2W0mwTadEG8Kprw7lmsHAHLuvm/QQ1oXVz3+i6xBP1hSaInGTa3cfH7 E41nQHeGyqgQai0S6ZdFTOqb/XYeZxslGwPD+B1huRIbsl7q+NuAIuFoyBL5nR6u7RKY o2sPYE7ZtZRXV2E41GoMcdwpfVFjoi7qkBxAIvjVCLUoTpOtr+obaf/Zi3coL5J8J8Mz p0dBf1Q/X59Tqv5cWlTxpxaCJYx/eQAv1YBY82Y9UoAKlNSSo1mD7zn93YVaiBPKckjJ hGaTrSUqrNrKzjM8IDZvNxC/JDIw4ahDpdwceFThBxGD0xG6/mWQCYAzicnpIaCYjgF8 Kbsw== X-Gm-Message-State: AOAM531kfUs67t730oIduQRB5drOnB65nmkdxg4LAXI9DYFWBcdz02k6 3M0X9m5ZFyVA7jFPIj0UzQI= X-Google-Smtp-Source: ABdhPJwhbyuKmYqO9GtqSt5Bi1E8df+jAXS9o8gUSsBGvBd5mRUi+7mquQRCsosXZHmrtRjqhDBkZQ== X-Received: by 2002:a5d:6c6b:0:b0:1ea:77ea:dde8 with SMTP id r11-20020a5d6c6b000000b001ea77eadde8mr7870275wrz.690.1645835331931; Fri, 25 Feb 2022 16:28:51 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id z2-20020a056000110200b001e7140ddb44sm3357719wrw.49.2022.02.25.16.28.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Feb 2022 16:28:51 -0800 (PST) Message-ID: Date: Sat, 26 Feb 2022 02:28:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> <0239f68191344ab49b23ddc96c7bd6e9@pay-lab.ru> <8017fbd711264d36ba69b62c480a55c6@pay-lab.ru> <7f544a39-e32d-2d62-4db8-dc957d243aec@yandex.ru> <87fso7mkj0.fsf@gmx.de> <274c3d9c-205d-be47-1bc6-1aeeacd659e8@yandex.ru> <8735k7m1ez.fsf@gmx.de> From: Dmitry Gutov In-Reply-To: <8735k7m1ez.fsf@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Hi Michael, On 25.02.2022 17:05, Michael Albinus wrote: >> On 25.02.2022 10:13, Michael Albinus wrote: >>> Tramp does not use caches when computing >>> verify-visited-file-modtime. Let's see how it goes. >> >> I certainly hope that it doesn't invoke a remote call every time this >> function is called (when called locally, it hits the disk). > > verify-visited-file-modtime needs to read the file-attributes. That's > the idea of this function. IIUC Tramp caches some information about files, and flushes those cashes after "destructive" operations. "Last modification time" could reside in such a cache. > Yes, every time it is called, it goes remote. Thanks for the confirmation. I guess we need to predicate that check on the file being local, because the worst-case performance in our scenario (remote system with high rtt) could be very bad. We might even drop if later if some hdd users see a slowdown in common scenarios. It's a secondary check, after all. Commit 018eeb655a. From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Feb 2022 11:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org>, =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.16458766225568 (code B ref 54025); Sat, 26 Feb 2022 11:58:01 +0000 Received: (at 54025) by debbugs.gnu.org; 26 Feb 2022 11:57:02 +0000 Received: from localhost ([127.0.0.1]:54386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNvh8-0001Rj-5C for submit@debbugs.gnu.org; Sat, 26 Feb 2022 06:57:02 -0500 Received: from mout.gmx.net ([212.227.15.19]:52703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNvh5-0001RC-Bg for 54025@debbugs.gnu.org; Sat, 26 Feb 2022 06:57:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1645876612; bh=+xwLGNtQfWYopG33XR6AmCop7DJkldaiqGrlx2DNFZk=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=ZgGdgbCcvPOMGeypMHQFxRS+mSCuNJVssznvcQ3FPyS1zU6dpWEuRaXVD2yCK4rFr 5p781yC12pNtp4/v/FaTdVBq6kmvgkPAEzV7TQus3fE4a4eVescWxsnMVgye/RV4iC drVcXQLDwzS5iR+qcCXadPcwHCounyDempnlA1i8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.124.231]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MLR1V-1nfK7T2uUl-00ITGu; Sat, 26 Feb 2022 12:56:52 +0100 From: Michael Albinus References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> <0239f68191344ab49b23ddc96c7bd6e9@pay-lab.ru> <8017fbd711264d36ba69b62c480a55c6@pay-lab.ru> <7f544a39-e32d-2d62-4db8-dc957d243aec@yandex.ru> <87fso7mkj0.fsf@gmx.de> <274c3d9c-205d-be47-1bc6-1aeeacd659e8@yandex.ru> <8735k7m1ez.fsf@gmx.de> Date: Sat, 26 Feb 2022 12:56:51 +0100 In-Reply-To: (Dmitry Gutov's message of "Sat, 26 Feb 2022 02:28:49 +0200") Message-ID: <87pmn9lu2k.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:zPmPcB8LOK6nlDL+OSSPOtjEcJpqB3KtC2bwvEb1yCgduZGWjR7 sK/xEgk0s6J7oTxnqNx27NYgwlkF9cJexwLH+xGSubaXsVChV86MWd4jmYAIu8+1sDIq3tr DhyT5NH6o+9fNh6taJbQF5106vI4jZflVHxBtCqYwuHPQIQ2SYL+NnyRfcxRN/hrf4js1IF BYg3OFkJmK8484q6D7eQg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:4nhvwFx7a/4=:b1caKoJH4+6cTAYDysNadF paOFHNTW6MoaZgpB3TnAUvUgDrxz5woBzScvUMc3q53eXgwc+1JIk/dO20Xt85ABIkcNsG223 jKLqL/OJ9q1MCFIyUeZ5Du2GV82EWRI7PCnrtzFnF1ZKJM9McINdDbGSC89QXFh618mCnYqdW ok6k69HK37DTC7N+m8swoWdMANiqbm0PMOLwjApANR2a/OW+UU0QUQWnSXfpjgjZydP3l+y17 WiZ1lHrPWJtXER/+ETN6x2PpN/xiTwqnj23q7JUo83S52nn8bkMcYL5aJF+fU7RFyIjdmsnyZ WZn7neyz1DbIBWKZuQySW//KUabOnFs+w+7fhmUyF1MyblkogLHc7QlGWN9LIBKW4eTMZkJoY xBXANkgx2rSqBR6rP3smhYUPeQzQUf//ysO3ELYYuMIAiYDLR/yo0gf6OF+L9wCCI2p+XdwjE 3gN/ZyCrK/+tBDPo475mxteFXJjXNifMmlvOJiNrEyjMIE8HRSJ5xtLUnCEKpFnhxVjR4kdVC WwRsWieSeWuo79bRS0hDxPMfHpv44dyCdVrFGiJ7Tg+/OUqsfwExnPKlj2Fs9T7sVrP28Ssob OOSm0svQrebcdyCjidtif3RLswvGHRWAuY2fyZVtiH/B9zwVucgasZnQM6PglzNUFEiu1Sc/s 0pPDk1dzWhDRXPkf3bZu7O0N2OgTLwoT5UlDYzs8WZxhcKOoTJ9x5M3d6Mv1hrJ7IdiiwIDgb ScXUJg8hvaBr8VHD3avdhs8T/rHGkYonKvXU0dvqqaBS8ZiMjkw3pl7cDe1wZK1LeAlt0osaC U5IK1C+vQxoYeBtkxCVVSxj10seiSqBklRz8TysLEWwv7pM7KbzGsgzU+PxFPuq+kLfrjm/AM qZyCkfJ7zw/FmEz9xJp7UzXvxs5r0Wss3xE86kY/Mr4aoI03A7Rf1K7nhqwchoMB3zOnnyhrX S2FZgk8zdBS9F+vqb5O2vGDTxsh6Rz6rwDlBCIajRVb5jbIGkRFnLBEBJSRvC+7BJkQ7DcVfl nHWTrRuVWNVmSkeC1xZesKXmz9M3fYBODV0St6NGrFcwgZVsDN0tX8iUuyVzXAQrzceKnW6bG EDJQoypvfl9Z/M= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Dmitry Gutov writes: > Hi Michael, Hi Dmitry, > IIUC Tramp caches some information about files, and flushes those > cashes after "destructive" operations. "Last modification time" could > reside in such a cache. In general, this is correct. But verify-visited-file-modtime is different. Its task is to check, whether the buffer's known file modification time is still valid; it could have changed on disk due to external changes or so. That's why it cannot use the Tramp cache. Best regards, Michael. From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Feb 2022 22:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus , Dmitry Gutov Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org> Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.164591473913278 (code B ref 54025); Sat, 26 Feb 2022 22:33:02 +0000 Received: (at 54025) by debbugs.gnu.org; 26 Feb 2022 22:32:19 +0000 Received: from localhost ([127.0.0.1]:56416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO5bu-0003S4-DW for submit@debbugs.gnu.org; Sat, 26 Feb 2022 17:32:19 -0500 Received: from mail1.itgrp.ru ([185.8.182.248]:59051) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNyT9-0002Pp-F5 for 54025@debbugs.gnu.org; Sat, 26 Feb 2022 09:54:48 -0500 IronPort-SDR: DEX/NNGm+CdHYvV2T3pFAleQljn9u+HSp0fYQdvam6NWJSTxN0KK8DaFWAhPTNoAco/DzSbu82 C5e/Mj4Zf6GQ== X-IronPort-AV: E=Sophos;i="5.90,139,1643662800"; d="scan'208";a="159764729" From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Thread-Topic: bug#54025: 27.2; dired-do-find-regexp skips occurences Thread-Index: AQHYIyjXtspqEmtb7Emo34ft0KOoIayc/TcAgABkI0mAADe4/YACqySAgAB1HP6AASCpgIAAfuOKgAD/QYCAAKCyrYAAKwkAgABIRLiAAGrrgIAA8rDegAAoEG4= Date: Sat, 26 Feb 2022 14:54:39 +0000 Message-ID: References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> <0239f68191344ab49b23ddc96c7bd6e9@pay-lab.ru> <8017fbd711264d36ba69b62c480a55c6@pay-lab.ru> <7f544a39-e32d-2d62-4db8-dc957d243aec@yandex.ru> <87fso7mkj0.fsf@gmx.de> <274c3d9c-205d-be47-1bc6-1aeeacd659e8@yandex.ru> <8735k7m1ez.fsf@gmx.de> ,<87pmn9lu2k.fsf@gmx.de> In-Reply-To: <87pmn9lu2k.fsf@gmx.de> Accept-Language: ru-RU, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.24.4.20] Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Mailman-Approved-At: Sat, 26 Feb 2022 17:32:17 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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?). - 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. - 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? 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. Best regards, Andrey Petrov. ________________________________________ =EF=D4: Michael Albinus =EF=D4=D0=D2=C1=D7=CC=C5=CE=CF: 26 =C6=C5=D7=D2=C1=CC=D1 2022 =C7. 16:56:51 =EB=CF=CD=D5: Dmitry Gutov =EB=CF=D0=C9=D1: 54025@debbugs.gnu.org; =F0=C5=D4=D2=CF=D7 =E1=CE=C4=D2=C5= =CA =F4=C5=CD=C1: Re: bug#54025: 27.2; dired-do-find-regexp skips occurences Dmitry Gutov writes: > Hi Michael, Hi Dmitry, > IIUC Tramp caches some information about files, and flushes those > cashes after "destructive" operations. "Last modification time" could > reside in such a cache. In general, this is correct. But verify-visited-file-modtime is different. Its task is to check, whether the buffer's known file modification time is still valid; it could have changed on disk due to external changes or so. That's why it cannot use the Tramp cache. Best regards, Michael. From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Feb 2022 02:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= , Michael Albinus Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org> Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.164593023218052 (code B ref 54025); Sun, 27 Feb 2022 02:51:01 +0000 Received: (at 54025) by debbugs.gnu.org; 27 Feb 2022 02:50:32 +0000 Received: from localhost ([127.0.0.1]:56624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9do-0004h6-DP for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:50:32 -0500 Received: from mail-wr1-f51.google.com ([209.85.221.51]:37454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9dk-0004gm-5X for 54025@debbugs.gnu.org; Sat, 26 Feb 2022 21:50:31 -0500 Received: by mail-wr1-f51.google.com with SMTP id d28so10162500wra.4 for <54025@debbugs.gnu.org>; Sat, 26 Feb 2022 18:50:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=zu8pw9mQv9Ngn4J5eWbmcd9d3MLYA0E/kHWnXpXIh+I=; b=LTDIUM4RNLNMnT8LBb6xJ3EDKtOZfl8WW2N9TdYMmdVakXkvEYhtGcNT/D6Hem0FSX WZmSqt04UAgGHbz2icMaN0yTCvqH9TzmLMaYvB8+SMNjQC5mZBszEy5AbP/PL67nix+1 TCDj5ysL5ESumbae3lR0NZiioLwTipWh0/qaKdXFsHxpENwFK7RpcK4Gle0XIDRQICkA nW72I8yX5OvWPZezN5ux+vFcAnfYKbG1W0dvIsy+nZB1yMH84V5+qxie62uasSsJPeeI hhPRGGlhj7zl3OF1R25ABL1BrJVU9ac2rzZJDfVeCkgcw0byjJkNPtuZFvggFoPtsCmX EObw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=zu8pw9mQv9Ngn4J5eWbmcd9d3MLYA0E/kHWnXpXIh+I=; b=vvIxBUk/t34ZOsJ3M9tcMrl02EGWKJcoDWYytm6scNuMUV/Cek4nq1JxYodkYluz9M Q1uLA9ThSwxqKzW1H3rVv09qh0ykU0CTQ/GRiCIr0hc2/udvWeuOQTbZWBmFYpC4xLiL d8El3Yu51BPKG5W8rXAe1Gz7aE/2xXCpKnR6+FaTjtUTZjF3XwdttRWTjbTqt3AU3+2M XSPhDtxmxgeUzlLz7AtDUKIQfI1ND/4b9LaruH75XgKWeFw8wNVrFUEgsq9/3qi+C2N7 a3/1P1A6GqweMbir0nfUK7GswjOoZzmn+y0d8wL2Hk8NUAibVZYJ1pdd0YvPmriB6MT4 Jhbg== X-Gm-Message-State: AOAM530Y1SU79GHOreCWgxjhQun6bFh1twtTrwiFJT7V0FT/x0/is6fL aa8nED/if53hpFe0eIGfwoE= X-Google-Smtp-Source: ABdhPJzKnCaqTXPeYmwm5CZ35wsB2iaZLEyKqaLK6YsugkTMJaF2uMyfUZekir0LukppqmaPpWrCTw== X-Received: by 2002:adf:8bd4:0:b0:1ed:c1f8:3473 with SMTP id w20-20020adf8bd4000000b001edc1f83473mr11823700wra.435.1645930222106; Sat, 26 Feb 2022 18:50:22 -0800 (PST) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id n4-20020a05600c4f8400b00380e45cd564sm7846077wmq.8.2022.02.26.18.50.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:50:21 -0800 (PST) Message-ID: <613c0bd5-5976-9958-9c0d-e2dba862ea26@yandex.ru> Date: Sun, 27 Feb 2022 04:50:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> <0239f68191344ab49b23ddc96c7bd6e9@pay-lab.ru> <8017fbd711264d36ba69b62c480a55c6@pay-lab.ru> <7f544a39-e32d-2d62-4db8-dc957d243aec@yandex.ru> <87fso7mkj0.fsf@gmx.de> <274c3d9c-205d-be47-1bc6-1aeeacd659e8@yandex.ru> <8735k7m1ez.fsf@gmx.de> <87pmn9lu2k.fsf@gmx.de> From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) 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. From unknown Sat Jun 21 03:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54025: 27.2; dired-do-find-regexp skips occurences Resent-From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Feb 2022 12:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov , Michael Albinus Cc: "54025@debbugs.gnu.org" <54025@debbugs.gnu.org> Received: via spool by 54025-submit@debbugs.gnu.org id=B54025.164596624227547 (code B ref 54025); Sun, 27 Feb 2022 12:51:01 +0000 Received: (at 54025) by debbugs.gnu.org; 27 Feb 2022 12:50:42 +0000 Received: from localhost ([127.0.0.1]:56978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOJ0b-0007AD-TA for submit@debbugs.gnu.org; Sun, 27 Feb 2022 07:50:42 -0500 Received: from mail1.itgrp.ru ([185.8.182.248]:56736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOJ0a-00079y-JT for 54025@debbugs.gnu.org; Sun, 27 Feb 2022 07:50:41 -0500 IronPort-SDR: Gd5yuA37eoJISfr5O0GlAUk0fy1h2VbbvF0LwTNN8pk6ca5aszUI0zVVidTQc6xqgsMcDlDsji UoMBEcUn+LAQ== X-IronPort-AV: E=Sophos;i="5.90,141,1643662800"; d="scan'208";a="159770739" From: =?UTF-8?Q?=D0=9F=D0=B5=D1=82=D1=80=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Thread-Topic: bug#54025: 27.2; dired-do-find-regexp skips occurences Thread-Index: AQHYIyjXtspqEmtb7Emo34ft0KOoIayc/TcAgABkI0mAADe4/YACqySAgAB1HP6AASCpgIAAfuOKgAD/QYCAAKCyrYAAKwkAgABIRLiAAGrrgIAA8rDegAAoEG6AAJ8eAIAA1ttR Date: Sun, 27 Feb 2022 12:50:32 +0000 Message-ID: <508563bed10b4d95b7b60655bb4f84a5@itgrp.ru> References: <611521ae-42d4-6584-915e-243060de536e@yandex.ru> <831qzwx5a6.fsf@gnu.org> <967624c188c942ff8ecbf23bd6be46d0@pay-lab.ru> <0239f68191344ab49b23ddc96c7bd6e9@pay-lab.ru> <8017fbd711264d36ba69b62c480a55c6@pay-lab.ru> <7f544a39-e32d-2d62-4db8-dc957d243aec@yandex.ru> <87fso7mkj0.fsf@gmx.de> <274c3d9c-205d-be47-1bc6-1aeeacd659e8@yandex.ru> <8735k7m1ez.fsf@gmx.de> <87pmn9lu2k.fsf@gmx.de> , <613c0bd5-5976-9958-9c0d-e2dba862ea26@yandex.ru> In-Reply-To: <613c0bd5-5976-9958-9c0d-e2dba862ea26@yandex.ru> Accept-Language: ru-RU, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.24.4.20] Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. ________________________________________ =EF=D4: DG =CF=D4 =C9=CD=C5=CE=C9 Dmitry Gutov =EF=D4=D0=D2=C1=D7=CC=C5=CE=CF: 27 =C6=C5=D7=D2=C1=CC=D1 2022 =C7. 7:50:20 =EB=CF=CD=D5: =F0=C5=D4=D2=CF=D7 =E1=CE=C4=D2=C5=CA; Michael Albinus =EB=CF=D0=C9=D1: 54025@debbugs.gnu.org =F4=C5=CD=C1: Re: bug#54025: 27.2; dired-do-find-regexp skips occurences Hi Andrey, On 26.02.2022 16:54, =F0=C5=D4=D2=CF=D7 =E1=CE=C4=D2=C5=CA 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.