From: Anders Johansson <mejlaandersj@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Why does quote and verse block fontification have to override local fontification?
Date: Wed, 22 Feb 2017 10:51:21 +0100 [thread overview]
Message-ID: <871suqtuxy.fsf@gmail.com> (raw)
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
next reply other threads:[~2017-02-22 9:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-22 9:51 Anders Johansson [this message]
2017-02-22 10:51 ` Why does quote and verse block fontification have to override local fontification? Nicolas Goaziou
2017-02-22 12:18 ` [PATCH 1/1] org.el: Make faces org-quote and org-verse be appended Anders Johansson
2017-02-23 13:19 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871suqtuxy.fsf@gmail.com \
--to=mejlaandersj@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).