Madhu <enom...@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.



  • bug#73018:... Madhu
    • bug#7... Bug reports for GNU Emacs, the Swiss army knife of text editors
      • b... Madhu
      • b... Juri Linkov
        • ... Bug reports for GNU Emacs, the Swiss army knife of text editors
          • ... Madhu
          • ... Juri Linkov
            • ... Bug reports for GNU Emacs, the Swiss army knife of text editors
              • ... Bug reports for GNU Emacs, the Swiss army knife of text editors
                • ... Juri Linkov
                • ... Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply via email to