unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Madhu <enometh@meer.net>
Cc: 73018@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
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	[thread overview]
Message-ID: <87seug85hh.fsf@web.de> (raw)
In-Reply-To: <20240904.080321.1100373523429404965.enometh@meer.net> (Madhu's message of "Wed, 04 Sep 2024 08:03:21 +0530 (IST)")

Madhu <enometh@meer.net> 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.





  reply	other threads:[~2024-09-04  3:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87seug85hh.fsf@web.de \
    --to=bug-gnu-emacs@gnu.org \
    --cc=73018@debbugs.gnu.org \
    --cc=enometh@meer.net \
    --cc=juri@linkov.net \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

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