GNU bug report logs - #9666
24.0.50; C-d has unexpected behaviour in CUA rectangle mode

Previous Next

Package: emacs;

Reported by: Stefan Reichör <stefan <at> xsteve.at>

Date: Tue, 4 Oct 2011 06:33:02 UTC

Severity: normal

Found in version 24.0.50

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Stefan Reichör <stefan <at> xsteve.at>
Cc: 9666 <at> debbugs.gnu.org
Subject: Re: bug#9666: 24.0.50;
	C-d has unexpected behaviour in CUA rectangle mode
Date: Tue, 04 Oct 2011 14:56:05 +0200
On Tue, 04 Oct 2011 09:55:00 +0200 Stefan Reichör <stefan <at> xsteve.at> wrote:

> Stephen Berman <stephen.berman <at> gmx.net> writes:
>
>> On Tue, 04 Oct 2011 08:30:29 +0200 Stefan Reichör <stefan <at> xsteve.at> wrote:
>>
>>> Just activate cua mode, select an rectangle and hit DEL or C-d:
>>> M-x cua-mode
>>> C-RET
>>> select rectangle
>>> DEL
>>>
>>> I expect this command to delete the whole rectangle
>>>
>>> But it deletes only one character and deactivates the marked
>>> rectangle
>> [...]
>>> In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
>>>  of 2011-09-12 on 3249CTO
>>> Windowing system distributor `Microsoft Corp.', version 5.1.2600
>>> configured using `configure --with-gcc (4.5) --no-opt'
>>
>> I see somewhat different behavior with the above recipe: DEL (backspace
>> key), deletes the one-column rectangle immediately following the
>> selected rectangle, and does not deactivate (unhighlight) the latter;
>> C-d, on the other hand, does delete the selected rectangle.  This is on
>> GNU Emacs 24.0.90.3 (i686-suse-linux-gnu, GTK+ Version 2.22.1) of
>> 2011-10-04 on escher.
>
> Digging further into this problem.
> There are some modes that bind delete (not BS) to delete-forward-char (e.g. the
> *scratch* buffer).

Ah, I guess you also meant <delete> above, not DEL.  With <delete> I
also see what you reported.  This is indeed different from the behavior
of <delete> with an active (highlighted) region.

> When this is the case the rectangle is not deleted.

> When delete is bound to delete-char then the rectangle is deleted as expected.

But the standard binding of delete-char is C-d, which you (meant to)
report above behaves like <delete> (assuming you meant that key instead
of DEL); see also your Subject header.  Whereas, as I said, I do get
deletion with C-d.  So the unexpected behavior in cua-mode is (just) with
<delete> (bound to delete-forward-char), is that what you're saying?  If
so, I agree (assuming, that is, that <delete> should behave the same
with rectangles in cua-mode and with active regions outside of cua-mode;
I don't know, since I haven't made much use of cua-mode).

Steve Berman




This bug report was last modified 13 years and 133 days ago.

Previous Next


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