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

evil-org must not be installed if editing style is emacs #9713

Closed
kaushalmodi opened this issue Oct 9, 2017 · 7 comments
Closed

evil-org must not be installed if editing style is emacs #9713

kaushalmodi opened this issue Oct 9, 2017 · 7 comments
Labels

Comments

@kaushalmodi
Copy link
Contributor

Description :octocat:

Spacemacs attempts to install evil-org when when my editing style is emacs!

Reproduction guide 🪲

  • Start Emacs
  • Add org layer
  • Save and restart

Observed behaviour: 👀 💔

--> installing package: evil-org@org... [1/12]
An error occurred while installing evil-org (error: (file-error https://elpa.gnu.org/packages/org-plus-contrib-20171009.tar Not found))

Expected behaviour: ❤️ 😄
evil-org must not be installed if my editing style is emacs

System Info 💻

  • OS: gnu/linux
  • Emacs: 26.0.60
  • Spacemacs: 0.200.9
  • Spacemacs branch: develop (rev. 07014de)
  • Graphic display: t
  • Distribution: spacemacs-base
  • Editing style: emacs
  • Completion: helm
  • Layers:
(helm emacs-lisp neotree
      org)
  • System configuration features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 MODULES
@sdwolfz
Copy link
Contributor

sdwolfz commented Oct 9, 2017

Well you can switch between holy mode (emacs) and evil mode (vim) at any time (just press C-z), without needing to restart the editor, so I think it just downloads all packages in advance so there are no errors when switching.

@kaushalmodi
Copy link
Contributor Author

kaushalmodi commented Oct 9, 2017

@SDWolf It should be just as easy to install missing packages on the fly when user switches to evil mode. There shouldn't be a need to clutter the user's dir with packages they are never going to use.

Additionally I don't use spacemacs and was just working on getting this PR ( #9705 ) in for spacemacs + ox-hugo users... and the whole process became cumbersome with errors like "Symbol's function definition is void: evil-org-mode" ( #9618 ). Why should I be bothered with evil-org or related errors if I choose emacs to be my editing mode?

@duianto
Copy link
Contributor

duianto commented Oct 9, 2017

@SDWolf C-z only toggles editing style when the current style is vim. When it's set to emacs then C-h k C-z shows that it's bound to evil-exit-emacs-state, and the minibuffer shows: -- EMACS -- which seems to be a bug, it doesn't make sense to exit to the current state.
By default Emacs binds C-z to suspend-frame, and that's probably what Emacs style users are expecting.

@sdwolfz
Copy link
Contributor

sdwolfz commented Oct 9, 2017

I see, thank you for your observations, I'l take a look at both of them, but I can't prommise I will find a fix.

@sdwolfz
Copy link
Contributor

sdwolfz commented Oct 9, 2017

@kaushalmodi can you please check #9716 to see if it fixes your problem?

@duianto evil-exit-emacs-state bound to C-z seems to come from evil-mode (and it seems to have been like this for at least 6 years). Spacemacs overwrites C-z in the evil-evilified-state-map. So I guess if you want to have it to suspend-frame then you would have to skip installing evil-mode (not sure if possible) or rebind it yourself.

Not sure if this is something I should contribute to the core, I'l leave it to you.

@duianto
Copy link
Contributor

duianto commented Oct 9, 2017

@SDWolf Thanks for looking into it.

I don't really have a preference, I just thought that Emacs style users might want the key bindings to be as close to what they are used to as possible.

There seems to be at least two ways that C-z could be rebound:

  1. to suspend-frame
  2. or it could switch to the evil bindings. This seems to match what the Spacemacs introduction says: https://github.com/syl20bnr/spacemacs/#introduction

Spacemacs can be used naturally by both Emacs and Vim users -- you can even mix the two editing styles. Switching easily between input styles makes Spacemacs a great tool for pair-programming.

If the second option is chosen, then suspend-frame still will be easily accessible, since it's bound to C-x C-z in both the emacs and vim editing styles.

But I suspect that the second option, means that the evil packages also would have to be installed when the emacs style is chosen, so that one can instantly switch to the vim editing style. This would probably be wasteful for the emacs users that never want to switch by pressing C-z.

Since it's been broken for 6 years, then it might not be a very often used key binding, or someone probably would have reported it. Still, it should probably not be left for another 6 years, as just a key binding that prints -- EMACS -- 😄

@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 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants