From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anders Johansson Subject: Why does quote and verse block fontification have to override local fontification? Date: Wed, 22 Feb 2017 10:51:21 +0100 Message-ID: <871suqtuxy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgTa6-0002ax-UR for emacs-orgmode@gnu.org; Wed, 22 Feb 2017 04:51:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgTa3-0004R9-QM for emacs-orgmode@gnu.org; Wed, 22 Feb 2017 04:51:30 -0500 Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]:32792) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cgTa3-0004QX-Jc for emacs-orgmode@gnu.org; Wed, 22 Feb 2017 04:51:27 -0500 Received: by mail-lf0-x230.google.com with SMTP id l12so3250098lfe.0 for ; Wed, 22 Feb 2017 01:51:26 -0800 (PST) Received: from ajjb (pc23.kvk.uu.se. [130.238.77.23]) by smtp.googlemail.com with ESMTPSA id x75sm247709lfi.16.2017.02.22.01.51.23 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Feb 2017 01:51:23 -0800 (PST) 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 Hi, I want to fontify quote blocks (i use them a lot for note taking and writing paper) so that they stand out (and so I enable org-fontify-quote-and-verse-blocks) but it would be useful to preserve the local fontification of emphasis, links etc. inside quote blocks. This can easily be achieved with a patch like this org.el: 6096,6099c6096,6099 < ((string= block-type "quote") < (add-face-text-property beg1 (min (point-max) (1+ end1)) 'org-quote t)) < ((string= block-type "verse") < (add-face-text-property beg1 (min (point-max) (1+ end1)) 'org-verse t))) --- > ((string= block-type "quote") > (add-text-properties beg1 (min (point-max) (1+ end1)) > '(face org-quote))) > ((string= block-type "verse") > (add-text-properties beg1 (min (point-max) (1+ end1)) > '(face org-verse)))) In this invocation add-face-text-property appends org-quote to the face property, and hence all other fontification is kept. Does this interfere with something else or what people would expect? In my view it looks much better, but I guess that can depend on the appearance of org-quote and org-verse (I have them as font-lock-comment-face, just a slightly different colour, on top of which italics etc. look good). -- Anders Johansson