From: Luc Teirlinck <teirllm@dms.auburn.edu>
Subject: kill-region
Date: Wed, 21 May 2003 09:47:42 -0500 (CDT) [thread overview]
Message-ID: <200305211447.h4LElgr08180@eel.dms.auburn.edu> (raw)
kill-region sets this-command to 'kill-region even if the last command
was not a kill command *and* kill-region did not make a new entry on
the kill-ring (which happens if kill-region is called on an empty
region).
This can lead to strange consequences. Start out with some non-empty
kill ring. Go to the end of some buffer containing at least two lines.
Do M-2 k. Nothing got killed, since we are at the end of the buffer.
Now do M--2 k. (What we probably wanted to do, we just forgot the
"-".) Now C-y. The last two lines of the buffer got prepended to the
previous kill ring entry. Does this make sense? We could have
avoided the mess by doing a C-g after the erroneous M-2 k, but it
still seems very counter-intuitive.
Might it be better for kill-region to either not set this-command to
'kill-region if the last command was not already a kill command and
kill-region did not make a new entry on the kill ring, or,
alternatively, make kill-region add an empty string to the end of the
kill ring in the described situation, to which subsequent kill
commands could append or prepend?
Sincerely,
Luc.
next reply other threads:[~2003-05-21 14:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-21 14:47 Luc Teirlinck [this message]
2003-05-22 14:58 ` kill-region Kai Großjohann
2003-05-23 12:03 ` kill-region Richard Stallman
2003-05-23 19:42 ` kill-region Kai Großjohann
-- strict thread matches above, loose matches on Subject: below --
2003-05-21 15:31 kill-region Luc Teirlinck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200305211447.h4LElgr08180@eel.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).