* Wdired doesn't like re-search-forward
@ 2021-06-19 13:47 Eduardo Ochs
2021-06-19 17:41 ` arthur miller
2021-06-19 22:43 ` Michael Heerdegen
0 siblings, 2 replies; 4+ messages in thread
From: Eduardo Ochs @ 2021-06-19 13:47 UTC (permalink / raw)
To: help-gnu-emacs
Hello list,
I have a function called `bsl' that converts some backslash sequences
in the region to their corresponding characters, and also converts
character sequences like "#U00e3" to the character "\xe3" - an "a"
with a tilde - to deal with a quirk in unzip, that sometimes creates
files with these "#Uhhhh"s in their names. This `bsl' is implemented
with a `(while (re-search-forward ...) replace-match ...)'.
In Emacs 27 I can use `M-x bsl' to modify filenames in wdired, and
everything works. In Emacs 28 if I modify filenames with `M-x bsl' and
then exit wdired my changes are discarded, and I get this message:
(No changes to be performed)
Is this related to the recent (?) changes in wdired? I noticed that
now letters are bound to `wdired--self-insert' instead of
`self-insert-command' in wdired mode... is there something that I need
to do to make wdired recognize changes that were not done by
`wdired--self-insert'?
And, more important of all: should I prepare a minimal way to
reproduce the problem and submit a proper bug report?
Thanks!
Eduardo Ochs
http://angg.twu.net/#eev
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Wdired doesn't like re-search-forward
2021-06-19 13:47 Wdired doesn't like re-search-forward Eduardo Ochs
@ 2021-06-19 17:41 ` arthur miller
2021-06-19 22:43 ` Michael Heerdegen
1 sibling, 0 replies; 4+ messages in thread
From: arthur miller @ 2021-06-19 17:41 UTC (permalink / raw)
To: Eduardo Ochs, help-gnu-emacs
I am not sure, but when you use re-search-forward, be sure that you are not matchning some of non-writable text in dired, so you don't get error when you try to replace read-only text.
Even in wdired mode, certain parts of text remain read-only.
Don't know if that is the case, but something to be aware of.
-------- Originalmeddelande --------
Från: Eduardo Ochs <eduardoochs@gmail.com>
Datum: 2021-06-19 15:48 (GMT+01:00)
Till: help-gnu-emacs <help-gnu-emacs@gnu.org>
Ämne: Wdired doesn't like re-search-forward
Hello list,
I have a function called `bsl' that converts some backslash sequences
in the region to their corresponding characters, and also converts
character sequences like "#U00e3" to the character "\xe3" - an "a"
with a tilde - to deal with a quirk in unzip, that sometimes creates
files with these "#Uhhhh"s in their names. This `bsl' is implemented
with a `(while (re-search-forward ...) replace-match ...)'.
In Emacs 27 I can use `M-x bsl' to modify filenames in wdired, and
everything works. In Emacs 28 if I modify filenames with `M-x bsl' and
then exit wdired my changes are discarded, and I get this message:
(No changes to be performed)
Is this related to the recent (?) changes in wdired? I noticed that
now letters are bound to `wdired--self-insert' instead of
`self-insert-command' in wdired mode... is there something that I need
to do to make wdired recognize changes that were not done by
`wdired--self-insert'?
And, more important of all: should I prepare a minimal way to
reproduce the problem and submit a proper bug report?
Thanks!
Eduardo Ochs
http://angg.twu.net/#eev
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Wdired doesn't like re-search-forward
2021-06-19 13:47 Wdired doesn't like re-search-forward Eduardo Ochs
2021-06-19 17:41 ` arthur miller
@ 2021-06-19 22:43 ` Michael Heerdegen
2021-06-20 0:50 ` Eduardo Ochs
1 sibling, 1 reply; 4+ messages in thread
From: Michael Heerdegen @ 2021-06-19 22:43 UTC (permalink / raw)
To: help-gnu-emacs
Eduardo Ochs <eduardoochs@gmail.com> writes:
> (No changes to be performed)
>
> Is this related to the recent (?) changes in wdired?
Could be.
> I noticed that now letters are bound to `wdired--self-insert' instead
> of `self-insert-command' in wdired mode... is there something that I
> need to do to make wdired recognize changes that were not done by
> `wdired--self-insert'?
No (this is implemented using `before-change-functions' and
`after-change-functions' and should automatically recognize any kind of
modifications).
But here a quick test using a
(while (re-search-forward ...) replace-match ...)
loop didn't reveal the problem for me.
> And, more important of all: should I prepare a minimal way to
> reproduce the problem and submit a proper bug report?
If the problem is not caused by your setup (can you reproduce the
problem in emacs -Q; do you use a recent build?) -- yes of course,
please do that.
Regards,
Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Wdired doesn't like re-search-forward
2021-06-19 22:43 ` Michael Heerdegen
@ 2021-06-20 0:50 ` Eduardo Ochs
0 siblings, 0 replies; 4+ messages in thread
From: Eduardo Ochs @ 2021-06-20 0:50 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs
On Sat, 19 Jun 2021 at 19:43, Michael Heerdegen
<michael_heerdegen@web.de> wrote:
>
> Eduardo Ochs <eduardoochs@gmail.com> writes:
>
> > (No changes to be performed)
> >
> > Is this related to the recent (?) changes in wdired?
>
> Could be.
>
> > I noticed that now letters are bound to `wdired--self-insert' instead
> > of `self-insert-command' in wdired mode... is there something that I
> > need to do to make wdired recognize changes that were not done by
> > `wdired--self-insert'?
>
> No (this is implemented using `before-change-functions' and
> `after-change-functions' and should automatically recognize any kind of
> modifications).
>
> But here a quick test using a
>
> (while (re-search-forward ...) replace-match ...)
>
> loop didn't reveal the problem for me.
>
> > And, more important of all: should I prepare a minimal way to
> > reproduce the problem and submit a proper bug report?
>
> If the problem is not caused by your setup (can you reproduce the
> problem in emacs -Q; do you use a recent build?) -- yes of course,
> please do that.
>
>
> Regards,
>
> Michael.
Hi Michael!
Done:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-06/msg01037.html
Cheers, E. =)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-20 0:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-19 13:47 Wdired doesn't like re-search-forward Eduardo Ochs
2021-06-19 17:41 ` arthur miller
2021-06-19 22:43 ` Michael Heerdegen
2021-06-20 0:50 ` Eduardo Ochs
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).