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 yNnPBmO0jF8FIAAA0tVLHw (envelope-from ) for ; Sun, 18 Oct 2020 21:32:19 +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 QOiOAmO0jF8UYQAAB5/wlQ (envelope-from ) for ; Sun, 18 Oct 2020 21:32:19 +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 54DCE9400BF for ; Sun, 18 Oct 2020 21:32:18 +0000 (UTC) Received: from localhost ([::1]:34762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUGHp-000397-Bj for larch@yhetil.org; Sun, 18 Oct 2020 17:32:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUGHI-00038t-1v for emacs-orgmode@gnu.org; Sun, 18 Oct 2020 17:31:45 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:52278) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUGHF-0007wT-Uz for emacs-orgmode@gnu.org; Sun, 18 Oct 2020 17:31:43 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 17415E726C; Sun, 18 Oct 2020 17:31:39 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=nnqpYmJxbInArbyHuMb8nWS827g=; b=ti8sed 3lTS/VlcckDYUjA3ys1k9TnQkknAgsHlwgGathk7F6mSfEMaIf2Jl+lQB6mmcd12 oyZvOQoGQ0kAFYH26DImSpypfm5SiqlOCn3rDaqRQEALYWX3FfKZCk0jcMC4xB7v LhJX7dpuzV26j4aFmW8p5227fw7Q6PxuYho40= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 104A6E726B; Sun, 18 Oct 2020 17:31:39 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=XlJpCyCv2bN1q8blkG8OEEYamzkjSF0a4cKFum0pAsg=; b=i12LOhbAuMfEBLm0ZuT+sWmxUKSv3XaoY8vyPSH44w+jYuueqmfyGdApGuF1IjD6MKocHUCyXe0zTwW6+1aS6UojTlLupyMKk12+YSZfzn4XvsJAFwbgOZJum/kZX2+MO+7s1imWg0g9LTkltcN3WhcwTKB6yxZvlDo8O+1Riog= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 73E11E726A; Sun, 18 Oct 2020 17:31:36 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: Martin Kampas Subject: Re: Bug: Incorrect done TODO keywords highlighting in column view In-Reply-To: <7117090.b6naEkYVYe@gt1> References: <7117090.b6naEkYVYe@gt1> Date: Sun, 18 Oct 2020 17:31:34 -0400 Message-ID: <87k0vnz0eh.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 4CFF2818-1189-11EB-B352-D609E328BF65-24757444!pb-smtp21.pobox.com Received-SPF: pass client-ip=173.228.157.53; envelope-from=kyle@kyleam.com; helo=pb-smtp21.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/18 17:31:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=ti8sed 3; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=i12LOhbA; dmarc=none; 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-Spam-Score: -1.21 X-TUID: DRjppsp7tDfU 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?