jdtsmith / outli

Simple comment-based outline folding for Emacs
GNU General Public License v3.0
104 stars 6 forks source link

Outline-promote and Outline-demote not idempotent #1

Closed jsilve24 closed 2 years ago

jsilve24 commented 2 years ago

Take a top-line heading and run outline-promote, then run outline-demote. Doing this I get an error outline-up-heading: Already at top level of the outline.

Seems like it should be able to undo what was outline-promote did...

Thanks for this package its great!

jdtsmith commented 2 years ago

This is a feature of outline, presumably to let you know you can't promote any further (you can't have non-positive depth). Since it didn't do any promotion, a subsequent demote will not leave the depth unchanged. I think that's what most people would expect, and likely why outline implements it that way. Glad you are enjoying.