0

I have been enjoying Xah Fly Keys by @XahLee and I am trying to create my own keymap for some org-mode functions. I have read the helpful documentation. I used this section as a template for my keymap:
Add or Change Leader Key Sequence - Here's a example of creating a whole keymap

When I start emacs I get this error massage.

Warning (initialization): An error occurred while loading `/root/.emacs':
Symbol's value as variable is void: xah-fly-leader-keymap

This is the part of my .emacs where I am trying to create the keymap.

(setq my-org-mode-keymap (make-sparse-keymap))
(define-key my-org-mode-keymap (kbd "o") 'org-meta-return)
(define-key my-org-mode-keymap (kbd "c") 'org-metaup)
(define-key my-org-mode-keymap (kbd "t") 'org-metadown)
(define-key my-org-mode-keymap (kbd "h") 'org-demote-subtree)
(define-key my-org-mode-keymap (kbd "n") 'org-promote-subtree)
(define-key my-org-mode-keymap (kbd "g") 'org-shiftright)

(define-key xah-fly-leader-key-map (kbd "o") my-org-mode-keymap)
  • 1
    Possible duplicate of Symbol's value as variable is void: shell-mode-map – Drew Mar 10 '18 at 19:44
  • Sounds like you didn't load the library that defines xah-fly-leader-key-map before invoking that code. Try requireing that library. – Drew Mar 10 '18 at 19:45
  • @Drew thank you for linking to the other answer. It helped me fix the error. The error was because I had accidentally removed the - from xah-fly-leader-key-map so it was xah-fly-leader-keymap in a customization that had previously been working on. As per your previous comment should I make this comment an answer to this question? – learningemacs Mar 10 '18 at 20:23
  • Yes, answering your own questions is perfectly fine. – wasamasa Mar 10 '18 at 20:44
0

@Drew thank you for linking to the other answer.
@wasamasa thanks for your help on IRC Freenode emacs-beginners.

The error was because I had accidentally removed the - from xah-fly-leader-key-map so it was xah-fly-leader-keymap in a customization that had previously been working on and had been working fine.

The error was:

(define-key xah-fly-leader-keymap (kbd "-") 'exchange-point-and-mark)

The fix was:

(define-key xah-fly-leader-key-map (kbd "-") 'exchange-point-and-mark)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.