* bug#27614: 26.0.50; kill-region deletes the rest of the document when there is no region selected
@ 2017-07-08 6:54 Jeffrey Brown
2017-07-08 7:11 ` Eli Zaretskii
2017-07-08 7:18 ` Andreas Schwab
0 siblings, 2 replies; 3+ messages in thread
From: Jeffrey Brown @ 2017-07-08 6:54 UTC (permalink / raw)
To: 27614
[-- Attachment #1: Type: text/plain, Size: 392 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 679 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#27614: 26.0.50; kill-region deletes the rest of the document when there is no region selected
2017-07-08 6:54 bug#27614: 26.0.50; kill-region deletes the rest of the document when there is no region selected Jeffrey Brown
@ 2017-07-08 7:11 ` Eli Zaretskii
2017-07-08 7:18 ` Andreas Schwab
1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2017-07-08 7:11 UTC (permalink / raw)
To: Jeffrey Brown; +Cc: 27614
> From: Jeffrey Brown <jeffbrown.the@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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#27614: 26.0.50; kill-region deletes the rest of the document when there is no region selected
2017-07-08 6:54 bug#27614: 26.0.50; kill-region deletes the rest of the document when there is no region selected Jeffrey Brown
2017-07-08 7:11 ` Eli Zaretskii
@ 2017-07-08 7:18 ` Andreas Schwab
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2017-07-08 7:18 UTC (permalink / raw)
To: Jeffrey Brown; +Cc: 27614
On Jul 07 2017, Jeffrey Brown <jeffbrown.the@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@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-08 7:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-08 6:54 bug#27614: 26.0.50; kill-region deletes the rest of the document when there is no region selected Jeffrey Brown
2017-07-08 7:11 ` Eli Zaretskii
2017-07-08 7:18 ` Andreas Schwab
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).