all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Protesilaos Stavrou <info@protesilaos.com>
To: Bastien <bzg@gnu.org>
Cc: Diego Zamboni <diego@zzamboni.org>, Org-mode <emacs-orgmode@gnu.org>
Subject: Re: Adaptive Org faces in headings?
Date: Sat, 12 Sep 2020 10:33:20 +0300	[thread overview]
Message-ID: <87o8mbxxdr.fsf@protesilaos.com> (raw)
In-Reply-To: <87k0x3l4h2.fsf@gnu.org> (Bastien's message of "Wed, 09 Sep 2020 10:49:29 +0200")

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

Bastien <bzg@gnu.org> [2020-09-09, 10:49 +0200]:

> Protesilaos Stavrou <info@protesilaos.com> writes:
>
>> Diego Zamboni <diego@zzamboni.org> [2020-09-05, 23:39 +0200]:
>>
>>> I had seen the same in my setup. I recently started using Doom Emacs
>>> (https://github.com/hlissner/doom-emacs/) and was pleasantly surprised
>>> to discover that todo and tag faces scale according to the headline in
>>> which they are. I don't know precisely how this is done, but there are
>>> some hints here, you might use it as a starting point:
>>> https://github.com/hlissner/doom-emacs/blob/develop/modules/lang/org/config.el#L146-L175
>>
>> I noticed that the doom-themes have some extra code to fontify Org.[0]
>> It also has some opinionated extras that do not belong to the issue I
>> raised.  I am curious whether this was ever shared/discussed on this
>> mailing list.
>
> I can't remember any such discussion.
>
> (In general, it would be good if downstream enhancements like these
> could be shared upstream, we are generally quite grateful for help!)
>
> In any case, thanks for reporting this issue, I confirm we should
> work on it for a future release.
>
> Patches welcome,

Hello again!

I am not sure I can help with the patch, but at least I can share some
more user feedback.

Please see the attached screenshots that could help improve our
understanding of the issue.  The gist is that Org already has working
code that adapts some faces to the underlying heading style (in this
case font height and weight).

To reproduce this demo on emacs -Q:

+ Open an org-mode file, e.g. C-x C-f /tmp/test.org
+ Insert a level 1 heading:

  * TODO [#A] Do they adapt ~test-heading-faces~ and =another-test=?

+ Evaluate each of the expressions in the code block and notice how the
  heading's faces adapt to it:

#+begin_src emacs-lisp
(set-face-attribute 'org-level-1 nil :height 3.0 :weight 'normal)
(set-face-attribute 'org-level-1 nil :weight 'bold)
#+end_src

This is in addition to what I noted in a previous message:
https://lists.gnu.org/archive/html/emacs-orgmode/2020-09/msg00331.html

Best regards,
Protesilaos

-- 
Protesilaos Stavrou
protesilaos.com


[-- Attachment #2: org-faces-adapt-heading-height.png --]
[-- Type: image/png, Size: 51517 bytes --]

[-- Attachment #3: org-faces-adapt-heading-weight.png --]
[-- Type: image/png, Size: 50806 bytes --]

  parent reply	other threads:[~2020-09-12  7:34 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
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 [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8mbxxdr.fsf@protesilaos.com \
    --to=info@protesilaos.com \
    --cc=bzg@gnu.org \
    --cc=diego@zzamboni.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.