Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link fontification issues with a costume config #166

Open
oatmealm opened this issue Feb 17, 2023 · 8 comments
Open

link fontification issues with a costume config #166

oatmealm opened this issue Feb 17, 2023 · 8 comments

Comments

@oatmealm
Copy link

I'm not sure where to start looking, but I think what I'm seeing is that the transclusion links are not been fontified for some reason... the same file works perfectly fine in doomemacs.

Current configuration... I understand org-transclusion-font-lock is activated by default, but I added it to check. It makes no difference in either case.

(use-package org-transclusion
  :straight (:host github :repo "nobiot/org-transclusion")
  :after org
  :general
  (+map :infix "t"
    "T" #'org-transclusion-mode)
  :config
  (add-to-list 'org-transclusion-extensions 'org-transclusion-font-lock)
  (require 'org-transclusion-font-lock))

When the mode is active, it's value is:

org-transclusion-extensions is a variable defined in ‘org-transclusion.el’.

Its value is (org-transclusion-src-lines org-transclusion-font-lock)

image

@nobiot
Copy link
Owner

nobiot commented Feb 17, 2023

Can you try rever-buffer and see if it fontifies the transclusions?

@oatmealm
Copy link
Author

Can you try rever-buffer and see if it fontifies the transclusions?

Thanks! Struggling to figure out. I had org-modern enabled. I disabled it and it seemed to work briefly but now it doesn't. Will update once I see something which makes sense.

@nobiot
Copy link
Owner

nobiot commented Feb 18, 2023

"briefly" is weird. What I have observed is that when you have a buffer already there and fontification is already done, Org-transclusion may not properly fontify the transclusion. But killing the buffer and then opening it again (or I believe revert does the same thing) re-applies fontification, this second time including Org-transclusion's custom fontification.

@stardiviner
Copy link

I got a similar might not related problem, I use org-modern-mode too. When I have this minor mode enabled, the org-transclusion left margin is not set. When I disable this minor mode, the left margin appears correctly by org-transclusion.

CleanShot 2023-02-26 at 21 58 33

@nobiot
Copy link
Owner

nobiot commented Feb 27, 2023

I'm aware of the "conflict" with org-modern. Including org-indent-mode, we are competing for the same text property. I have managed to "fix" the case for org-indent-mode and learned to co-exist. I don't how to do so with org-modern yet. It seems to aggressively remove what other packages might have done, and insert its own config -- I only had a quick scan of the code, I can be totally wrong.

To be honest, I do not use org-modern so personally I am not very keen to pursue this issue. We could open a dialog and ask for help for co-existence, but currently I lack time and interest to do so.

Happy for others to do so, though. It will be good to have a generic solution for co-existence.

@stardiviner
Copy link

@nobiot Sure, I currently disabled org-modern, it's not very necessary. I will take a thinking over this problem. And might send email to org-mode mailing list to discuss this problem.

@stardiviner
Copy link

@nobiot I have asked in org-mode mailing list about this competing problem. Ihor raised three solutions, you might want to take reference:

https://lists.gnu.org/archive/html/emacs-orgmode/2023-02/msg00734.html

@nobiot
Copy link
Owner

nobiot commented Mar 4, 2023

@stardiviner Thank you for this... I see. It's not something I can tackle soon. I'd need to understand the options suggested there first... PR or more discussions in this direction are welcome (perhaps in a separate issue or in the Discussion section).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants