emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Mark Kerr <mkerr23@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-agenda-dim-blocked-tasks don't use org-todo face
Date: Mon, 12 Dec 2022 09:59:11 +0000	[thread overview]
Message-ID: <87a63thrio.fsf@localhost> (raw)
In-Reply-To: <CAM9qJ5+C3nvbNaJyq6ofRgPsuAMcaBD=2UN-n96Kb68NBbX3Dg@mail.gmail.com>

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

Mark Kerr <mkerr23@gmail.com> writes:

> The org-todo face is used for todo keywords in non-blocked items.
> When org-agenda-dim-blocked-tasks is set to true, however, the todo keyword
> is instead displayed using org-agenda-dimmed-todo-face.
> The org-priority face, however, is still used for blocked tasks.
> Is this by design or due to an error on my part? Is there a possible
> workaround?

This appears to be an omission on Org part, related some overlay
implementation details in Emacs.

Can you try the attached patch?

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-agenda-dim-blocked-tasks-Prioritize-face-over-ot.patch --]
[-- Type: text/x-patch, Size: 1422 bytes --]

From 1bd6d8bd13deb9e7f57826ea492bbc88fddf5ee3 Mon Sep 17 00:00:00 2001
Message-Id: <1bd6d8bd13deb9e7f57826ea492bbc88fddf5ee3.1670839095.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Mon, 12 Dec 2022 12:56:11 +0300
Subject: [PATCH] org-agenda-dim-blocked-tasks: Prioritize face over other

* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): Use high overlays
priority when adding dimmed face.  Otherwise, contained overlays, like
created by `org-agenda-fontify-priorities', will take
priority (default Emacs behavior).

Reported-by: Mark Kerr <mkerr23@gmail.com>
Link: https://orgmode.org/list/CAM9qJ5+C3nvbNaJyq6ofRgPsuAMcaBD=2UN-n96Kb68NBbX3Dg@mail.gmail.com
 lisp/org-agenda.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index eda248938..05f2e3669 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4166,7 +4166,9 @@ (defun org-agenda-dim-blocked-tasks (&optional _invisible)
 	  (when todo-blocked
-	    (overlay-put ov 'face 'org-agenda-dimmed-todo-face))
+	    (overlay-put ov 'face 'org-agenda-dimmed-todo-face)
+            ;; Override other overlays.
+            (overlay-put ov 'priority 50))
 	  (when invisible
 	    (org-agenda-filter-hide-line 'todo-blocked)))
         (if (= (point-max) (line-end-position))

[-- Attachment #3: Type: text/plain, Size: 224 bytes --]

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

  reply	other threads:[~2022-12-12  9:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12  6:14 org-agenda-dim-blocked-tasks don't use org-todo face Mark Kerr
2022-12-12  9:59 ` Ihor Radchenko [this message]
2022-12-17  9:54   ` Ihor Radchenko
  -- strict thread matches above, loose matches on Subject: below --
2022-12-12 19:02 Mark Kerr
2022-12-13  7:51 ` Ihor Radchenko
2022-12-14 21:11   ` Mark Kerr
2022-12-15  8:43     ` Ihor Radchenko

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:

  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=87a63thrio.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=mkerr23@gmail.com \


* 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


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).