Skip to content

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

Draft
Hugo-Heagren wants to merge 1 commit intoalphapapa:masterfrom
Hugo-Heagren:org-speed-commands
Draft

outshine-speed-commands-default: update to align with org equivalent#94
Hugo-Heagren wants to merge 1 commit intoalphapapa:masterfrom
Hugo-Heagren:org-speed-commands

Conversation

@Hugo-Heagren
Copy link
Copy Markdown

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