emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Document changes of headline fontification introduced in 979e82fc3
@ 2020-12-21 15:32 Ihor Radchenko
  2020-12-21 16:41 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Ihor Radchenko @ 2020-12-21 15:32 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]


I just got someone confused [1] about the new headline fontification
behaviour when all the headline components inherit the headline face.
I think it will be useful to document the change in ORG-NEWS and show
how to restore the old appearance.

Patch attached.

[1] https://github.com/yantar92/org/issues/8

Best,
Ihor


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Document-changes-of-headline-fontification-introduce.patch --]
[-- Type: text/x-diff, Size: 2032 bytes --]

From 4fa9c08fabb17bddd760ec8491c140b7d1d1c91f Mon Sep 17 00:00:00 2001
From: Ihor Radchenko <yantar92@gmail.com>
Date: Mon, 21 Dec 2020 23:26:49 +0800
Subject: [PATCH] Document changes of headline fontification introduced in
 979e82fc3

* etc/ORG-NEWS (=org-goto-first-child= now works before first
heading): Document that all the headline components inherit the
headline face instead of default face.  Provide example how to restore
the old behaviour.
---
 etc/ORG-NEWS | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index d685f30b6..fd19b2f1a 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -157,6 +157,35 @@ headings in the buffer.
 Previously =org-goto-first-child= would do nothing before first
 heading, except return nil.
 
+*** Faces of all the heading text elements now conform to the headline face
+
+In the past, faces of todo keywords, emphasised text, tags, and
+priority cookies inherited =default= face.  The resulting headline
+fontification was not always consistent, as discussed in [[https://lists.gnu.org/archive/html/emacs-orgmode/2020-09/msg00331.html][this bug
+report]].  Now, the relevant faces adapt to face used to fontify the
+current headline level.
+
+Users who prefer to keep the old behaviour should change their face
+customisation explicitly stating that =default= face is inherited.
+
+Example of old face customisation:
+
+#+begin_src emacs-lisp
+(setq org-todo-keyword-faces '(("TODO"
+                                :background "chocolate"
+                                :height 0.75)))
+#+end_src
+
+To preserve the old behaviour the above customisation should be
+changed to
+
+#+begin_src emacs-lisp
+(setq org-todo-keyword-faces '(("TODO"
+                                :inherit default
+                                :background "chocolate"
+                                :height 0.75)))
+#+end_src
+
 * Version 9.4
 ** Incompatible changes
 *** Possibly broken internal file links: please check and fix
-- 
2.26.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Document changes of headline fontification introduced in 979e82fc3
  2020-12-21 15:32 [PATCH] Document changes of headline fontification introduced in 979e82fc3 Ihor Radchenko
@ 2020-12-21 16:41 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2020-12-21 16:41 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

Hi Ihor,

Ihor Radchenko <yantar92@gmail.com> writes:

> I just got someone confused [1] about the new headline fontification
> behaviour when all the headline components inherit the headline face.
> I think it will be useful to document the change in ORG-NEWS and show
> how to restore the old appearance.

Applied (1f4ea532a), thanks a lot.

-- 
 Bastien


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-21 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 15:32 [PATCH] Document changes of headline fontification introduced in 979e82fc3 Ihor Radchenko
2020-12-21 16:41 ` Bastien

Code repositories for project(s) associated with this 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).