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

Optionally load evil-integration.el #993

Merged
merged 2 commits into from
Dec 13, 2017

Conversation

edkolev
Copy link
Member

@edkolev edkolev commented Dec 8, 2017

This is a WIP PR as a result of #992

I haven't self-tested thoroughly yet. Plus, there's an issue with the generation of .depend which is currently worked-around like so:

(when evil-want-integration
;; TODO creating the .depend file breaks if the following require is
;; not on a line of its own
(require 'evil-integration)
)

Edit: the workaround is is now removed.

Any suggestions for improvements are welcome.

@edkolev edkolev changed the title Evil integration load optionally Optionally load evil-integration.el Dec 8, 2017
@noctuid
Copy link
Contributor

noctuid commented Dec 8, 2017

I think that it would be much preferable to split the files into one with keybindings and one with everything else (or to further split everything else, but I think the main thing most people would want to disable is only the keybindings). See my comment in #992. I don't think everyone would agree on what is "basic" (for example, I'd include the advice and setting of evil command properties).

@wasamasa
Copy link
Member

wasamasa commented Dec 8, 2017

Sigh. I don't want to split up anything at all.

@VanLaser
Copy link

VanLaser commented Dec 8, 2017

For one, yes, I'd like evil not to load these keybindings by default, so I'd welcome a split too. Right now I have to use (are these easy to find for an evil newcomer? I think no):

  ;; don't let modes override any states (!)
  (setq evil-overriding-maps nil
        evil-intercept-maps nil
        evil-pending-intercept-maps nil
        evil-pending-overriding-maps nil)
  ;; subvert evil-operation.el overrides (dired, ibuffer etc.)
  (advice-add 'evil-make-overriding-map :override #'ignore)
  (advice-add 'evil-make-intercept-map  :override #'ignore)
  (advice-add 'evil-add-hjkl-bindings   :override #'ignore)

... so it would be much more "natural" to not have to apply such workarounds.

@TheBB
Copy link
Member

TheBB commented Dec 8, 2017

I'm fine making evil-integration optional. Strongly agree with @wasamasa, let's not split it.

@noctuid
Copy link
Contributor

noctuid commented Dec 8, 2017

Providing a setting to not load evil-integration without splitting it doesn't really solve anything. Users still have to require it for the configuration they want and use workarounds to prevent/undo the keybindings/overriding maps parts. That or they have to not load it all (now with an official setting) and copy the other parts into their own config or a new package. Nothing really changes.

Why don't you want to split it?

@wasamasa
Copy link
Member

See the linked ticket.

@edkolev edkolev force-pushed the evil-integration-load-optionally branch from fe78b39 to 5ceb25d Compare December 10, 2017 12:33
@edkolev
Copy link
Member Author

edkolev commented Dec 10, 2017

OK, this PR is now modified - it only adds the option to load evil-integration.el optionally. The generation of the .depend file is also tweaked.

Makefile Outdated
@@ -20,7 +20,7 @@ compile: $(ELCFILES)
@echo Compute dependencies
@rm -f .depend
@for f in $(FILES); do \
sed -n "s/(require '\(evil-.*\))/$${f}c: \1.elc/p" $$f >> .depend;\
sed -n "s/[^(]*(require '\(evil-[^)]*\).*)/$${f}c: \1.elc/p" $$f >> .depend;\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems somewhat broad, can't you just allow leading space in front of (require 'evil-...)?

@edkolev edkolev force-pushed the evil-integration-load-optionally branch from ab22283 to 7fc4cc4 Compare December 11, 2017 07:35
@edkolev
Copy link
Member Author

edkolev commented Dec 11, 2017

Sure, the commit is now amended - only spaces are allowed in front on the (require ...

@wasamasa
Copy link
Member

Thanks!

@wasamasa wasamasa merged commit 6af28fd into master Dec 13, 2017
@wasamasa wasamasa deleted the evil-integration-load-optionally branch January 4, 2018 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants