rnkn / fountain-mode

Emacs major mode for screenwriting in Fountain plain-text markup
https://fountain-mode.org
GNU General Public License v3.0
391 stars 16 forks source link

`fountain-tab-action` keeps working outside the fountain buffer #102

Closed alienbogart closed 5 years ago

alienbogart commented 5 years ago

Runtime Environment

Issue

After using Fountain Mode, TAB has fountain-tab-action as a result. I was able to reproduce it on Org Mode and Markdown Mode. It only happens consistently with Evil Mode activated (toggled with M-x evil-mode). It does not happen if I run evil-emacs-state interactively.

Fountain use-package declaration
(use-package fountain-mode
:defer t
:ensure t
:init
(add-hook 'fountain-mode-hook 'outline-minor-mode)
(add-hook 'fountain-mode-hook 'imenu-list-minor-mode)
(set-display-table-slot standard-display-table
                        'selective-display
                        (string-to-vector "."))
:config

(general-define-key
:keymaps 'fountain-mode-map
"M-," 'fountain-backward-scene
"M-." 'fountain-forward-scene
"C-M-," 'fountain-outline-previous
"C-M-." 'fountain-outline-next)

(general-nvmap
:keymaps 'fountain-mode-map
"M-," 'fountain-backward-scene
"M-." 'fountain-forward-scene
"C-M-," 'fountain-outline-previous
"C-M-." 'fountain-outline-next)

(general-nvmap
"RET" 'imenu
"gh" 'fountain-outline-up
"]" 'fountain-outline-next
"TAB" 'fountain-tab-action
"gj" 'fountain-outline-forward
"[" 'fountain-outline-previous
"gk" 'fountain-outline-backward
"SPC TAB" 'outline-hide-subtree)

(general-create-definer leader
  :prefix "SPC")

(leader
:states '(normal visual)
:keymaps 'fountain-mode-map
"w" 'widenToCenter
"n" 'org-narrow-to-subtree))
alienbogart commented 5 years ago

Okay, I'm an idiot. I mapped TAB to fountain-tab-action without specifying the keymap, so it went global. I even corrected the mistake before, but I lost the correction after reverting my init. I'm sorry for taking your time, closing the issue.

rnkn commented 5 years ago

No worries, thanks for the followup.