emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adaptive Org faces in headings?


From: Protesilaos Stavrou
Subject: Re: Adaptive Org faces in headings?
Date: Sun, 06 Sep 2020 22:58:54 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hello Bastien!

Bastien <bzg@gnu.org> [2020-09-05, 16:47 +0200]:

>  Could you insert a small picture showing where faces customization
> don't interact nicely, e.g. when using different heights for org-todo
> org-level-1?

Please see attached.  This is on 'emacs -Q'.  What I did:

- C-x C-f test.org
- C-x 2
- C-x b *scratch*
- Insert and then evaluate each of:
  + (set-face-attribute 'org-level-1 nil :height 2.0)
  + (set-face-attribute 'org-level-2 nil :background "#e0e0e0" :height 1.5)
- C-x o
- Insert some headings:
  + * TODO [#A] This is a test                                              
:tag:
  + ** TODO [#A] This is a test                                             
:tag:
  + * [[https://www.gnu.org/][links also]] This is a test                   
:tag:

> It would help deciding whether this is an issue for Org or for
> Emacs in general regarding faces interaction.

The feedback I have received thus far suggests that it may have to do
with how Org configures its font locking in org-set-font-lock-defaults.

In particular:

1. The org-tag has an OVERRIDE argument in the form of 'prepend'
   
https://code.orgmode.org/bzg/org-mode/src/5417e384ebab58e560fe6a80eee7bc58b1ef8645/lisp/org.el#L5625

   So it is merged with the underlying face, as shown in the screenshot.

2. While keywords have a 't' argument which overrules the underlying
   face (it would behave the same as tags with 'prepend'):
   
https://code.orgmode.org/bzg/org-mode/src/5417e384ebab58e560fe6a80eee7bc58b1ef8645/lisp/org.el#L5647

Not sure about priority cookies and links.

This is what I have for now.  Thank you for looking into this!

My system details:

- GNU Emacs 27.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.22,
  cairo version 1.17.3) of 2020-08-14

- Org mode version 9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)

Best regards
Protesilaos

-- 
Protesilaos Stavrou
protesilaos.com

Attachment: Screenshot from 2020-09-05 18-57-24.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]