From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: kill-region Date: Wed, 21 May 2003 09:47:42 -0500 (CDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200305211447.h4LElgr08180@eel.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1053528576 18885 80.91.224.249 (21 May 2003 14:49:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 21 May 2003 14:49:36 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed May 21 16:49:33 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19IUsZ-0004j5-00 for ; Wed, 21 May 2003 16:47:43 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19IV3O-0008PZ-00 for ; Wed, 21 May 2003 16:58:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19IUtv-0002LN-VD for emacs-devel@quimby.gnus.org; Wed, 21 May 2003 10:49:07 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19IUt5-0001kU-6K for emacs-devel@gnu.org; Wed, 21 May 2003 10:48:15 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19IUsX-0001E1-3v for emacs-devel@gnu.org; Wed, 21 May 2003 10:48:13 -0400 Original-Received: from manatee.dms.auburn.edu ([131.204.53.104]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19IUsW-0001Dx-Rt for emacs-devel@gnu.org; Wed, 21 May 2003 10:47:40 -0400 Original-Received: from eel.dms.auburn.edu (eel.dms.auburn.edu [131.204.53.108]) by manatee.dms.auburn.edu (8.12.9/8.12.9) with ESMTP id h4LEldoc004608 for ; Wed, 21 May 2003 09:47:40 -0500 (CDT) Original-Received: (from teirllm@localhost) by eel.dms.auburn.edu (8.11.6+Sun/8.11.6) id h4LElgr08180; Wed, 21 May 2003 09:47:42 -0500 (CDT) X-Authentication-Warning: eel.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:14041 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:14041 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.