Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Org-mode: action of keybinding t behaves strange #4533

Closed
caikechao opened this issue Jan 11, 2016 · 3 comments
Closed

Org-mode: action of keybinding t behaves strange #4533

caikechao opened this issue Jan 11, 2016 · 3 comments
Labels
Bug :-( Key Bindings Org stale marked as a stale issue/pr (usually by a bot)

Comments

@caikechao
Copy link
Contributor

The following is my spacemacs configuration:

System Info

  • OS: gnu/linux
  • Emacs: 24.5.1
  • Spacemacs: 0.105.7
  • Spacemacs branch: develop (rev. 59319f9)
  • Distribution: spacemacs
  • Layers:
(
 (auto-completion :variables auto-completion-enable-sort-by-usage t auto-completion-enable-snippets-in-popup t)
 better-defaults
 (c-c++ :variables c-c++-default-mode-for-headers 'c++-mode c-c++-enable-clang-support t)
 emacs-lisp emoji ess evil-commentary
 (evil-snipe :variables evil-snipe-enable-alternate-f-and-t-behaviors t)
 eyebrowse git gtags html ibuffer
 (latex :variables latex-build-command "LaTeX" latex-enable-auto-fill t)
 markdown
 (org :variables org-enable-github-support t)
 (python :variables python-enable-yapf-format-on-save t)
 ranger
 (shell :variables shell-protect-eshell-prompt nil shell-enable-smart-eshell t shell-default-shell 'eshell)
 spell-checking spacemacs-helm semantic syntax-checking unimpaired
 (version-control :variables version-control-diff-tool 'git-gutter)
 ycmd)

In the org mode, the action of keybinding t changed after the buffer is reverted. Specifically, when I open an org file just after starting Emacs, I find the keybinding t always runs the command evil-snipe-t. But when I run revert-buffer on the org file, I find the keybindingt runs the command org-todo. The different behaviours of t have been bugging me for a while.

I wonder if this problem is caused by evil-snipe. Thus I turn off evil-snipe in org mode in my user-config with

  (add-hook 'org-mode-hook 'turn-off-evil-snipe-override-mode)
  (add-hook 'org-mode-hook 'turn-off-evil-snipe-mode)

Now a much more strange problem occurred in the org mode buffer. When I open an org file just after starting Emacs, the first pressing of t binds to evil-find-char-to, and the following pressings of t bind to org-todo.

Do you guys have the same problem? Is there any way to set t just binds to org-todo on the first pressing of t?

@TheBB
Copy link
Collaborator

TheBB commented Jan 11, 2016

This is due to a missing evil keymap normalization in some modes, see https://bitbucket.org/lyro/evil/issues/301/evil-define-key-for-minor-mode-does-not for details. We fixed this for ledger-mode here. Presumably the same applies for org.

@caikechao
Copy link
Contributor Author

@TheBB Thanks for the information. Sounds like I hit an evil bug ...

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug :-( Key Bindings Org stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

3 participants