Skip to content

Quick fix of #75#80

Open
yuhan0 wants to merge 3 commits intoalphapapa:masterfrom
yuhan0:quick-fix-75
Open

Quick fix of #75#80
yuhan0 wants to merge 3 commits intoalphapapa:masterfrom
yuhan0:quick-fix-75

Conversation

@yuhan0
Copy link
Copy Markdown

@yuhan0 yuhan0 commented Aug 26, 2020

This PR drops an obsolete workaround for remapping keys and fixes #75 by wrapping the offending code in a (when outshine-use-speed-commands ) block.

The consequence of this is that outshine-use-speed-commands (nil by default) has to be enabled before the package is loaded, and changing it afterwards does not have any effect.

yuhan0 added 3 commits August 26, 2020 22:51
- Removes the redundant `outshine-defkey` and `outshine-remap` functions since
  the command-remapping functionality has been available from Emacs 22.
- Move remapping of self-insert-command to the Key bindings section
The original appears to be taken org-self-insert-command and left unchanged by
mistake.
The only purpose of remapping self-insert-command for speed commands, so
do not remap at all if `outshine-use-speed-commands' is nil.

The remapping breaks compatibilty with multiple-cursors and potentially other
modes which depend on self-insert-command.
@alphapapa
Copy link
Copy Markdown
Owner

Thanks. However, the consequence you mention is an important one. The idiomatic way to fix this would be to define an outshine-speed-commands-mode minor mode.

@yuhan0
Copy link
Copy Markdown
Author

yuhan0 commented Aug 27, 2020

I'm aware of this, which is why it's labeled a "quick fix". Feel free to only merge the first 2 commits or implement the additional minor mode afterwards, or just leave this here for others to reference in their own forks.

The current code as I recall is incompatible with multiple-cursors and other packages which rely on self-insert-command.

Note that other packages like Evil and outline-minor mode itself also have similar caveats with vars that must be set before package load.

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.

Any way to not enable outshine keybindings?

2 participants