[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7522: 24.0.50; point after `clear-rectangle' and `string-rectangle'
From: |
Drew Adams |
Subject: |
bug#7522: 24.0.50; point after `clear-rectangle' and `string-rectangle' |
Date: |
Fri, 17 Dec 2010 07:07:27 -0800 |
> > I'm no expert on this. But what is the rationale for
> > leaving point at bol after such commands. Wouldn't it make
> > more sense to put point at the same corner of the replaced
> > rectangle as it was for the rectangle that was replaced?
>
> I can't reproduce this. After `C-x r t' or `C-x r c', point is at a
> corner of the replaced/cleared rectangle. Please provide an exact
> recipe.
Instead of "replaced rectangle" I should have said "replacing rectangle".
Select a rectangle, with point at the lower right corner and mark at the upper
left. Then C-x r t. Type `EEE' as the string to replace each row of the
rectangle.
The cursor is left at the beginning, not the end, of the `EEE' string on the
last row. IOW, a rectangle of E's replaces the selected rectangle, but point is
now at neither the upper left nor the lower right.
This can make a difference when combining such an action with other operations,
including other rectangle operations. You should be able to do `C-x C-x' to
select the E's rectangle. Instead, you get the region from the first E to the
first E in the last row, which corresponds to an empty rectangle (no width).