GNU bug report logs - #7522
24.0.50; point after `clear-rectangle' and `string-rectangle'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Wed, 1 Dec 2010 03:53:02 UTC

Severity: minor

Tags: fixed

Found in version 24.0.50

Fixed in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7522 in the body.
You can then email your comments to 7522 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7522; Package emacs. (Wed, 01 Dec 2010 03:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 01 Dec 2010 03:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50; point after `clear-rectangle' and `string-rectangle'
Date: Tue, 30 Nov 2010 10:22:31 -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?  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'





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7522; Package emacs. (Fri, 17 Dec 2010 13:21:01 GMT) Full text and rfc822 format available.

Message #8 received at 7522 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 7522 <at> debbugs.gnu.org
Subject: Re: bug#7522: 24.0.50;
	point after `clear-rectangle' and `string-rectangle'
Date: Fri, 17 Dec 2010 21:26:27 +0800
"Drew Adams" <drew.adams <at> 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.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7522; Package emacs. (Fri, 17 Dec 2010 15:04:01 GMT) Full text and rfc822 format available.

Message #11 received at 7522 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Chong Yidong'" <cyd <at> stupidchicken.com>
Cc: 7522 <at> debbugs.gnu.org
Subject: RE: 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).





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7522; Package emacs. (Thu, 06 Jan 2011 12:47:02 GMT) Full text and rfc822 format available.

Message #14 received at 7522 <at> debbugs.gnu.org (full text, mbox):

From: Johan Bockgård <bojohan <at> gnu.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 'Chong Yidong' <cyd <at> stupidchicken.com>, 7522 <at> debbugs.gnu.org
Subject: Re: bug#7522: 24.0.50;
	point after `clear-rectangle' and `string-rectangle'
Date: Thu, 06 Jan 2011 13:54:07 +0100
"Drew Adams" <drew.adams <at> 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.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7522; Package emacs. (Thu, 14 Jul 2011 15:27:01 GMT) Full text and rfc822 format available.

Message #17 received at 7522 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 'Chong Yidong' <cyd <at> stupidchicken.com>, 7522 <at> debbugs.gnu.org
Subject: Re: bug#7522: 24.0.50;
	point after `clear-rectangle' and `string-rectangle'
Date: Thu, 14 Jul 2011 17:23:51 +0200
"Drew Adams" <drew.adams <at> 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/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7522; Package emacs. (Thu, 14 Jul 2011 15:27:02 GMT) Full text and rfc822 format available.

Message #20 received at 7522 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 7522 <at> debbugs.gnu.org, 'Chong Yidong' <cyd <at> stupidchicken.com>
Subject: Re: bug#7522: 24.0.50;
	point after `clear-rectangle' and `string-rectangle'
Date: Thu, 14 Jul 2011 17:24:29 +0200
Johan Bockgård <bojohan <at> 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/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7522; Package emacs. (Wed, 27 Apr 2016 23:16:02 GMT) Full text and rfc822 format available.

Message #23 received at 7522 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 7522 <at> debbugs.gnu.org, 'Chong Yidong' <cyd <at> stupidchicken.com>
Subject: Re: bug#7522: 24.0.50;
 point after `clear-rectangle' and `string-rectangle'
Date: Thu, 28 Apr 2016 01:15:26 +0200
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Johan Bockgård <bojohan <at> 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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 27 Apr 2016 23:16:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 25.2, send any further explanations to 7522 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 27 Apr 2016 23:16:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 26 May 2016 11:24:03 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:02 GMT) Full text and rfc822 format available.

bug Marked as fixed in versions 26.1. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:02 GMT) Full text and rfc822 format available.

bug No longer marked as fixed in versions 25.2. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 01 Jan 2017 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 129 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.