From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Beck Subject: Merging Faces Date: Mon, 16 Oct 2017 22:56:30 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4CRi-0000RR-8z for emacs-orgmode@gnu.org; Mon, 16 Oct 2017 16:57:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4CRf-0006sF-7C for emacs-orgmode@gnu.org; Mon, 16 Oct 2017 16:57:10 -0400 Received: from [195.159.176.226] (port=57215 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4CRe-0006ru-WD for emacs-orgmode@gnu.org; Mon, 16 Oct 2017 16:57:07 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1e4CRG-0004zb-C2 for emacs-orgmode@gnu.org; Mon, 16 Oct 2017 22:56:42 +0200 Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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.