* Error "Key sequence starts with non-prefix key"
@ 2014-06-04 11:52 Thorsten Jolitz
2014-06-04 12:13 ` Nicolas Richard
0 siblings, 1 reply; 7+ messages in thread
From: Thorsten Jolitz @ 2014-06-04 11:52 UTC (permalink / raw)
To: help-gnu-emacs
Hi List,
with the following expression defining key-bindings (assume
outline-minor-mode-prefix is C-c):
(let ((map (lookup-key outline-minor-mode-map outline-minor-mode-prefix)))
(define-key map "\C-a" 'show-all)
(define-key map "\C-\M-l" 'outshine-insert-all-links)
(define-key map (kbd "C-v C-a") 'outshine-babel-sha1-hash) [...]
I get an error because of the last line (no matter if I use the `kdb'
macro or just write "\C-v\C-a"):
Debugger entered--Lisp error:
(error "Key sequence C-v C-a starts with non-prefix key C-v")
I wonder what I have to do to declare e.g. C-v or C-x as prefixes for
submaps to let me define bindings like 'C-c C-v C-a', i.e. (define-key
map (kbd "C-v C-a") ...) with C-c prefix?
Maybe its simple and RTFM applies, but I couldn't find it ...
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Error "Key sequence starts with non-prefix key"
2014-06-04 11:52 Error "Key sequence starts with non-prefix key" Thorsten Jolitz
@ 2014-06-04 12:13 ` Nicolas Richard
2014-06-04 12:38 ` Thorsten Jolitz
[not found] ` <mailman.2894.1401885569.1147.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 7+ messages in thread
From: Nicolas Richard @ 2014-06-04 12:13 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: help-gnu-emacs
Thorsten Jolitz <tjolitz@gmail.com> writes:
> (let ((map (lookup-key outline-minor-mode-map outline-minor-mode-prefix)))
> (define-key map "\C-a" 'show-all)
> (define-key map "\C-\M-l" 'outshine-insert-all-links)
> (define-key map (kbd "C-v C-a") 'outshine-babel-sha1-hash) [...]
> I get an error because of the last line (no matter if I use the `kdb'
> macro or just write "\C-v\C-a"):
It means C-v is already defined. Just undefine it before you try to make
it into a prefix:
(define-key map (kbd "C-v") nil)
--
Nico.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Error "Key sequence starts with non-prefix key"
2014-06-04 12:13 ` Nicolas Richard
@ 2014-06-04 12:38 ` Thorsten Jolitz
[not found] ` <mailman.2894.1401885569.1147.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 7+ messages in thread
From: Thorsten Jolitz @ 2014-06-04 12:38 UTC (permalink / raw)
To: help-gnu-emacs
Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:
> Thorsten Jolitz <tjolitz@gmail.com> writes:
>> (let ((map (lookup-key outline-minor-mode-map outline-minor-mode-prefix)))
>> (define-key map "\C-a" 'show-all)
>> (define-key map "\C-\M-l" 'outshine-insert-all-links)
>> (define-key map (kbd "C-v C-a") 'outshine-babel-sha1-hash) [...]
>
>> I get an error because of the last line (no matter if I use the `kdb'
>> macro or just write "\C-v\C-a"):
>
> It means C-v is already defined. Just undefine it before you try to make
> it into a prefix:
> (define-key map (kbd "C-v") nil)
I see, thanks!
That binding was defined "upstream" in outline.el
,-------------------------------------------------------
| (defvar outline-mode-prefix-map
| (let ((map (make-sparse-keymap)))
| (define-key map "\C-v" 'outline-move-subtree-down)
`-------------------------------------------------------
so I could not find it in my own sources, and it was still around
although I defined alternative bindings myself.
PS
and
,------------------
| C-h k C-c C-v RET
`------------------
returned "undefined" because I had actually a different prefix than "C-c"
defined in my init.el ...
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Error "Key sequence starts with non-prefix key"
[not found] ` <mailman.2894.1401885569.1147.help-gnu-emacs@gnu.org>
@ 2014-06-06 8:29 ` Hans BKK
2014-06-06 8:38 ` Nicolas Richard
[not found] ` <mailman.3112.1402043848.1147.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 7+ messages in thread
From: Hans BKK @ 2014-06-06 8:29 UTC (permalink / raw)
To: help-gnu-emacs
On Wednesday, June 4, 2014 8:38:55 AM UTC-4, Thorsten Jolitz wrote:
> so I could not find it in my own sources, and it was still around
> although I defined alternative bindings myself.
>
> PS
> and
> ,------------------
> | C-h k C-c C-v RET
> `------------------
>
> returned "undefined" because I had actually a different prefix than "C-c"
> defined in my init.el ...
I seem to recall a certain method of customizing keybindings enabled one to get a "report printout" of some kind that showed a list of possible conflicts like this.
I think it was one of the package-loading tools, maybe req-package?
Are there other ways to get this functionality that's targeted more specifically to keybindings?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Error "Key sequence starts with non-prefix key"
2014-06-06 8:29 ` Hans BKK
@ 2014-06-06 8:38 ` Nicolas Richard
[not found] ` <mailman.3112.1402043848.1147.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 7+ messages in thread
From: Nicolas Richard @ 2014-06-06 8:38 UTC (permalink / raw)
To: Hans BKK; +Cc: help-gnu-emacs
Hans BKK <hansbkk@gmail.com> writes:
> I seem to recall a certain method of customizing keybindings enabled
> one to get a "report printout" of some kind that showed a list of
> possible conflicts like this.
John Wiegley's bind-key.el (distibuted as part of use-package) defines
describe-personal-keybindings. But that will only work if you use
bind-key for your key definitions.
--
Nico.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Error "Key sequence starts with non-prefix key"
[not found] ` <mailman.3112.1402043848.1147.help-gnu-emacs@gnu.org>
@ 2014-06-06 8:47 ` Hans BKK
2014-06-06 9:12 ` Nicolas Richard
0 siblings, 1 reply; 7+ messages in thread
From: Hans BKK @ 2014-06-06 8:47 UTC (permalink / raw)
To: help-gnu-emacs
On Friday, June 6, 2014 4:38:26 AM UTC-4, Nicolas Richard wrote:
> > I seem to recall a certain method of customizing keybindings enabled
> > one to get a "report printout" of some kind that showed a list of
> > possible conflicts like this.
>
> John Wiegley's bind-key.el (distibuted as part of use-package) defines
> describe-personal-keybindings. But that will only work if you use
> bind-key for your key definitions.
Ah that was it, req-package is just a wrapper for his use-package which incorporates bind-key.
Does bind-key stand alone for those that aren't looking to use the rest of use-package?
>> Are there other ways to get this functionality that's targeted more specifically to keybindings?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Error "Key sequence starts with non-prefix key"
2014-06-06 8:47 ` Hans BKK
@ 2014-06-06 9:12 ` Nicolas Richard
0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Richard @ 2014-06-06 9:12 UTC (permalink / raw)
To: Hans BKK; +Cc: help-gnu-emacs
Hans BKK <hansbkk@gmail.com> writes:
> Does bind-key stand alone for those that aren't looking to use the
> rest of use-package?
You can load bind-key separately, yes.
--
Nico.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-06-06 9:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-04 11:52 Error "Key sequence starts with non-prefix key" Thorsten Jolitz
2014-06-04 12:13 ` Nicolas Richard
2014-06-04 12:38 ` Thorsten Jolitz
[not found] ` <mailman.2894.1401885569.1147.help-gnu-emacs@gnu.org>
2014-06-06 8:29 ` Hans BKK
2014-06-06 8:38 ` Nicolas Richard
[not found] ` <mailman.3112.1402043848.1147.help-gnu-emacs@gnu.org>
2014-06-06 8:47 ` Hans BKK
2014-06-06 9:12 ` Nicolas Richard
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.