[Top][All Lists]

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

Re: Highlighting rectangles?

From: Stefan Monnier
Subject: Re: Highlighting rectangles?
Date: Sat, 03 Nov 2001 17:36:00 -0500

>     In cua-mode, what happens is that you don't have C-x r d at all.
>     You use C-w for both cases (i.e. the behavior depends on whether
>     you marked a rectangle or a linear region of text).
> I see, they have gone all the way to a different design of the
> command architecture.  Well, the result could be clean.
> What does it do if you invoke some of the dozens of obscure Emacs
> commands that operate on the region, such as append-to-file?
> Surely this package cannot replace *all* of them.

Indeed.  For commands that haven't been adapted, they see the region
as a linear piece of text whether or not the user intended it to be
a rectangle.

We could conceivably do something else:
I remember a discussion where someone asked if Emacs could handle
a non-contiguous region, so you could highlight several pieces of text
and then kill them with C-w.  Of course, Emacs' region can't do that
right now and the function that use the region wouldn't know
how to deal with it, but one way we could do it (I thought at the time)
is that when we have such a non-contiguous region applied to a function
whose interactive spec says `r' is to call the function repeatedly
on the various contiguous subparts of the region.
We could do the same with a rectangular region applied to a function
that doesn't know about rectangles: loop over all the lines in the
rectangle and apply the function once per line.


reply via email to

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