syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.68k stars 4.89k forks source link

Most of ranger bindings are overriden by evil #13626

Closed olivierverdier closed 7 months ago

olivierverdier commented 4 years ago

Description :octocat:

Most of ranger bindings are overriden by evil

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: The cursor goes down one row...

Expected behaviour: :heart: :smile: It should be bound to ranger-find-file instead

System Info :computer:

Backtrace :paw_prints:

<<BACKTRACE IF RELEVANT>>
olivierverdier commented 4 years ago

I found the problem. It occurs after commit 25e96354027f05151fa23a0667649abded84765e which loads helm-fasd. It is this package that causes the problem. So, I guess the layers fasd and ranger should be considered incompatible with each other. I have now removed the layer fasd in my config file, and ranger now seems to work as it should.

duianto commented 4 years ago

Confirmed.

When the layers: helm, fasd and ranger are enabled, then RET is bound to:

RET (translated from ) runs the command evil-ret (found in evil-motion-state-map), which is an interactive compiled Lisp function in

Without the fasd layer:

RET (translated from ) runs the command ranger-find-file (found in ranger-mode-map), which is an interactive compiled Lisp function in ‘ranger.el’.

System Info (click to expand)
#### System Info :computer:
- OS: gnu/linux
- Emacs: 26.3.50
- Spacemacs: 0.300.0
- Spacemacs branch: develop (rev. 23976ab79)
- Graphic display: t
- Distribution: spacemacs
- Editing style: vim
- Completion: helm
- Layers:
```elisp
(auto-completion command-log emacs-lisp git helm lsp markdown multiple-cursors
                 (org :variables org-agenda-files
                      '("~/org/notes.org"))
                 (python :variables python-lsp-server 'mspyls)
                 ranger
                 (shell :variables shell-default-height 30 shell-default-position 'bottom)
                 spell-checking syntax-checking treemacs version-control)
```
- System configuration features: XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS GLIB NOTIFY LIBSELINUX GNUTLS FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS

a13ph commented 4 years ago

Seems more logical to change binding for Enter in fasd rather than marking those two layers as incompatible. Unless there are more important conflicts in keybindings between those, @olivierverdier ?

olivierverdier commented 4 years ago

Oh yes, it’s the same with most of the ranger bindings (l, h, zz, etc.), they are all shadowed by evil, somehow.

duianto commented 4 years ago

It seems to be caused by the package: https://github.com/ajsalminen/helm-fasd

It's not limited to Spacemacs, because it also happens with just: Emacs and the packages: evil, helm and ranger

The helm-fasd package was cloned, then loaded from init.el with:

(add-to-list 'load-path "~/.emacs.d/helm-fasd/")

A possible cause

It seems to be caused by the line: https://github.com/ajsalminen/helm-fasd/blob/7053c6f351f8e0f4014e7dd6e222445593d6f50f/helm-fasd.el#L98

(add-hook 'dired-mode-hook 'helm-find-fasd-add-file)

A possible workaround

It might break the helm-fasd package, but for anyone that isn't using it.

Removing that command from the dired-mode-hook seems to work: Add the following to the dotspacemacs/user-config section in .spacemacs:

(remove-hook 'dired-mode-hook 'helm-find-fasd-add-file)
System Info (click to expand)
#### System Info :computer:
- OS: gnu/linux
- Emacs: 27.0.91
- Spacemacs: 0.300.0
- Spacemacs branch: develop (rev. 23976ab79)
- Graphic display: t
- Distribution: spacemacs
- Editing style: vim
- Completion: helm
- Layers:
```elisp
(auto-completion command-log emacs-lisp fasd git helm lsp markdown multiple-cursors
                 (org :variables org-agenda-files
                      '("~/org/notes.org"))
                 ranger
                 (shell :variables shell-default-height 30 shell-default-position 'bottom)
                 spell-checking syntax-checking treemacs version-control)
```
- System configuration features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD JSON PDUMPER LCMS2 GMP

jsilve24 commented 3 years ago

I ran into this problem as well.

github-actions[bot] commented 2 years ago

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[bot] commented 1 year ago

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!