From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73018: 31.0.50; wdired + replace-regexp only modifies the visible portion of the buffer Date: Wed, 04 Sep 2024 05:25:46 +0200 Message-ID: <87seug85hh.fsf@web.de> References: <20240904.080321.1100373523429404965.enometh@meer.net> Reply-To: Michael Heerdegen Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20759"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73018@debbugs.gnu.org, Juri Linkov To: Madhu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 04 05:26:24 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1slgf1-0005DV-9u for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Sep 2024 05:26:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slgeg-0001ko-QX; Tue, 03 Sep 2024 23:26:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slgee-0001jn-4B for bug-gnu-emacs@gnu.org; Tue, 03 Sep 2024 23:26:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1slged-0002R6-Rd for bug-gnu-emacs@gnu.org; Tue, 03 Sep 2024 23:25:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=mrXllLswA0r4MIyhy4ruGGkqmLKh/x5OINvOSqHqcps=; b=JE4Ong5pDH1HgukQvQ+BCGUxdtzQTnY5Co7gIfHleDM0IftjpOlLv6USEVb+PRm7bUlFdvpxHevih7MEQGXi8gbfXWJmwVEWFr/ycnwZyTqNwsxOic5LO7JtgPcAl31uVxfqETNhPPrLwJTb8GhXG+UZJGLGBKdUEnSfgzszqGY7DqnfdzeVPy1IcRGT6UV2eyFNJBy9FkmpAtikKMpLFtE/mJesHdPPIFL5LNh3Rjzh6Ke3vnlTI1XSLYkFiax5+g7lJ0lxGW4pSHng7Fqs9u22Wh38fCN1gIRfsxDDdBQt64wfmzYBRmBEV6GfG9ju/ZKw2bn0bAreiWYHCz/Qsg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1slgfd-0001H4-IO; Tue, 03 Sep 2024 23:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: juri@linkov.net, bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Sep 2024 03:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73018 X-GNU-PR-Package: emacs X-Debbugs-Original-Xcc: Juri Linkov Original-Received: via spool by 73018-submit@debbugs.gnu.org id=B73018.17254203754754 (code B ref 73018); Wed, 04 Sep 2024 03:27:01 +0000 Original-Received: (at 73018) by debbugs.gnu.org; 4 Sep 2024 03:26:15 +0000 Original-Received: from localhost ([127.0.0.1]:33067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slges-0001Ec-Ns for submit@debbugs.gnu.org; Tue, 03 Sep 2024 23:26:15 -0400 Original-Received: from mout.web.de ([212.227.17.11]:55483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slgep-0001EH-Gg for 73018@debbugs.gnu.org; Tue, 03 Sep 2024 23:26:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1725420297; x=1726025097; i=michael_heerdegen@web.de; bh=mrXllLswA0r4MIyhy4ruGGkqmLKh/x5OINvOSqHqcps=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=XrIxHzJqssjz+wJF/k8eEFIHG0O4/WzsxI1F0euv+qVYxwrHwX1r4KauiXIoFobn AVFT4k7L99T7TS+yOlQfhZ5flDDtJeirISgPHOwE00CODmG2M7MAStmoQpTbgDIgS kvH2536wUhd8aEazIxom0fUYJYD7VRZPcHYRMPldgOTd1qhRVZCBRr2QeD7MXEdBs JygQDDZ5W38uy+kKQpb7ebAny+AHoHnNpmjX1YqWQ5wVvUz1mEBtBSmV6W0KIMbSw AsUlCrTIx5mBCO+ULn07Z30+x5cxink536YNoYisBdaxYNRVHtUL66QPkEawaO5qT 33HxyUNGh9uETCOGtQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([84.59.210.176]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mm9Zi-1sLBaj2h04-00f3hR; Wed, 04 Sep 2024 05:24:57 +0200 In-Reply-To: <20240904.080321.1100373523429404965.enometh@meer.net> (Madhu's message of "Wed, 04 Sep 2024 08:03:21 +0530 (IST)") X-Provags-ID: V03:K1:WZuB9IpwJFMtWqBgvIuIfQEhiI2VVUPI7whRCPEDG0xdfd+FRJW Q1C5o8YVVAqRTU8TzRk5ttZdkKcpyMGUlcfDYSJblHQLROoqYeASndnAXTLyIkfzSFbG9oN cyjUuC0Q5twQH0ToekP9J2icu0YjtlArfm77pD54lDU7j36hnAcGaBShr09MMDHOy8RPBIA L4v8nBwOjziM2p29YFOWQ== UI-OutboundReport: notjunk:1;M01:P0:kRwIVnAPJKA=;ErzHYuISDYTfgkhIAPr4UD5Q68t 238iMwjpxm/oN8qiO2NQPajxp3JB/IMU0oU1UHrCxiv9GISgBKGkprBkZnXmDicREbKcjVQtp a3pqyEw9jVXge/7bLCPMefVmBxBKHKKjo+sHeMP7KMZE96JzdW9MiRUUw7Zo6gvFwXPJot38E XS+IQ/OeF4N2UemICwI1h7TEKjk0j5WC8ePiHmGaCkStsLOnuDabWEUzFE4wInZt62SlpV7yu oDSNuMMsCqVOJo5UlWZeAWdjEHosBE8mbHgOZiMjCrdIiXBqg2KgnvqXuf0heUu5yO7KNEWyw hlMU+C6bIJUUgeaTfeCoSzVQ6gLrteQJUJtabILrwjczcXA+jQ6EmPPbt8FpCkUeIFt12Dgvc lWYXFHY0a+CmhKIWqRhuiEUQeziAoVRaB50nwL2R8kFmdOclEi3VuG2aBeuz2pz/KECsuInhA f7eawGR04BcI+Twvs8DPNguvIPNWEBucCW+Au7WYqqvuZdsOF/ypRFNrRnSf6InS4Bb6d3xzI EJwuqpOt5CIPK28AmqBqw01NR4pHIlZGAH5mVTRsSLAVC62b0TpNFBiZH1jwlAuDtaWtjKUAy k2dyC3Q9mO8HU6E2rRHE5mgRXEHZpZiq42v4vtoM0ly7xTzMF72v6WeHHnIZ3gJ57GobWuwg7 c2YOxnlIFl9iLgrNRTLi6UDbWsNvSxQUJEVMGCKhLl54ea0R3nuEKhbEueK0IVvVPj1Jkkier x+cGNP/dzlkc0QWTnZxluu0KqmrQUeJ6QPko5vJX46yo0dvRPJEep2/+SiypseKuodc77aHE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291174 Archived-At: Madhu writes: > (dired "/dev/shm/test-foo") > (wdired-change-to-wdired-mode) > (replace-regexp "foo" "bar") > ``` > > It is seen that only the files in the visible portion of the buffer > are affeceted by the replace-regexp. The attached patch implements the > suggestion in > https://lists.gnu.org/archive/html/emacs-devel/2024-09/msg00079.html > and appears to fix the problem. Thanks for reporting this here. I CC Juri Linkov. > (However there still seems to be a boostrap related problem with > "Match data clobbered by buffer modification hooks" when wdired is > first loaded) Could you please post a recipe and a backtrace for this second problem? > --- > lisp/wdired.el | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lisp/wdired.el b/lisp/wdired.el > index 4b6a9c14b20..dd8b8640a89 100644 > --- a/lisp/wdired.el > +++ b/lisp/wdired.el > @@ -264,6 +264,7 @@ wdired-change-to-wdired-mode > ;; hidden partly, so we remove filename invisibility spec > ;; temporarily to ensure filenames are visible for editing. > (dired-filename-update-invisibility-spec) > + (font-lock-ensure) > (run-mode-hooks 'wdired-mode-hook) > (message "%s" (substitute-command-keys > "Press \\[wdired-finish-edit] when finished \ Yip. When we do this (guess we don't have a choice), my preferred solution would be to hook this into the corresponding isearch function. Because calling `font-lock-ensure' can be really slow in large dired buffers (several seconds). Or we manage to rewrite things so that the work is done on the fly in some way. Michael.