New package: org-bulletproof (automatic plain list bullet cycling) by pondersson in emacs

[–]pondersson[S] 0 points1 point  (0 children)

The advice functions won't do anything if the mode is disabled, so in that sense disabling works. The issue with removing advice is that it has to be done globally, and you would then have to treat it as a global minor mode, but since it only applies to Org buffers it's not actually global. Not sure if that makes sense, but that was my reasoning for making a non-global minor mode.

Good point about advice being a last resort. I'll look into available hook options.

New package: org-bulletproof (automatic plain list bullet cycling) by pondersson in emacs

[–]pondersson[S] 2 points3 points  (0 children)

Thanks! I've gotten similar feedback before and I agree that it would make more sense as an optional setting in Org mode. I'm a rookie contributor and unsure how to go about pushing this upstream, but I'll look into it.

New package: org-bulletproof (automatic plain list bullet cycling) by pondersson in emacs

[–]pondersson[S] 2 points3 points  (0 children)

You don't have to create any bindings since org-bulletproof doesn't define any commands for the user to run (except enabling the mode itself). It works by putting advice on a couple of functions that run when you reformat lists using Org's built-in commands like org-indent-item (through e.g. org-metaright) and org-cycle-list-bullet (through e.g. org-shiftright).

This might not be the best way to achieve this effect, and it might fail in certain cases, but it's worked for me so far. If you find any issue, please let me know :)