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

outshine-speed-commands-default: update to align with org equivalent #94

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hugo-Heagren
Copy link

Fix #91. This is a draft PR because there were two problems raised in that issue and so far it only solves one of them -- consistency between the default speed command lists in org and outshine.

The other is that -- unlike org -- outshine inserts new headings above old ones when outshine-insert-heading is called with a speed command.

I found that this is because outshine only adds a newline for the new heading after the current one if point is not at BOL. If it is, it inserts the heading there with a trailing newline, pushing the old heading onto the next line. Of course, speed commands (like i) are invoked from BOL, so this always happens.

It's a very simple fix, just remove the unless statement and merge the newline creation into the main body of the function. But before I do that, I wanted to check why there is different behaviour for BOL at all? It seems such a strange exception that I thought it might be a protection for something specific that needs keeping. Basically, is there a good reason not to make the simple fix?

Change outshine-speed-commands-default to better reflect its
counterpart in org, org-speed-commands.
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.

org/outshine speed commands consistency
1 participant