From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Cecil Westerhof Newsgroups: gmane.emacs.help Subject: Re: Problem binding to a key Date: Fri, 20 Apr 2007 23:14:50 +0200 Message-ID: <46292d4c$0$338$e4fe514c@news.xs4all.nl> 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 Content-Transfer-Encoding: 7Bit X-Trace: sea.gmane.org 1177104930 14849 80.91.229.12 (20 Apr 2007 21:35:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Apr 2007 21:35:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 20 23:35:24 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 1Hf0l9-0005OK-Qd for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Apr 2007 23:35:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hf0qF-0004Hk-TL for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Apr 2007 17:40:31 -0400 Original-Path: shelby.stanford.edu!newshub.stanford.edu!syros.belnet.be!news.belnet.be!transit.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: KNode/0.8.0 Original-Lines: 34 Original-NNTP-Posting-Host: 213.84.157.201 Original-X-Trace: 1177103692 news.xs4all.nl 338 [::ffff:213.84.157.201]:15661 Original-X-Complaints-To: abuse@xs4all.nl Original-Xref: shelby.stanford.edu gnu.emacs.help:147320 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:42924 Archived-At: Rjjd wrote: > weber wrote: >> 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 > > But doesn't Cecil need to unbind \C-x\C-k, and not merely \C-k? > C-x C-k runs the command edit-kbd-macro. I got what I tried to do out of 'Learning GNU Emacs', pages 160 and 161. But it does not work. For example for the keybinding they give: C-x C-k b But then I get: Key sequence b is not a keyboard macro That is a big oops for O'Reilly. I tried to use the reserved keys, but that is not possible. What is a good way to select keys for binding macro's to?