From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.help Subject: Re: Remap DEL and Shift-Up to kill to end of line Date: Tue, 29 Apr 2008 06:50:03 +0200 Organization: disorganized Message-ID: <87bq3tz2mc.fsf@localhorst.mine.nu> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1209444851 13910 80.91.229.12 (29 Apr 2008 04:54:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Apr 2008 04:54: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 Tue Apr 29 06:54:47 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JqhrX-0001li-0Z for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Apr 2008 06:54:43 +0200 Original-Received: from localhost ([127.0.0.1]:34322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jqhqq-0007cI-Dw for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Apr 2008 00:54:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JqhqK-0007bB-BL for help-gnu-emacs@gnu.org; Tue, 29 Apr 2008 00:53:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JqhqI-0007az-9H for help-gnu-emacs@gnu.org; Tue, 29 Apr 2008 00:53:27 -0400 Original-Received: from [199.232.76.173] (port=36535 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JqhqH-0007aw-Rb for help-gnu-emacs@gnu.org; Tue, 29 Apr 2008 00:53:25 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JqhqH-0007nC-VP for help-gnu-emacs@gnu.org; Tue, 29 Apr 2008 00:53:26 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JqhqA-0001B3-Bw for help-gnu-emacs@gnu.org; Tue, 29 Apr 2008 04:53:18 +0000 Original-Received: from e178000133.adsl.alicedsl.de ([85.178.0.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Apr 2008 04:53:18 +0000 Original-Received: from david.hansen by e178000133.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Apr 2008 04:53:18 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178000133.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:yCA/JMihiMpqMJSVv8gjo7zC7H8= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:53614 Archived-At: On Mon, 28 Apr 2008 18:02:26 -0700 (PDT) plus wrote: > On Apr 28, 8:21 pm, plus...@gmail.com wrote: >> I'm not sure how to remap keys, but I'd like to remap DEL (not >> backspace/delete) and Shift-Up to kill to end of line (in addition to >> C-k); I'd also like DEL-DEL and Shift-Up Shift-Up (DEL or Shift-Up >> typed twice without any other input) to kill to end of paragraph. Is >> this possible? > > I've tried adding to my .emacs file: > > (global-set-key (kbd "") 'kill-line) Works fine here, which emacs version do you use? Maybe some major-mode or minor-mode keymap is in the way (maybe worth a bug report, but I'm not sure what the policy about these useless keys is). > Also, I'd like Shift-Right to move 10 characters right and Shift-Left > to move 10 characters left. Thanks. (global-set-key (kbd "") #'(lambda () (interactive) (backward-char 10))) (global-set-key (kbd "") #'(lambda () (interactive) (forward-char 10))) Just use the output of C-h k as an argument to `kbd', works always. Do you know about universal argument? C-u C-f -> forward 4 chars C-u C-u C-f -> forward 4*4=16 chars M-1 M-0 C-f -> forward 10 chars C-4 C-2 C-f -> forward 42 chars David