From: Cecil Westerhof <dummy@dummy.nl>
To: help-gnu-emacs@gnu.org
Subject: Re: Problem binding to a key
Date: Fri, 20 Apr 2007 23:14:50 +0200 [thread overview]
Message-ID: <46292d4c$0$338$e4fe514c@news.xs4all.nl> (raw)
In-Reply-To: FF5Wh.27706$G23.9198@newsreading01.news.tds.net
Rjjd wrote:
> weber wrote:
>> On 20 abr, 11:54, Cecil Westerhof <d...@dummy.nl> 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?
next prev parent reply other threads:[~2007-04-20 21:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-20 14:54 Problem binding to a key Cecil Westerhof
2007-04-20 15:54 ` weber
2007-04-20 16:14 ` Rjjd
2007-04-20 21:14 ` Cecil Westerhof [this message]
2007-04-21 4:09 ` Tim X
2007-04-21 7:33 ` Cecil Westerhof
2007-04-21 7:59 ` Cecil Westerhof
2007-04-21 12:57 ` Johan Bockgård
2007-04-21 16:19 ` Reiner Steib
2007-04-22 11:28 ` Cecil Westerhof
2007-04-22 6:46 ` Tim X
2007-04-22 11:33 ` Cecil Westerhof
2007-04-21 4:04 ` Tim X
2007-04-20 16:27 ` Eric Hanchrow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='46292d4c$0$338$e4fe514c@news.xs4all.nl' \
--to=dummy@dummy.nl \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.