emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Evil-mode keymapping being overridden by org-mode
@ 2017-04-06 17:40 Brandon Amos
  2017-04-06 19:23 ` Brandon Amos
  0 siblings, 1 reply; 2+ messages in thread
From: Brandon Amos @ 2017-04-06 17:40 UTC (permalink / raw)
  To: implementations-list, emacs-orgmode

Hi, I am mapping the "t" character in evil normal/motion modes to
`evil-next-line` with the following. I am doing this mapping
for reasonable navigation with the Dvorak layout.

  (define-key evil-normal-state-map "t" 'evil-next-line)
  (define-key evil-motion-state-map "t" 'evil-next-line)

This works well, except in one case when org mode over-rides
my mapping with `org-todo`:

  1. Open Emacs and an org file
  2. In normal mode, `C-h k t` shows that `t` is bound to evil-next-line.
  3. Open the agenda with `C-a a`
  4. Close the agenda buffer with `C-x 0`
  5. In normal mode, `C-h k t` shows that `t` is bound to `org-todo`

How can I prevent opening the agenda buffer from
over-writing this key mapping like this?

I've tried searching for ways to unset this org-mode keyboard mapping
and ways to define keyboard mappings that can't be over-ridden,
but I haven't been able to find anything that works.

If it is helpful, I am using this version of spacemacs:
https://github.com/syl20bnr/spacemacs/tree/c2774bc0dea3dbc63621709d54685fbbe9212d55
My (near-vanilla) spacemacs init file is here.
I set the evil keymappings in dotspacemacs/user-config:
https://github.com/bamos/dotfiles/blob/master/.spacemacs.d/init.el

-Brandon.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Evil-mode keymapping being overridden by org-mode
  2017-04-06 17:40 Evil-mode keymapping being overridden by org-mode Brandon Amos
@ 2017-04-06 19:23 ` Brandon Amos
  0 siblings, 0 replies; 2+ messages in thread
From: Brandon Amos @ 2017-04-06 19:23 UTC (permalink / raw)
  To: implementations-list, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]


I have found a solution to this problem.

This keymapping was coming from the spacemacs org-mode layer:
https://github.com/syl20bnr/spacemacs/blob/bd7ef98e4c35fd87538dd2a81356cc83f5fdi02f3/layers/%2Bemacs/org/local/evil-org/evil-org.el#L134

In my init, this mapping can also be over-written to `evil-next-line`:

  (evil-define-key 'normal evil-org-mode-map "t" 'evil-next-line)

-Brandon.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 610 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-06 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-06 17:40 Evil-mode keymapping being overridden by org-mode Brandon Amos
2017-04-06 19:23 ` Brandon Amos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).