From: Kyle Meyer <kyle@kyleam.com>
To: Martin Kampas <martin.kampas@ubedi.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: Incorrect done TODO keywords highlighting in column view
Date: Sun, 18 Oct 2020 17:31:34 -0400 [thread overview]
Message-ID: <87k0vnz0eh.fsf@kyleam.com> (raw)
In-Reply-To: <7117090.b6naEkYVYe@gt1>
Martin Kampas writes:
> Hi,
>
> In columns view, all TODO keywords except those with face set explicitly with org-todo-
> keyword-faces are red. Done keywords should be green.
[...]
> Subject: [PATCH] org-colview: Fix done TODO keywords highlighting
>
> * lisp/org-colview.el (org-columns--overlay-text): Populate
> org-done-keywords from org-done-keywords-for-agenda or the done keywords
> will use the same face as not-done keywords.
> ---
> lisp/org-colview.el | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/org-colview.el b/lisp/org-colview.el
> index e50a4d7c8..827f57e5e 100644
> --- a/lisp/org-colview.el
> +++ b/lisp/org-colview.el
> @@ -365,7 +365,9 @@ ORIGINAL is the real string, i.e., before it is modified by
> org-tags-special-faces-re
> (lambda (m) (propertize m 'face (org-get-tag-face m)))
> v nil nil 1)))
> - ("TODO" (propertize v 'face (org-get-todo-face original)))
> + ("TODO"
> + (let ((org-done-keywords org-done-keywords-for-agenda))
> + (propertize v 'face (org-get-todo-face original))))
> (_ v)))))
Thanks for the patch.
Based on the description, it wasn't clear to me what problem this is
addressing. Using the maint branch and no custom configuration, I
visited a file with this content:
--8<---------------cut here---------------start------------->8---
* TODO a
* DONE b
--8<---------------cut here---------------end--------------->8---
In that buffer, org-done-keywords was ("DONE"), and
(org-get-todo-face "DONE")
returned org-done. Calling org-columns fontified DONE as expected.
Using your patch, DONE was instead incorrectly fontified with org-todo
because org-done-keywords-for-agenda was nil. So, in this context, it
seems like your patch is introducing the problem it claims to be
solving.
Based on org-done-keywords-*for-agenda* being used, I then guessed this
had to do with column view in the agenda. And indeed if I call
org-agenda-columns in an agenda view that contains "DONE b", it's
fontified incorrectly.
To fix the fontification in agenda buffers while not interfering with it
in Org buffers, perhaps the let-binding of org-done-keywords to
org-done-keywords-for-agenda should be moved to the org-agenda-columns
command. What do you think?
next prev parent reply other threads:[~2020-10-18 21:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-09 5:50 Bug: Incorrect done TODO keywords highlighting in column view Martin Kampas
2020-10-18 21:31 ` Kyle Meyer [this message]
2020-10-19 5:29 ` Martin Kampas
2020-10-20 4:43 ` 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=87k0vnz0eh.fsf@kyleam.com \
--to=kyle@kyleam.com \
--cc=emacs-orgmode@gnu.org \
--cc=martin.kampas@ubedi.net \
/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.