From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Enhance word-based commands? Date: Wed, 15 Jan 2003 20:16:03 +0100 Organization: University of Duisburg, Germany Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <84el7edy18.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042661791 13254 80.91.224.249 (15 Jan 2003 20:16:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2003 20:16:31 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18Ytxe-0003Re-00 for ; Wed, 15 Jan 2003 21:16:30 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18Yu6F-0006ys-00 for ; Wed, 15 Jan 2003 21:25:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Yty5-0003xD-04 for emacs-devel@quimby.gnus.org; Wed, 15 Jan 2003 15:16:57 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18Ytwp-0002r3-00 for emacs-devel@gnu.org; Wed, 15 Jan 2003 15:15:39 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18Ytw7-0002X2-00 for emacs-devel@gnu.org; Wed, 15 Jan 2003 15:14:56 -0500 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Ytw7-0002WY-00 for emacs-devel@gnu.org; Wed, 15 Jan 2003 15:14:55 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18Ytuo-0003Cz-00 for ; Wed, 15 Jan 2003 21:13:34 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18Ytul-0003Ca-00 for ; Wed, 15 Jan 2003 21:13:31 +0100 Original-Path: not-for-mail Original-Lines: 39 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.090013 (Oort Gnus v0.13) Emacs/21.3.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:JH9/3r6TMXL1122rgm8yX+i0ME4= 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:10759 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10759 I find that I like to use word-based commands to move words around in the buffer. So when faced with the task of moving some words from one place to another, I'll intuitively try to use word-based motion to position point (to spot A, say), then use word-based killing to delete (well, kill) the phrase, then use word-based motion again to reach the target spot (B, say), then use C-y to yank. It turns out that this only works with some restrictions: If you have reached spot A with M-f, then you must use M-d to kill and again use M-f to reach spot B. OTOH, if you have reached spot A with M-b, then you must use M-DEL to kill and again use M-b to reach the target spot. Does this make sense? The kill is wont to contain whitespace at one end, which causes the problems. I think it might help to change the behavior of the word-based commands, as follows: Right now, M-f positions point after the end of the next word. If there are non-word characters at point, those are skipped first. I think it might help to change M-f as follows: if there are non-word characters at point, skip past them but no further. The behavior of M-b would be the same: if at a non-word character, skip past the chunk of non-word characters but no further. With this change, it would be easy for me to get a kill which has whitespace on neither end, thus leading to more predictable behavior. (The superfluous whitespace at the source location could be fixed up with M-SPC or M-\, and missing whitespace could be added to the target location in a similar way.) What do people think? It goes without saying that I'm not suggesting to change the default behavior of Emacs, just to add a new behavior at user option. -- Ambibibentists unite!