unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7522: 24.0.50; point after `clear-rectangle' and `string-rectangle'
@ 2010-11-30 18:22 Drew Adams
  2010-12-17 13:26 ` Chong Yidong
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2010-11-30 18:22 UTC (permalink / raw)
  To: 7522

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?  IOW, if point was at the lower right corner of the
rectangle to be replaced, shouldn't point be left at the lower right
corner of the new (replacement) rectangle after replacement?

What use case(s) does the current design fit?  I would expect that `C-x
C-x' would select the rectangle that I just used as a replacement.
Instead, it selects a zero-width rectangle from the top to one line
below the bottom of the replacement rectangle.

There might be some other rectangle commands that also have this problem (what I
see so far as a problem, that is).

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-11-22 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#7522: 24.0.50; point after `clear-rectangle' and `string-rectangle'
  2010-11-30 18:22 bug#7522: 24.0.50; point after `clear-rectangle' and `string-rectangle' Drew Adams
@ 2010-12-17 13:26 ` Chong Yidong
  2010-12-17 15:07   ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2010-12-17 13:26 UTC (permalink / raw)
  To: Drew Adams; +Cc: 7522

"Drew Adams" <drew.adams@oracle.com> writes:

> 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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#7522: 24.0.50; point after `clear-rectangle' and `string-rectangle'
  2010-12-17 13:26 ` Chong Yidong
@ 2010-12-17 15:07   ` Drew Adams
  2011-01-06 12:54     ` Johan Bockgård
  2011-07-14 15:23     ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 7+ messages in thread
From: Drew Adams @ 2010-12-17 15:07 UTC (permalink / raw)
  To: 'Chong Yidong'; +Cc: 7522

> > 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).






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#7522: 24.0.50; point after `clear-rectangle' and `string-rectangle'
  2010-12-17 15:07   ` Drew Adams
@ 2011-01-06 12:54     ` Johan Bockgård
  2011-07-14 15:24       ` Lars Magne Ingebrigtsen
  2011-07-14 15:23     ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 7+ messages in thread
From: Johan Bockgård @ 2011-01-06 12:54 UTC (permalink / raw)
  To: Drew Adams; +Cc: 'Chong Yidong', 7522

"Drew Adams" <drew.adams@oracle.com> writes:

> 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.

I agree that this is annoying.

Also, undoing the replacement doesn't move point back to where it was
before.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#7522: 24.0.50; point after `clear-rectangle' and `string-rectangle'
  2010-12-17 15:07   ` Drew Adams
  2011-01-06 12:54     ` Johan Bockgård
@ 2011-07-14 15:23     ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-14 15:23 UTC (permalink / raw)
  To: Drew Adams; +Cc: 'Chong Yidong', 7522

"Drew Adams" <drew.adams@oracle.com> writes:

> 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.

I've now fixed this in Emacs 24.

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#7522: 24.0.50; point after `clear-rectangle' and `string-rectangle'
  2011-01-06 12:54     ` Johan Bockgård
@ 2011-07-14 15:24       ` Lars Magne Ingebrigtsen
  2016-04-27 23:15         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-14 15:24 UTC (permalink / raw)
  To: Drew Adams; +Cc: 7522, 'Chong Yidong'

Johan Bockgård <bojohan@gnu.org> writes:

> Also, undoing the replacement doesn't move point back to where it was
> before.

Yes, and that's really annoying.  Does anybody know how to fix that,
though?

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#7522: 24.0.50; point after `clear-rectangle' and `string-rectangle'
  2011-07-14 15:24       ` Lars Magne Ingebrigtsen
@ 2016-04-27 23:15         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-27 23:15 UTC (permalink / raw)
  To: Drew Adams; +Cc: 7522, 'Chong Yidong'

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Johan Bockgård <bojohan@gnu.org> writes:
>
>> Also, undoing the replacement doesn't move point back to where it was
>> before.
>
> Yes, and that's really annoying.  Does anybody know how to fix that,
> though?

Fixed now.

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-04-27 23:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-30 18:22 bug#7522: 24.0.50; point after `clear-rectangle' and `string-rectangle' Drew Adams
2010-12-17 13:26 ` Chong Yidong
2010-12-17 15:07   ` Drew Adams
2011-01-06 12:54     ` Johan Bockgård
2011-07-14 15:24       ` Lars Magne Ingebrigtsen
2016-04-27 23:15         ` Lars Ingebrigtsen
2011-07-14 15:23     ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).