From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4FNaK1Q8pV6zFQAA0tVLHw (envelope-from ) for ; Sun, 26 Apr 2020 07:46:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gATeKVs8pV60dwAAB5/wlQ (envelope-from ) for ; Sun, 26 Apr 2020 07:46:35 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C9D6F9422D0 for ; Sun, 26 Apr 2020 07:46:34 +0000 (UTC) Received: from localhost ([::1]:54290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSbzl-0005qe-EL for larch@yhetil.org; Sun, 26 Apr 2020 03:46:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55044) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSbzG-0005qT-Uf for emacs-orgmode@gnu.org; Sun, 26 Apr 2020 03:46:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSbzF-0007cB-SE for emacs-orgmode@gnu.org; Sun, 26 Apr 2020 03:46:02 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:34779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSbzF-0007c4-Fk for emacs-orgmode@gnu.org; Sun, 26 Apr 2020 03:46:01 -0400 Received: by mail-pg1-x52c.google.com with SMTP id o15so7053686pgi.1 for ; Sun, 26 Apr 2020 00:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=mTXgoqlshOOv1GBWjwkDkk4JnWFe65bRts6vlnxA49A=; b=cc07MbJajMBw0bJmwSfMBIiFV7DkhR8tqWI8U5oB44wu45XgseExFe9kXFd2YUX9mA rE4NCPb3urtm346m53Apbj9E40R6BUF7jGkBXVOXRNOhj11FTiYSKa84bki/vNGVMLjf 92Xvd7F5kc33uyrh6oOaQO1cFwsnWkzO3L6ZUAXsjUUY+0iqv8CkD8jkuIzeDxjSJa1+ Hhc75HZ0dk9WKPJ6gxtmSIh7iMAjHBRxXpspzzI9YScdlcLmPQ1yJzT8UZQCOuUfYroc 1vZ2+cKz+GTSYzvxwu5OcMkRxJYkKGGfAL2g9/Wped4adeaQ08mvYnQRERrfxmBNE2SJ xMTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=mTXgoqlshOOv1GBWjwkDkk4JnWFe65bRts6vlnxA49A=; b=S/uiUEQ59UWrlejpGwPuN2ISp7COBraTRlort/dGWfiIOjUxPiGBu/DvBysFxhDIBx aDj7fAcLkCHvnN5Dv0fxQVPchNpIxFf3AyrpLQPdyYSXSW7PU247o9scpLGlQ9peYmDL e8tsfZNTTzJFWdw5AXRB8Mg+0U4ydeN5xmbIYkFY2bckRKkpja3DmeVe5uVEgc9WDeOu Zkka6Cih9FLh1kdkK1UwFHoFNhaWr7E4+uqU/dKYHe7RK7cIzRPPwP/hNU5Mc8E46glP AgcsPshEmVWDjkJDxtQgOQs9xgDCSugJ5YFtThU6MzbxCQH01Iv/eaE/fO1UnnfEhWXO RrXQ== X-Gm-Message-State: AGi0PuapGpkAWima7mCCcpQKp4jxCPrSbypf+/FcH4M5/0o30QTcLq+g iXxPEtkkLNjlqy3GrFcOmfY= X-Google-Smtp-Source: APiQypKC8qWFt8BYsxmSlRtBr8Q8rAQ/YgLtT9+vUKNXxCLcWrJaDF50QgnyK1HJc14A29rk968iGA== X-Received: by 2002:a63:4824:: with SMTP id v36mr15014923pga.398.1587887159915; Sun, 26 Apr 2020 00:45:59 -0700 (PDT) Received: from localhost ([210.3.160.222]) by smtp.gmail.com with ESMTPSA id n30sm9577763pfq.88.2020.04.26.00.45.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Apr 2020 00:45:59 -0700 (PDT) From: Ihor Radchenko To: Protesilaos Stavrou , emacs-orgmode@gnu.org Subject: Re: Adaptive Org faces in headings? In-Reply-To: <878sii4yj7.fsf@protesilaos.com> References: <878sii4yj7.fsf@protesilaos.com> Date: Sun, 26 Apr 2020 15:42:02 +0800 Message-ID: <87imhmd779.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=yantar92@gmail.com; helo=mail-pg1-x52c.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::52c X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 X-Spam-Score: -0.21 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=cc07MbJa; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scan-Result: default: False [-0.21 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.55859065266023]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; FREEMAIL_FROM(0.00)[gmail.com]; DWL_DNSWL_BLOCKED(0.00)[gmail.com:dkim,209.51.188.17:from]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.20), country: US(-0.00), ip: 209.51.188.17(-0.56)]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_NEQ_ENVFROM(0.00)[yantar92@gmail.com,emacs-orgmode-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[protesilaos.com:email,sutd.edu.sg:email]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[emacs-orgmode@gnu.org]; HAS_LIST_UNSUB(-0.01)[]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_SEVEN(0.00)[7]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: T8qds4RQePYT > Does the community know of a solution to this issue? Not precisely answer to your question, but I use the code below to get more complete fontification in agenda. The code does not consider heading level, but can be easily modified to do so [ (insert "* ") -> (insert (s-concat (make-string level ?*) " ")) ] (define-advice org-agenda-format-item (:filter-args (&rest args) fontify-org) "Force fontify ageda item. (hack)" (cl-multiple-value-bind (extra txt level category tags dotime remove-re habitp) (car args) (with-temp-buffer (cl-letf (((symbol-function 'yant/process-att-abbrev) #'identity) ((symbol-function 'yant/process-att-id-abbrev) #'identity)) ;; expanding sometimes causes errors when attempting to access ancestors (org-mode) (insert "* " txt "\t" (or (and tags (s-join ":" `(nil ,@(cl-remove-duplicates tags) nil))) "") "\n") (font-lock-fontify-buffer) (goto-char (point-min)) (looking-at "^\\* \\(\\([^\t]+\\)[ ]+\\(:\\([[:alnum:]_@#%:]+\\):\\)*\\)[ ]*$") (setq txt (match-string 2)) (setq tags (and tags (s-split ":" (match-string 3) 't)))) (list extra txt level category tags dotime remove-re habitp))) ) Protesilaos Stavrou writes: > Dear all, > > I have noticed that Org faces that combine with headings do not adapt to > their context. This applies to keywords, priority cookies, links, and > possibly other elements as well. > > For example, a "todo" keyword (`org-todo' face) will not scale in size > to match that of the heading level (`org-level-N' face) if the latter > uses a `:height' property. Same principle for keywords not inheriting > the heading's background, overline, etc. > > My expectation is to allow `org-level-N' to pass its attributes to any > element on the same line, unless that element has conflicting face > attributes of its own. So, in my example, the heading could pass its > height to the "todo" keyword when the `org-todo' face does not define a > `:height' of its own. Otherwise it would refrain from overriding that > attribute. > > Does the community know of a solution to this issue? > > I am running: > > * Org mode version 9.3. > > * GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.17, > cairo version 1.17.3) of 2020-04-20. > > Best regards, > Protesilaos > > > -- > Protesilaos Stavrou > protesilaos.com > -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg