I currently trying to remap my org mode agenda keymap in Spacemacs for
org-agenda-previous-item. In the agenda view I like to map the functions to
k for next-line and
l for previous-line.
I already tested different approaches like:
(define-key org-agenda-mode-map (kbd "k") 'org-agenda-next-item) (define-key org-agenda-mode-map (kbd "l") 'org-agenda-previous-item)
The result of this one is:
Error in dotspacemacs/user-config: Symbol’s value as variable is void: org-agenda-mode-map. And it doesn't matter if I put the key mappings into
(add-hook 'org-agenda-mode-hook or
(with-eval-after-load 'org environments..
Or this one (source: How do I change key bindings for org-mode agenda view?):
(add-hook 'org-agenda-mode-hook (lambda () (local-set-key (kbd "k") 'org-agenda-next-item)))
This runs without an error, but the remapping of the key
k does not take place.
I also checked the command
describe-keymap to search for the correct keymap register. But it seems, that
org-agenda-mode-map is the correct one.
Is there another approach, which might work? Or am I doing something wrong?