[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: org-->html text between @ should be red.
From: |
Uwe Brauer |
Subject: |
Re: org-->html text between @ should be red. |
Date: |
Sat, 15 Jan 2022 22:01:53 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
> I think this would work:
> (setq org-export-filter-plain-text-functions
> (remove 'my-html-red org-export-filter-plain-text-functions))
> Anyway, I recommend that you take a look at the documentation on filters
> that Timothy pointed you to, as custom filters are tremendously useful
> and versatile, and very "surgical". I use them a lot!
> You can also apply a filter only in a document, by using the #+bind
> keyword and including the function in a non-exportable code block:
> #+begin_src emacs-lisp :exports results :results none
> (defun my-html-red (text backend info)
> (when (org-export-derived-backend-p backend 'html)
> (replace-regexp-in-string "@\\([^@]*\\)@"
> "<span style=\"color:red\">\\1</span>"
> text)))
> #+end_src
> #+bind: org-export-filter-plain-text-functions (my-html-red)
> (You need to set org-export-allow-bind-keywords to non-nil)
Thanks very much!!!
Regards
Uwe
smime.p7s
Description: S/MIME cryptographic signature