From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Problem binding to a key Date: Sat, 21 Apr 2007 14:04:52 +1000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87ejmexti3.fsf@lion.rapttech.com.au> References: <4628d418$0$325$e4fe514c@news.xs4all.nl> <1177084488.965651.231230@n59g2000hsh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1177130248 7448 80.91.229.12 (21 Apr 2007 04:37:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 21 Apr 2007 04:37:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 21 06:37:21 2007 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 1Hf7Lb-0004B1-Oz for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Apr 2007 06:37:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hf7Qj-0002la-Sl for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Apr 2007 00:42:37 -0400 Original-Path: shelby.stanford.edu!newshub.stanford.edu!newsfeed.berkeley.edu!ucberkeley!sn-xt-sjc-03!sn-xt-sjc-09!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) Cancel-Lock: sha1:lDimdzM+0Zshv7lZ7QnApSg7T2I= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 28 Original-Xref: shelby.stanford.edu gnu.emacs.help:147343 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:42947 Archived-At: weber writes: > On 20 abr, 11:54, Cecil Westerhof wrote: >> I have the following two lines in my .emacs: >> (define-key global-map "\C-cw" 'clipboard-kill-ring-save) >> (define-key global-map "\C-x\C-kw" 'clipboard-kill-ring-save) >> >> The first line is no problem, the second gives: >> error: "Key sequence C-x C-k w uses invalid prefix characters" >> >> What I understood from 'Learning GNU Emacs' is the second way, the way you >> should bind your own definitions. Why does it not work? > > Because C-k already has another definition (killing text) > You have to "undefine" C-k with something like this: > (global-set-key "\C-k" nil) > Hope it helps, > weber > > Correct diagnosis, wrong solution I think. The problem is that part of the key definition is already used C-xC-k is already bound to a command. Note that its not C-k as this is a different binding to C-xC-k. tim -- tcross (at) rapttech dot com dot au