bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27896: [External] : Re: bug#27896: 25.2; `C-M-%' with `rectangle-mar


From: Lars Ingebrigtsen
Subject: bug#27896: [External] : Re: bug#27896: 25.2; `C-M-%' with `rectangle-mark-mode'
Date: Tue, 09 Feb 2021 09:09:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Juri Linkov <juri@linkov.net> writes:

>> But we could somewhat easily change `C-M-%' to be slightly less
>> surprising, and document its limitations.  That is, we say that no
>> multi-line matches are impossible in rectangle mode, and we implement it
>
> The current limitation is inability to use some greedy
> regexps in rectangle mode.  This is not much worse than
> limiting query-replace to non-multi-line matches only.

Aren't multi-line replacements already disallowed in rectangle mode by
the filtering function?

>> by just narrowing to each successive line part, and executing the
>> query-replace-regexp once per line.  (With some magic to handle `!' etc,
>> I guess.)
>
> Actually not narrowing in the sense of narrow-to-region,
> but temporarily setting the LIMIT arg of 'replace-search'
> to the end of the region of the current line.

Yup.

But I guess it's not that easy to get this to work sensibly -- it'd only
highlight matches in one line at a time, which would be odd.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]