imenu-list icon indicating copy to clipboard operation
imenu-list copied to clipboard

promoting/demoting orgmode header doesn't update imenu-list

Open VladimirAlexiev opened this issue 6 years ago • 3 comments

The following actions on orgmode headers are reflected in ilist immediately:

  • add/delete heading
  • move heading up/down

But the following is not reflected:

  • promote/demote heading (i.e. move heading left/right)

imenu-list ;; Version: 0.8

VladimirAlexiev avatar Feb 23 '19 09:02 VladimirAlexiev

@bmag thanks for this package that is immensely useful for large files or docs! How did I not know about it until now?

VladimirAlexiev avatar Feb 23 '19 09:02 VladimirAlexiev

Thanks for the report, I can confirm the bug.

imenu-list tries to update the index only if the cursor has moved since the last update (see imenu-list-update), but for some reason in the scenario of promoting/demoting a heading imenu-list thinks that the cursor didn't move (location and imenu-list--last-location are equal). I'm not sure when I'll have time to debug and fix this, so I'm leaving it as a known issue for now.

bmag avatar Mar 05 '19 12:03 bmag

I can venture a guess that if both are markers, they are both moved in the same way (promoting/demoting only removes/adds a star at the beginning of line). Perhaps we need some mode-specific indication of change as well...

VladimirAlexiev avatar Mar 07 '19 16:03 VladimirAlexiev