unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* kill-region
@ 2003-05-21 14:47 Luc Teirlinck
  2003-05-22 14:58 ` kill-region Kai Großjohann
  2003-05-23 12:03 ` kill-region Richard Stallman
  0 siblings, 2 replies; 5+ messages in thread
From: Luc Teirlinck @ 2003-05-21 14:47 UTC (permalink / 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread
* kill-region
@ 2003-05-21 15:31 Luc Teirlinck
  0 siblings, 0 replies; 5+ messages in thread
From: Luc Teirlinck @ 2003-05-21 15:31 UTC (permalink / raw)


Fom my previous message on the topic:

   Do M-2 k.  Nothing got killed, since we are at the end of the buffer.
   Now do M--2 k.

Meant was M-2 C-k and M--2 C-k.

   We could have avoided the mess by doing a C-g after the erroneous
   M-2 k,

M-2 C-k again.

   or, alternatively, make kill-region add an empty string to the end
   of the kill ring

Meant was, of course, the beginning of the kill ring.

Sorry for all these typos.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-05-23 19:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-21 14:47 kill-region Luc Teirlinck
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

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).