I ran into an issue when promoting a header if it contains a plain list (with or without checkboxes). While trying to figure out the cause, I found a way to fix it, but I'm not sure if this is the proper way to fix it, so please reject this PR if it's not :). The issue is as follows. Say I have the following org file:
Depending on the number of items, the result will be different.
I used git bisect to find the commit where this behaviour started. I found that prior to commit 0baf1792d7de805b19e67f0b094926a988c9ca6f, it worked fine. After this commit, things started behaving erratically, but in a different way than described above. The current behaviour started in commit 176bc344591b964c9f59ca2c957c3cf55d190c68.
The behaviour described by the commit message of the latter commit ("indent checkboxes relative to their parents") still seems to work after my change: if the list is not properly aligned with its header, it will be aligned after a promotion or demotion. But I'm new to org, so there may be some corner cases I'm not aware of.
I hope this helps. Let me know if you need more information.
There are a lot of issues related with promoting and demoting. This, and that list level is always messed up. Thanks very much for spotting the code responsible for this issue. :smile:
Hi!
I ran into an issue when promoting a header if it contains a plain list (with or without checkboxes). While trying to figure out the cause, I found a way to fix it, but I'm not sure if this is the proper way to fix it, so please reject this PR if it's not :). The issue is as follows. Say I have the following org file:
Now, if I promote Header 2 using
<<
, I get the following file:Depending on the number of items, the result will be different.
I used git bisect to find the commit where this behaviour started. I found that prior to commit 0baf1792d7de805b19e67f0b094926a988c9ca6f, it worked fine. After this commit, things started behaving erratically, but in a different way than described above. The current behaviour started in commit 176bc344591b964c9f59ca2c957c3cf55d190c68.
The behaviour described by the commit message of the latter commit ("indent checkboxes relative to their parents") still seems to work after my change: if the list is not properly aligned with its header, it will be aligned after a promotion or demotion. But I'm new to org, so there may be some corner cases I'm not aware of.
I hope this helps. Let me know if you need more information.