GNU bug report logs - #27614
26.0.50; kill-region deletes the rest of the document when there is no region selected

Previous Next

Package: emacs;

Reported by: Jeffrey Brown <jeffbrown.the <at> gmail.com>

Date: Sat, 8 Jul 2017 06:57:01 UTC

Severity: minor

Tags: notabug

Found in version 26.0.50

Done: npostavs <at> users.sourceforge.net

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 27614 in the body.
You can then email your comments to 27614 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 bug-gnu-emacs <at> gnu.org:
bug#27614; Package emacs. (Sat, 08 Jul 2017 06:57:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jeffrey Brown <jeffbrown.the <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 08 Jul 2017 06:57:02 GMT) Full text and rfc822 format available.

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

From: Jeffrey Brown <jeffbrown.the <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; kill-region deletes the rest of the document when there is
 no region selected
Date: Fri, 7 Jul 2017 23:54:45 -0700
[Message part 1 (text/plain, inline)]
If I highlight something and then run kill-region (C-w), it

gets killed. That's good.


But if I highlight nothing, and accidentally run kill-region, the

rest of the document starting at the cursor gets killed.


I know it sounds stupid, but more than once I have killed a lot of text

like that and not realized it until much later, thanks to Git.


Emacs is wonderful, thank you so much.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27614; Package emacs. (Sat, 08 Jul 2017 07:12:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jeffrey Brown <jeffbrown.the <at> gmail.com>
Cc: 27614 <at> debbugs.gnu.org
Subject: Re: bug#27614: 26.0.50;
 kill-region deletes the rest of the document when there is no region
 selected
Date: Sat, 08 Jul 2017 10:11:16 +0300
> From: Jeffrey Brown <jeffbrown.the <at> gmail.com>
> Date: Fri, 7 Jul 2017 23:54:45 -0700
> 
> If I highlight something and then run kill-region (C-w), it
> gets killed. That's good.
> But if I highlight nothing, and accidentally run kill-region, the
> rest of the document starting at the cursor gets killed.

When I try this without having any region, Emacs says

  The mark is not set now, so there is no region

and doesn't kill anything.

So I'm guessing that you do have a region in those cases, just not a
highlighted one.  You can make it highlighted by "C-x C-x" (twice, if
you want to return to the original location).  I suggest to grow a
habit of doing that before each C-w, because, really, Emacs does here
what you told it to do.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27614; Package emacs. (Sat, 08 Jul 2017 07:19:02 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Jeffrey Brown <jeffbrown.the <at> gmail.com>
Cc: 27614 <at> debbugs.gnu.org
Subject: Re: bug#27614: 26.0.50;
 kill-region deletes the rest of the document when there is no region
 selected
Date: Sat, 08 Jul 2017 09:18:49 +0200
On Jul 07 2017, Jeffrey Brown <jeffbrown.the <at> gmail.com> wrote:

> But if I highlight nothing, and accidentally run kill-region, the
>
> rest of the document starting at the cursor gets killed.

That means there is a mark at the end of the buffer.  Set
mark-even-if-inactive to nil, and kill-region will complain instead.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




bug closed, send any further explanations to 27614 <at> debbugs.gnu.org and Jeffrey Brown <jeffbrown.the <at> gmail.com> Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 05 Aug 2017 01:28: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. (Sat, 02 Sep 2017 11:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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