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

Add an option to disable automatic cider-mode #1109

Merged
merged 1 commit into from Jun 7, 2015

Conversation

abo-abo
Copy link
Contributor

@abo-abo abo-abo commented May 29, 2015

  • cider.el (cider-auto-mode): New defcustom.
    (cider--connected-handler): Don't auto-enable cider-mode' for all clojure-mode' buffers when `cider-auto-mode' is nil.

@bbatsov
Copy link
Member

bbatsov commented May 31, 2015

What's the reasoning here?

@abo-abo
Copy link
Contributor Author

abo-abo commented May 31, 2015

I don't want the extra key bindings and the mode line change. It is a minor mode after all: preferably, it should be opt-in. I ask to at least make it opt-out.

@bbatsov
Copy link
Member

bbatsov commented May 31, 2015

While this is technically true, CIDER is pretty much unusable without it. The auto-enabling of the mode was borrowed by SLIME. I do have my reservations about it, but I'm also uncertain whether there's a better alternative to the current setup.

@abo-abo
Copy link
Contributor Author

abo-abo commented May 31, 2015

I do have my reservations about it, but I'm also uncertain whether there's a better alternative to the current setup.

I don't know of a better way either, but CIDER is very usable to me without a minor mode. That's why I propose an opt-out parameter.

@Malabarba
Copy link
Member

With regards to cider being opt-in, technically, you opt-in when you invoke the jack-in or the connect command.
Still, I see no reason why we can't have a variable to disable the auto activation of minor modes. Though perhaps a documented defvar might be preferable to a defcustom (so as not to clutter the customization menu).

@abo-abo
Copy link
Contributor Author

abo-abo commented May 31, 2015

With regards to cider being opt-in, technically, you opt-in when you invoke the jack-in or the connect command.

Not really. What if I just want a REPL? How is clojure-mode related to that? It's a little related, and we have the example of SLIME doing the same thing, but I don't think it's completely the right thing.

I know that this is a recent change, because I haven't seen this behavior before. I bound C-l to clear the REPL buffer in cider-mode. And I was surprised to find this binding in a clojure-mode buffer. I could adjust the key bindings, but the change in mode line is annoying as well.

@Malabarba
Copy link
Member

With regards to cider being opt-in, technically, you opt-in when you invoke the jack-in or the connect command.

Not really. What if I just want a REPL? How is clojure-mode related to that? It's a little related, and we have the example of SLIME doing the same thing, but I don't think it's completely the right thing.

I'm not saying we shouldn't offer a repl-only option (quite the contrary, think we should). I was just replying to your other comment, that cider isn't opt-in.
Not being opt-in is when a minor-mode turns itself on as soon as the packge is installed. Cider is opt-in, it just doesn't offer (yet) the fine-grained configuration you desire.

@bbatsov
Copy link
Member

bbatsov commented Jun 2, 2015

Not really. What if I just want a REPL? How is clojure-mode related to that? It's a little related, and we have the example of SLIME doing the same thing, but I don't think it's completely the right thing.

Fair point. I was just explaining why it is done as it is now.

I know that this is a recent change, because I haven't seen this behavior before. I bound C-l to clear the REPL buffer in cider-mode. And I was surprised to find this binding in a clojure-mode buffer. I could adjust the key bindings, but the change in mode line is annoying as well.

This behaviour hasn't been changed since the earliest days of the project. cider-mode and cider-repl-mode are totally different modes. Not sure what's your problem with the modeline - not knowing the active connection is pretty problematic for everyone using more than one connection.

I'll think a bit more on how to best tackle this, but you're the first person who has issues with this behaviour for about 3 years now.

@bbatsov
Copy link
Member

bbatsov commented Jun 6, 2015

@abo-abo ^^

Btw, you should also mention this change in the changelog.

* cider.el (cider-auto-mode): New defcustom.
(cider--connected-handler): Don't auto-enable `cider-mode' for all
`clojure-mode' buffers when `cider-auto-mode' is nil.
bbatsov added a commit that referenced this pull request Jun 7, 2015
Add an option to disable automatic cider-mode
@bbatsov bbatsov merged commit 501e348 into clojure-emacs:master Jun 7, 2015
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.

None yet

3 participants