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

svg-tag-mode causing issue with src block on Emacs 29 #51

Open
wustho opened this issue Oct 1, 2023 · 1 comment
Open

svg-tag-mode causing issue with src block on Emacs 29 #51

wustho opened this issue Oct 1, 2023 · 1 comment

Comments

@wustho
Copy link

wustho commented Oct 1, 2023

Here is my emacs version:

GNU Emacs 29.1
Development version 28fb02492c24 on master branch; build date 2023-09-23.
Copyright (C) 2023 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

And here is my svg-tag-mode config:

(use-package svg-tag-mode
  :ensure t
  :hook org-mode
  :config
  (defun org-agenda-show-svg ()
    (let* ((case-fold-search nil)
	   (keywords (mapcar #'svg-tag--build-keywords svg-tag--active-tags))
	   (keyword (car keywords)))
      (while keyword
	(save-excursion
	  (while (re-search-forward (nth 0 keyword) nil t)
	    (overlay-put (make-overlay
			  (match-beginning 0) (match-end 0))
			 'display  (nth 3 (eval (nth 2 keyword)))) ))
	(pop keywords)
	(setq keyword (car keywords)))))
  (setq svg-tag-tags
	'(("TODO" . ((lambda (tag) (svg-tag-make tag :face '(:foreground "IndianRed" :weight bold) :inverse t))))
	  ("NEXT" . ((lambda (tag) (svg-tag-make tag :face '(:foreground "#007acc" :weight bold) :inverse t))))
	  ("WAIT" . ((lambda (tag) (svg-tag-make tag :face '(:foreground "GoldenRod" :weight bold) :inverse t))))
	  ("PROJ" . ((lambda (tag) (svg-tag-make tag :face '(:foreground "DarkMagenta" :weight bold) :inverse t))))
	  ("LOOP" . ((lambda (tag) (svg-tag-make tag :face '(:foreground "Salmon" :weight bold) :inverse t))))
	  ("SMDY" . ((lambda (tag) (svg-tag-make tag :face '(:foreground "MediumTurquoise" :weight bold) :inverse t))))
	  ("CANC" . ((lambda (tag) (svg-tag-make tag :face '(:foreground "DarkGrey" :weight bold :strike-through t) :inverse t))))
	  ("DONE" . ((lambda (tag) (svg-tag-make tag :face '(:foreground "DarkSeaGreen" :weight bold :strike-through t) :inverse t))))
	  ("\\[#A\\]" . ((lambda (tag) (svg-tag-make "(󰄿)" :face '(:foreground "IndianRed" :weight bold) :inverse t))))
	  ("\\[#B\\]" . ((lambda (tag) (svg-tag-make "(󰅃)" :face '(:foreground "DarkOrange" :weight bold) :inverse t))))
	  ("\\[#C\\]" . ((lambda (tag) (svg-tag-make "(󰅀)" :face '(:foreground "Grey" :weight bold) :inverse t))))
	  ;; (":\\([@A-Za-z0-9]+\\)" . ((lambda (tag) (svg-tag-make tag))))
	  ;; (":\\([@A-Za-z0-9]+[ \-]\\)" . ((lambda (tag) tag)))
	  ))
  (add-hook 'org-agenda-finalize-hook #'org-agenda-show-svg)
  )

And here is the result:
Screenshot_20231001_114208

Variable containing underscore displayed like subscript.

My current workaround is:

(setq org-use-sub-superscripts "{}")

But seems like this shouldn't happen.

@rougier
Copy link
Owner

rougier commented Oct 13, 2023

I think this might be due to this line: (add-to-list 'font-lock-extra-managed-props 'display)
Can you check that even without svg-tag-mode, evaluating this line reproduces the problem?

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

2 participants