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 a configure about ess-smart-S-assign #558

Closed
Vonfry opened this issue Jun 8, 2018 · 3 comments
Closed

add a configure about ess-smart-S-assign #558

Vonfry opened this issue Jun 8, 2018 · 3 comments
Labels

Comments

@Vonfry
Copy link

Vonfry commented Jun 8, 2018

If one don't want to use ess-smart-S-assign-key, he must use some toggle function. But this is not explicit. For example, if some one write it twice in init file, it will start again.

Would you like to add some function like (ess-smart-S-assign-mode nil) to disable it indeed.

Or let we set ess-smart-S-assign-key to nil. I try to this but it will throw a exception when require this package.

jabranham added a commit to jabranham/ESS that referenced this issue Jun 8, 2018
This changes is so that users can (setq ess-smart-S-assign-key nil) at
any time to disable the smart assignment. To change which key is used,
they must set ess-smart-S-assign-key before ESS is loaded.

If ess-smart-S-assign-key is nil, ess-smart-S-assign behaves like
self-insert-command.

It keeps around the old functions so that they don't cause errors, but
they're ignored in favor of having users set ess-smart-S-assign-key
themselves.

Closes emacs-ess#558
jabranham added a commit to jabranham/ESS that referenced this issue Jun 8, 2018
This changes is so that users can (setq ess-smart-S-assign-key nil) at
any time to disable the smart assignment. To change which key is used,
they must set ess-smart-S-assign-key before ESS is loaded.

If ess-smart-S-assign-key is nil, ess-smart-S-assign behaves like
self-insert-command.

It keeps around the old functions so that they don't cause errors, but
they're ignored in favor of having users set ess-smart-S-assign-key
themselves.

Closes emacs-ess#558
@jabranham
Copy link
Contributor

I've had a few people ask me how to disable this, so you're not the only one who finds this annoying, especially that you can't set ess-smart-S-assign-key to nil. I'm not a huge fan of it personally and I've just been doing (defalias 'ess-smart-S-assign #'self-insert-command) in my init.el to get rid of this.

#559 makes it possible to disable this by setting ess-smart-S-assign-key to nil.

@vspinu
Copy link
Member

vspinu commented Jun 8, 2018

One can simply do (define-key ess-mode-map [?_] nil) and be done with it.

The goggling should never been there in the first place. It mostly confuses users.

@jabranham
Copy link
Contributor

Well, you'd have to do that to inferior-ess-mode-map as well, which isn't terribly complicated I agree.

The PR I mentioned allows users to set ess-smart-S-assign to nil. I've had at least four or five people ask me why that's not possible. It came up on #emacs on IRC just last week.

Plus it gets rid of ~80 lines of code :-)

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