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

Naming #1

Closed
jojojames opened this issue Nov 5, 2017 · 9 comments
Closed

Naming #1

jojojames opened this issue Nov 5, 2017 · 9 comments
Labels

Comments

@jojojames
Copy link
Collaborator

jojojames commented Nov 5, 2017

evil-integration-plus
evil-integrations
evil-collection
evil-binding-collection
evil-binding
evil-bindings

I am going with evil-collection for now but any of the above would work with me.

@Ambrevar
Copy link
Collaborator

Ambrevar commented Nov 5, 2017

Among the suggestions, I would spell evil-bindings with an 's'.
As discussed there, evil-integration* could be confused with the evil-integration.el module that already exists in Evil.

@jojojames
Copy link
Collaborator Author

evil-bindings works for me too if that's the one you preferred.

@Ambrevar
Copy link
Collaborator

Ambrevar commented Nov 5, 2017

Nah, evil-collection is cool, plus it's more relevant: it truly is a collection of bindings.
While evil-bindings does not say that.

@jojojames
Copy link
Collaborator Author

jojojames commented Nov 5, 2017

Some thoughts on evil-integrations vs evil-collection.

It might be worth considering that this package primarily rebinds a couple things for the user but it might also smooth out some sharp edges around package interactions (where the actual packages might not want to write too much special case code).

Some examples:

(defun evil-macrostep-set-keys ()
  ;; Keymaps don't seem to be populated on first try.
  ;; Force `evil' to normalize keymaps.
  (add-hook 'macrostep-mode-hook #'evil-normalize-keymaps)

  (evil-define-key 'normal macrostep-keymap
    "q" 'macrostep-collapse-all
    "e" 'macrostep-expand
    "u" 'macrostep-collapse
    "gj" 'macrostep-next-macro
    "gk" 'macrostep-prev-macro
    "C-j" 'macrostep-next-macro
    "C-k" 'macrostep-prev-macro))

I have an add-hook here to normalize the keymaps because I wasn't able to get macrostep+evil keymap to work upon entry into macrostep. In this case, the function does keybindings as well as 'integration', similar in spirit to the evil-integration.el file within evil mode.

It might? be better to use something like:

(defun evil-macrostep-integrate ()
  ;; Keymaps don't seem to be populated on first try.
  ;; Force `evil' to normalize keymaps.
  (add-hook 'macrostep-mode-hook #'evil-normalize-keymaps)

  (evil-define-key 'normal macrostep-keymap
    "q" 'macrostep-collapse-all
    "e" 'macrostep-expand
    "u" 'macrostep-collapse
    "gj" 'macrostep-next-macro
    "gk" 'macrostep-prev-macro
    "C-j" 'macrostep-next-macro
    "C-k" 'macrostep-prev-macro))

instead?

I might be biased, I started evil-integrations as a superset of the original evil-integration.el file.

@Ambrevar
Copy link
Collaborator

Ambrevar commented Nov 5, 2017

Isn't this "integration" merely an implementation detail?
The end-user only cares about being able to press e and u and gj and gk.
That we need hooks to enable the binding does not matter much to the user.

@Ambrevar
Copy link
Collaborator

Ambrevar commented Nov 5, 2017

That said, I'm OK with re-thinking the name of the setup functions.
Now we have -set-keys. Options:

  • -integrate: a bit long, isn't it?
  • -init: should we reserve -init for the main setup function?
  • -setup: why not?
  • -install: I prefer setup.

@jojojames
Copy link
Collaborator Author

That was one example, another one would be changing the default mode like in ag mode from motion -> normal.

-setup sounds good. I like that. We can take care of this after getting everything in place and normalizing the bindings.

@Ambrevar
Copy link
Collaborator

Ambrevar commented Nov 5, 2017

See my bindings for modes where I change the default state. For instance diff-mode has an interesting setup because of how Emacs deals with it:

  • If read-write, the bindings are prefixed with C-c something.
  • If read-only, the prefix is not necessery.

I've exploited this as follows, which makes it very natural in my opinion:

  • If read-write, then we are in normal/insert state without special binding but \ to toggle read-only (inspired by Evil-Magit). C-x C-q also works.
  • If read-only, then we are in motion state with all the diff-specific bindings.

That might sound like "features", but in the end it's just bindings. You can do the exact same things both with and without Evil mode.

@Ambrevar Ambrevar added the MELPA label Nov 9, 2017
@jojojames
Copy link
Collaborator Author

I think we've settled on naming so I'll close this now.

kepi pushed a commit to kepi/evil-collection that referenced this issue May 18, 2023
Add compatability with mu4e 1.8 (two files approach).
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

2 participants