-
Notifications
You must be signed in to change notification settings - Fork 27
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
svg-tag for begin_src destroy the font lock in emacs 29 #48
Comments
Having a similar issue on mitsuharu's emacs-mac (railwaycat Homebrew tap, emacs 29), although it also resembles #27 (partially renders some formatting, leaves a large chunk of the file plain). Here is the section of my config that sets up svg-tag-mode: https://github.com/yaqubroli/yaqubmacs/blob/master/rougier_tmp.org Initially I was going to say that it only renders partially when I evaluate the config section that installs svg-tag-mode, but don't restart emacs. When I restarted emacs before, it would show this file without any formatting whatsoever. However, in trying to replicate the issue, I haven't been able to get this specific file to display completely plainly. It does it with some files though (maybe shorter ones?) I also get the |
I think the jit-lock error comes from the added "display" property to font lock: (add-to-list 'font-lock-extra-managed-props 'display). If you comment it (you won't get tag obviously), do you still get errors? |
I tried to comment out the "display" property that you linked to but I still have the same problem. Remark that, if that helps, using tags without regexp seems to not cause problem, i.e. using only this tag instead of the one from my first post:
So the problem seems to come from regexp computation. |
Can you try using the same regex without svg-tag (replace text with another string) ? |
Yes, I tried and if I replace with string then the font lock works, there is no problem. |
Could you try:
|
From what I see it is meant to act on TODO, but with your code I don't see anything changing for TODO's. I tried with and without |
Sorry for delay. If you paste the above code in the scratch buffer and call |
No I see no change. |
Weird. Do you have SVG support? Can you try: ;; TODO: test
(add-to-list 'font-lock-extra-managed-props 'display)
(font-lock-add-keywords nil
`(("\\(TODO\\):" 1 '(face nil display "WORKS") prepend))) If you edit the TODO, it shoudl display "WORKS". Maybe you'll need to setup a mode such as text-mode or lisp-mode (to have font-lock enabled) |
I tried and indeed this replaces TODO with WORKS. It works, as you said it should. |
Can you try:
|
This probably means the tag is nil is some situation. Can you try:
|
I tried it: I got the message |
Can you try to using it with your original org file (the one that shows SVG errors)? |
Yes.
|
Another try: #+begin_src emacs-lisp
(font-lock-add-keywords nil
`(("lisp"
0 `(face nil
display (svg-lib-tag "LISP"))
prepend)) 'append)
(font-lock-update)
#+end_src |
This works, transform the lisp to LISP when executed and message is |
Cool. This means I need to make the same prepend/append trick to svg-tag-mode.el. Do you want to try to make a PR? |
I tried to change the library with some intuition of what things should do, but I am really not fluent enough in elisp and in particular in font lock to be able to do a PR. |
No problem. I'll try to make the PR. I leave the issue open until it is fixed. Don't hesitate to remind me. |
Hello,
I recently updated to emacs 29.1 (GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8)) and I noticed that svg-tag seemd to conflict with org font-lock in my config.
Here is a minimal reproduction example:
init.el
And then the file test.org
appears like this with svg-tag:
and like this if I have no svg-tag activated (which is equivalent to what I have with emacs -q)
This happens only with this src tag that worked well before the update to emacs 29, I also have a TODO svg-tag in my config and this one works well.
This may be linked with #47 as I have the same
poping up in the messages buffer.
The text was updated successfully, but these errors were encountered: