reddit / emacs

org-modern (font lock) interaction with visual lines and org-indent-mode

StrangeNegotiation52 · 2022-11-30 06:26
When I enable the three modes in the title, moving up and down with the arrow keys places the cursor in the wrong column when on a line with substituted symbols. The offset seems to be related to the org-indent depth. I've searched and searched but have not found a solution other than disabling one of the three modes. Here's a minimal repro. Anyone dealt with this in their config or have advice on how to hunt down the problem? I'm not even sure which project to make a bug report in. (use-package org :mode (("\\.org$" . org-mode)) :ensure org-plus-contrib :hook ((org-mode . org-indent-mode) (org-mode . visual-line-mode)) ; alternatively, comment the following lines and uncomment org-modern :config (add-to-list 'font-lock-extra-managed-props 'display) (font-lock-add-keywords 'org-mode '(("^\\(-\\)\\( \\)" 1 '(face nil display "•")))) ) ; (use-package org-modern ; :ensure t ; :after org ; :hook ((org-mode . (lambda () (org-modern-mode))))) Try on this file. When the cursor is on item 1 (which has a prettified bullet), moving down to item 2, then up again places the cursor 2 to the right of where it was before. * asd - item 1 - item 2
sogo00 · 2022-11-30 15:23
I can't help you directly. but reading the README of org-modern the description (somewhere in the middle) says: >Note that org-indent-mode interferes with some of the style elements applied by org-modern-mode, e.g., the block brackets in the fringe. Which means the author is aware of the shortcomings, maybe open an issue to hear about possible workarounds?
paretoOptimalDev · 2022-11-30 16:06
Try: https://github.com/jdtsmith/org-modern-indent/ More context: https://github.com/minad/org-modern/issues/7
StrangeNegotiation52 · 2022-12-13 02:34
Thanks for the suggestion! From the links in the other comment, seems like the right people to ask are the maintainers of org-indent. Might do that in future.
StrangeNegotiation52 · 2022-12-13 02:34
Thanks for the pointers!