emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Protesilaos Stavrou <info@protesilaos.com>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Adaptive Org faces in headings?
Date: Sun, 06 Sep 2020 22:58:54 +0300	[thread overview]
Message-ID: <87h7sawubl.fsf@protesilaos.com> (raw)
In-Reply-To: <875z8sgu1g.fsf@gnu.org> (Bastien's message of "Sat, 05 Sep 2020 16:47:07 +0200")

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

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 #2: Screenshot from 2020-09-05 18-57-24.png --]
[-- Type: image/png, Size: 71161 bytes --]

  reply	other threads:[~2020-09-06 19:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26  5:16 Adaptive Org faces in headings? Protesilaos Stavrou
2020-04-26  7:42 ` Ihor Radchenko
2020-09-05 14:47 ` Bastien
2020-09-06 19:58   ` Protesilaos Stavrou [this message]
2020-09-05 21:39 ` Diego Zamboni
2020-09-07  4:08   ` Protesilaos Stavrou
2020-09-09  8:49     ` Bastien
2020-09-09  9:11       ` TEC
2020-09-09 14:44         ` Bastien
2020-09-12  7:33       ` Protesilaos Stavrou
2020-09-17  8:25         ` [PATCH] " Ihor Radchenko
2020-09-18  9:52           ` Protesilaos Stavrou
2020-09-20  3:24             ` Sheng Yang
2020-10-27 18:30             ` Rob Davenport
2020-10-28 15:37               ` Rob Davenport
2020-09-21 16:05           ` Mikhail Skorzhinskii
2020-09-23 12:25           ` Bastien
2020-09-23 12:28             ` Protesilaos Stavrou
2020-09-26  6:31             ` Bastien
2020-10-05 10:11               ` Protesilaos Stavrou
2020-10-07  4:20                 ` Kyle Meyer
2020-10-07  5:29                   ` Protesilaos Stavrou
2020-10-08  3:37                     ` Kyle Meyer

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=87h7sawubl.fsf@protesilaos.com \
    --to=info@protesilaos.com \
    --cc=bzg@gnu.org \
    --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).