* Bug: Incorrect done TODO keywords highlighting in column view
@ 2020-10-09 5:50 Martin Kampas
2020-10-18 21:31 ` Kyle Meyer
0 siblings, 1 reply; 4+ messages in thread
From: Martin Kampas @ 2020-10-09 5:50 UTC (permalink / raw
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]
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.
Patch below.
BR,
Martin
From a4df0da1057afbe90ea0e457158082b15386a164 Mon Sep 17 00:00:00 2001
From: Martin Kampas <martin.kampas@ubedi.net>
Date: Fri, 9 Oct 2020 07:43:17 +0200
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)))))
(defvar org-columns-header-line-remap nil
--
2.28.0
[-- Attachment #2: Type: text/html, Size: 4536 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: Bug: Incorrect done TODO keywords highlighting in column view
2020-10-09 5:50 Bug: Incorrect done TODO keywords highlighting in column view Martin Kampas
@ 2020-10-18 21:31 ` Kyle Meyer
2020-10-19 5:29 ` Martin Kampas
0 siblings, 1 reply; 4+ messages in thread
From: Kyle Meyer @ 2020-10-18 21:31 UTC (permalink / raw
To: Martin Kampas; +Cc: emacs-orgmode
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?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug: Incorrect done TODO keywords highlighting in column view
2020-10-18 21:31 ` Kyle Meyer
@ 2020-10-19 5:29 ` Martin Kampas
2020-10-20 4:43 ` Kyle Meyer
0 siblings, 1 reply; 4+ messages in thread
From: Martin Kampas @ 2020-10-19 5:29 UTC (permalink / raw
To: Kyle Meyer; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1088 bytes --]
Hi Kyle,
You are right, I completely forgot about columns view under the "regular" buffers.
Updated patch below.
BR,
Martin
From 288c157ea95e00de4b508e0fd257b51857e097b9 Mon Sep 17 00:00:00 2001
From: Martin Kampas <martin.kampas@ubedi.net>
Date: Mon, 19 Oct 2020 07:22:57 +0200
Subject: [PATCH] org-colview: Fix done keywords highlighting in agenda buffers
* lisp/org-colview.el (org-agenda-columns): Populate
org-done-keywords from org-done-keywords-for-agenda or the done keywords
will use the same face as those not-done.
---
lisp/org-colview.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index e50a4d7c8..565bdb2dd 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -1586,6 +1586,7 @@ PARAMS is a property list of parameters:
(move-marker org-columns-begin-marker (point))
(setq org-columns-begin-marker (point-marker)))
(let* ((org-columns--time (float-time))
+ (org-done-keywords org-done-keywords-for-agenda)
(fmt
(cond
((bound-and-true-p org-overriding-columns-format))
--
2.28.0
[-- Attachment #2: Type: text/html, Size: 3493 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-20 4:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-09 5:50 Bug: Incorrect done TODO keywords highlighting in column view Martin Kampas
2020-10-18 21:31 ` Kyle Meyer
2020-10-19 5:29 ` Martin Kampas
2020-10-20 4:43 ` Kyle Meyer
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.