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-cycle problem in evil normal state #4024

Closed
dingmingxin opened this Issue Dec 1, 2015 · 7 comments

Comments

Projects
None yet
6 participants
@dingmingxin

dingmingxin commented Dec 1, 2015

Here are the layers that I loaded.

dotspacemacs-configuration-layers
'(
     better-defaults
     emacs-lisp
     git
     markdown
     org
  )

When I start emacs in OSX Terminal.app , opening a org file. Hitting TAB key in the keyboard did not trigger function:

org-cycle

By describe-function org-cycle, I got:

It is bound to <mouse-1>, <normal-state> <tab>, <tab> .....

I have nothing special settings in my Terminal.app. And Tab behavior is normal in "Gnu Emacs for OSX"(GUI mode).

spacemacs version: 0.104.6
emacs version: 25.1
osx: 10.11.1

How can I solve this problem .Can anyone help me out ? Much appreciations.

@StreakyCobra

This comment has been minimized.

Show comment
Hide comment
@StreakyCobra

StreakyCobra Dec 1, 2015

Contributor

It's probably another variant of #3472. The <tab> keycode is only understood by the GUI version of emacs, and the TAB keycode is understood by both Terminal and GUI versions of emacs. There is two of them because, for historic reasons, TAB and C-i are the same keycode. So to have the possibility to differentiate Tab from C-i in GUI, the <tab> keycode is used.

  • <tab> = Tab (GUI only)
  • TAB = C-i = C-i = Tab (Terminal, or GUI if <tab> is not set)

There are people wanting to use TAB everywhere, like you, to have the same behaviour in Terminal and in GUI. There are others people, like in the linked issue, that want to use <tab> everywhere to have the possibility to differentiate Tab key from C-i in GUI, but breaking terminals.

@justbur found a clean way to satisfy everybody and this will probably be soon in develop (and later in master). This is truly awesome, because it will even work on demonized emacs :-)

Contributor

StreakyCobra commented Dec 1, 2015

It's probably another variant of #3472. The <tab> keycode is only understood by the GUI version of emacs, and the TAB keycode is understood by both Terminal and GUI versions of emacs. There is two of them because, for historic reasons, TAB and C-i are the same keycode. So to have the possibility to differentiate Tab from C-i in GUI, the <tab> keycode is used.

  • <tab> = Tab (GUI only)
  • TAB = C-i = C-i = Tab (Terminal, or GUI if <tab> is not set)

There are people wanting to use TAB everywhere, like you, to have the same behaviour in Terminal and in GUI. There are others people, like in the linked issue, that want to use <tab> everywhere to have the possibility to differentiate Tab key from C-i in GUI, but breaking terminals.

@justbur found a clean way to satisfy everybody and this will probably be soon in develop (and later in master). This is truly awesome, because it will even work on demonized emacs :-)

@dingmingxin

This comment has been minimized.

Show comment
Hide comment
@dingmingxin

dingmingxin Dec 2, 2015

Thanks for replying in time.
But in which way can I personally configure emacs, making TAB act as org-cycle in org mode ?
I have tried this in ~/.spacemacs.d/init.el

(defun dotspacemacs/user-config ()
  "Configuration function for user code.
  This function is called at the very end of Spacemacs initialization after
  layers configuration. You are free to put any user code."
  (define-key evil-normal-state-map (kbd "TAB") 'org-cycle)
  )

But it did not work as I expected.

dingmingxin commented Dec 2, 2015

Thanks for replying in time.
But in which way can I personally configure emacs, making TAB act as org-cycle in org mode ?
I have tried this in ~/.spacemacs.d/init.el

(defun dotspacemacs/user-config ()
  "Configuration function for user code.
  This function is called at the very end of Spacemacs initialization after
  layers configuration. You are free to put any user code."
  (define-key evil-normal-state-map (kbd "TAB") 'org-cycle)
  )

But it did not work as I expected.

@syl20bnr

This comment has been minimized.

Show comment
Hide comment
@syl20bnr

syl20bnr Dec 2, 2015

Owner

This is a temporary regression in develop, we will fix it soon, sorry for this.

Owner

syl20bnr commented Dec 2, 2015

This is a temporary regression in develop, we will fix it soon, sorry for this.

@justbur

This comment has been minimized.

Show comment
Hide comment
@justbur

justbur Dec 2, 2015

Contributor

@dingmingxin like this in user-config

(evil-define-key 'normal evil-jumper-mode-map (kbd "TAB") nil)
Contributor

justbur commented Dec 2, 2015

@dingmingxin like this in user-config

(evil-define-key 'normal evil-jumper-mode-map (kbd "TAB") nil)
@dingmingxin

This comment has been minimized.

Show comment
Hide comment
@dingmingxin

dingmingxin Dec 2, 2015

@syl20bnr Thanks for your awesome work.
@justbur Just tested:

  (evil-define-key 'normal evil-jumper-mode-map (kbd "TAB") nil)

This works for me . Thank you very much.

dingmingxin commented Dec 2, 2015

@syl20bnr Thanks for your awesome work.
@justbur Just tested:

  (evil-define-key 'normal evil-jumper-mode-map (kbd "TAB") nil)

This works for me . Thank you very much.

@StreakyCobra

This comment has been minimized.

Show comment
Hide comment
@StreakyCobra

StreakyCobra Dec 2, 2015

Contributor

Related PRs: #4025, #3999

Contributor

StreakyCobra commented Dec 2, 2015

Related PRs: #4025, #3999

@vitiral

This comment has been minimized.

Show comment
Hide comment
@vitiral

vitiral Dec 24, 2015

Just want to mention that this is still broken for me in mainline.

@justbur is there a way to do it so that that only takes effect for org mode? Something like (evil-define-key-mode 'org-mode ... et

vitiral commented Dec 24, 2015

Just want to mention that this is still broken for me in mainline.

@justbur is there a way to do it so that that only takes effect for org mode? Something like (evil-define-key-mode 'org-mode ... et

@TheBB TheBB closed this Jun 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment