* Merging Faces
@ 2017-10-16 20:56 Florian Beck
0 siblings, 0 replies; only message in thread
From: Florian Beck @ 2017-10-16 20:56 UTC (permalink / raw)
To: emacs-orgmode
Hello everyone,
how do you add custom face properties to an org buffer?
I want to generate org buffers automatically (displaying verious entries
and properties). Specifically, I want the resulting buffer in org mode
to handle links, equations, and export. But I want also to add custom
background or fonts to parts of the buffer.
The easiest way to see the problem is this:
(let ((entry
(concat
"any "
(propertize "link" 'font-lock-face '(:family "DejaVu Sans Mono"))
" like [[file:some-file]] or equations like
\\(\\sqrt{\\frac{1}{(x+y)^2\\), but also /italics/ and *bold text*
should be displayed correctly;")))
(switch-to-buffer-other-window
"*fb-merging-example")
(erase-buffer)
(insert (propertize (concat "1. " entry)
'font-lock-face '(:background "yellow")
'underline t))
(insert "\n2. other font:")
(insert (propertize entry 'font-lock-face '(:family "Symbola")))
(org-mode))
Two problems:
1. "link" has not the right font. I guess `propertize' doesn't merge
face. Is there a way to accomplish this?
2. Links and equations don't have the desired background.
Any help appreciated.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-16 20:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-16 20:56 Merging Faces Florian Beck
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).