From: Juri Linkov <juri@jurta.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 54733@debbugs.gnu.org
Subject: bug#54733: Match again in perform-replace
Date: Fri, 24 Jun 2022 20:25:05 +0300 [thread overview]
Message-ID: <86bkuiotxq.fsf@mail.linkov.net> (raw)
In-Reply-To: <86r13h6syo.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 22 Jun 2022 10:36:39 +0300")
>>>> + (replace-search search-string limit
>>>> + regexp-flag delimited-flag
>>>> + case-fold-search backward))
>>>
>>> I don't know this code too well, but perhaps SEARCH_STRING here should be
>>> anchored with something like "\\=" at the beginning?
>>>
>>> Otherwise the search can succeed here even if the next match is not
>>> here. Not sure how important that is, though.
>>
>> I'm afraid that prepending "\\=" might break a complex regexp somehow.
>
> Another variant without modifying the original regexp is still to call
> replace-search, but afterwards check if it stayed at the old position
A third variant is to add a new variable `looking-at-function'
that is like `isearch-search-fun-function', so everyone who needs
to redefine the search function, will also need to redefine
the looking-at function.
next prev parent reply other threads:[~2022-06-24 17:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 17:16 bug#54733: Match again in perform-replace Juri Linkov
2022-04-05 17:53 ` Juri Linkov
2022-04-29 17:41 ` Juri Linkov
2022-05-03 7:10 ` Juri Linkov
2022-06-20 23:59 ` Dmitry Gutov
2022-06-21 17:55 ` Juri Linkov
2022-06-22 7:36 ` Juri Linkov
2022-06-24 17:25 ` Juri Linkov [this message]
2022-06-30 17:52 ` Juri Linkov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86bkuiotxq.fsf@mail.linkov.net \
--to=juri@jurta.org \
--cc=54733@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.