unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#73018: 31.0.50; wdired + replace-regexp only modifies the visible portion of the buffer
@ 2024-09-04  2:33 Madhu
  2024-09-04  3:25 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 28+ messages in thread
From: Madhu @ 2024-09-04  2:33 UTC (permalink / raw)
  To: 73018

[-- Attachment #1: Type: Text/Plain, Size: 871 bytes --]

In GNU Emacs 31.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.18.0, Xaw3d scroll bars)
Repository revision: f1e29506822739208e5706b733cfd713c5f37cfd

Ref: https://lists.gnu.org/archive/html/emacs-devel/2024-09/msg00071.html

On carrying out the following steps

```
mkdir /dev/shm/test-foo -pv
for i in $(seq 1 40); do ln -sv /foo/$i /dev/shm/test-foo; done

(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.

(However there still seems to be a boostrap related problem with
"Match data clobbered by buffer modification hooks" when wdired is
first loaded)

[-- Attachment #2: 0001-lisp-wdired.el-wdired-change-to-wdired-mode-call-fon.patch --]
[-- Type: Text/X-Patch, Size: 897 bytes --]

From 05c8405a30a36098c55e4f31a1ec339719ccbcb3 Mon Sep 17 00:00:00 2001
From: Madhu <enometh@net.meer>
Date: Wed, 4 Sep 2024 06:55:44 +0530
Subject: [PATCH] * lisp/wdired.el: (wdired-change-to-wdired-mode): call
 font-lock-ensure  so replace-regexp with wdired-search-replace-filenames t
 works on the whole buffer.

---
 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 \
-- 
2.46.0.27.gfa3b914457


^ permalink raw reply related	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2024-09-23 11:51 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-04  2:33 bug#73018: 31.0.50; wdired + replace-regexp only modifies the visible portion of the buffer Madhu
2024-09-04  3:25 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-04  8:58   ` Madhu
2024-09-04  9:08     ` Madhu
2024-09-04 16:13   ` Juri Linkov
2024-09-05 12:12     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-05 16:51       ` Madhu
2024-09-05 16:51       ` Juri Linkov
2024-09-06 12:04         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-06 16:08           ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-08 16:28             ` Juri Linkov
2024-09-09 14:55               ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-09 17:13                 ` Juri Linkov
2024-09-09 17:55                   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-09 17:14                 ` Juri Linkov
2024-09-10  6:28                   ` Juri Linkov
2024-09-10 13:21                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-10 13:27                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-14  9:47                         ` Eli Zaretskii
2024-09-15 13:04                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-15 15:02                             ` Eli Zaretskii
2024-09-16  2:06                               ` Madhu
2024-09-16 14:24                                 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-17 18:57                                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-17 18:52                               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-21  9:34                                 ` Eli Zaretskii
2024-09-23  3:43                                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-23 11:51                                     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).