From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: Why does Emacs lack `backward-delete-word`? Date: Mon, 07 Mar 2016 03:21:33 +0000 Message-ID: <8760wzht1e.fsf@robertthorpeconsulting.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1457320931 25772 80.91.229.3 (7 Mar 2016 03:22:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Mar 2016 03:22:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 07 04:22:01 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aclk7-0001Rm-8E for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Mar 2016 04:21:59 +0100 Original-Received: from localhost ([::1]:53238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aclk6-0007mC-FW for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Mar 2016 22:21:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acljq-0007kE-Th for help-gnu-emacs@gnu.org; Sun, 06 Mar 2016 22:21:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acljl-0001BD-Tx for help-gnu-emacs@gnu.org; Sun, 06 Mar 2016 22:21:42 -0500 Original-Received: from outbound-smtp03.blacknight.com ([81.17.249.16]:58227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acljl-0001At-Nm for help-gnu-emacs@gnu.org; Sun, 06 Mar 2016 22:21:37 -0500 Original-Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp03.blacknight.com (Postfix) with ESMTPS id F39CF994C7 for ; Mon, 7 Mar 2016 03:21:35 +0000 (UTC) Original-Received: (qmail 9076 invoked from network); 7 Mar 2016 03:21:35 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.77.52.206]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 7 Mar 2016 03:21:35 -0000 In-Reply-To: (message from Stefan Monnier on Sun, 06 Mar 2016 10:44:07 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.16 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109488 Archived-At: Stefan Monnier writes: >> I should have been clearer, sorry. `backward-kill-word` kills. I wonder >> why there is no corresponding command to delete instead. > > Emacs's UI generally assumes that the difference between "delete" and > "kill" is sufficiently minor that the trouble of providing both versions > is higher than the gain. > > IOW, use M-y (or a prefix arg to C-y) to get to the kill you care about. As Stefan says, it's not usually necessary. M-y can skip past irrelevant kills. Also, if you know you're going to add something useless to the kill ring, then you can just use backspace. Getting rid of a word with backspace, in the few occasions when it's necessary, isn't that slow. But, in keyboard macros it can be troublesome. If M-y has to be used in a macro that generally spells trouble. Also, kills are slower than deletes. For those reasons I define delete-word in the obvious way, like kill-word but using delete-region instead of kill-region. I don't bind it to a key though, I just use M-x when I need it, which is only when using keyboard macros. BR, Robert Thorpe