0

I've seen a number of blog entries mentioning that you can replace the bullets of an org mode plain list using font locking and compose region doing something like this:

(font-lock-add-keywords 'org-mode
                    '(("^ *\\([-]\\) "
                       (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))

This was taken from here: https://zzamboni.org/post/beautifying-org-mode-in-emacs/.

This approach doesn't work for "-". It works for "*" and "+".

I've walked through it in font lock studio and I can see the right region getting hit by the right rule, but after it runs the character isn't replaced.

It's entirely possible there is something subtle in org mode or compose-region causing this given how complicated they both are.

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.