Subject: Re: bug#19829: 25.0.50; query-replace in rectangle regions do not honor boundaries

From: Stefan Monnier <[email-masked]>
Date: Thu, 12 Feb 2015 09:33:29 -0500

> I wonder how do other commands that accept region-beginning/end
> process the rectangular region?

Well, there's the source code to help you find out, of course.
More seriously, the rectangle support (can be rect.el or cua-rect.el)
code sets up `region-extract-function' and commands that need to operate
on the region should then call `region-extract-function' instead of
relying on region-beginning/end.

Obviously, this infrastructure is not sufficient for query-replace, so
we'll need to add a `region-map-function` or something like that.

        Stefan

PS: when designing this interface I had in mind potential future
non-rectangular (and non-contiguous) regions, such as those that one can
define in some systems (e.g. file-managers) via "control-click".