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

Any way to not enable outshine keybindings? #75

Open
casouri opened this issue Jan 20, 2020 · 7 comments · May be fixed by #80
Open

Any way to not enable outshine keybindings? #75

casouri opened this issue Jan 20, 2020 · 7 comments · May be fixed by #80
Assignees

Comments

@casouri
Copy link

casouri commented Jan 20, 2020

I don't want to enable bindings from outshine, hence the config:

(load-package outshine
  :hook (prog-mode-hook . outshine-mode)
  :config
  (setq outshine-mode-map (make-sparse-keymap)))

However, C-h k n shows that the self-insert-key is still bound by outhsine. Any way to disable that?

@thblt
Copy link
Collaborator

thblt commented Jan 24, 2020

Thanks for the report, @casouri! I've had a quick look.

First, I don't think outshine-self-insert-command does what its docstring say it does, but I'll need more time to fully understand what it does.

My understanding is that it essentially enables what it calls “speed commands”, that is, single-letter commands that work only at specific locations. I'm not sure why we couldn't have those with just outshine-define-key. It also does some undo clustering, which we may avoid by falling back to (call-interactively 'self-insert-command) instead of just (self-insert-command N).

If I'm correct, we could drop this feature and merge speed commands into the common fallback-binding mechanism.

I'll have a deeper look when I'll find the time.

@thblt thblt self-assigned this Jan 24, 2020
@yuhan0
Copy link

yuhan0 commented Aug 26, 2020

I had a quick fix for this which is considerably simpler than #76, simply wrapping the remapping in a (when outshine-use-speed-commands ...) block.

@thblt If it's ok I'll open a PR, since you mentioned abandoning the approach in #76.

@yuhan0 yuhan0 linked a pull request Aug 26, 2020 that will close this issue
@alphapapa
Copy link
Owner

I had a quick fix for this which is considerably simpler than #76, simply wrapping the remapping in a (when outshine-use-speed-commands ...) block.

@thblt If it's ok I'll open a PR, since you mentioned abandoning the approach in #76.

As I mentioned in your PR, the best way to handle this would be to define a minor mode. The define-minor-mode macro makes that very easy.

@jacksonbenete
Copy link

I'm not sure if this is related to what I need. But I will ask here first instead of opening a new issue.

I want to just unbind <backtab> since I already use it for other quality of life improvement, I've bind 'outshine-cycle-buffer to C-<return> and it's enough for me, I need the <backtab> for other purpose if it's possible.

I'm new to Lisp and Emacs so I don't know if it's obvious, I've also searched and didn't found an answer in closed issues, sorry if there is one and I couldn't find.
Maybe it's through (require outshine :config (...)) or something like that in my init.el?

@chrisoswald
Copy link

How can I define a minor mode without the outshine keybindings?

@alphapapa
Copy link
Owner

How can I define a minor mode without the outshine keybindings?

You could just copy the existing definition and change it to use a keymap without any bindings. Or you could clear all of the bindings in the existing keymap.

@chrisoswald
Copy link

I'm not a emacs crack, where can I find the outshine keymap?

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 a pull request may close this issue.

6 participants