From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EDixJDtCU1/+IAAA0tVLHw (envelope-from ) for ; Sat, 05 Sep 2020 07:46:03 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id EPmUIDtCU19UfQAAbx9fmQ (envelope-from ) for ; Sat, 05 Sep 2020 07:46:03 +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 40E079403C5 for ; Sat, 5 Sep 2020 07:46:03 +0000 (UTC) Received: from localhost ([::1]:60008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kESte-00079T-8O for larch@yhetil.org; Sat, 05 Sep 2020 03:46:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEStK-00079L-F5 for emacs-orgmode@gnu.org; Sat, 05 Sep 2020 03:45:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59736) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEStK-0003SL-2p; Sat, 05 Sep 2020 03:45:42 -0400 Received: from [2a01:e35:2fe1:f780:68c6:8f4c:dae1:2381] (port=38770 helo=guerry) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1kEStJ-0000HK-LI; Sat, 05 Sep 2020 03:45:41 -0400 Received: by guerry (Postfix, from userid 1000) id 964FE1A60D46; Sat, 5 Sep 2020 09:45:40 +0200 (CEST) From: Bastien To: Kyle Meyer Subject: Re: [PATCH] New function org-agenda-filter-set Organization: GNU References: <87k10r7xwn.fsf@bzg.fr> <874krqw4du.fsf@kyleam.com> Date: Sat, 05 Sep 2020 09:45:40 +0200 In-Reply-To: <874krqw4du.fsf@kyleam.com> (Kyle Meyer's message of "Fri, 05 Jun 2020 03:58:05 +0000") Message-ID: <87y2lo7jkr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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, Stefan Kangas Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; 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.01 X-TUID: vZnJVcPAaegQ Hi Kyle and Stefan, Kyle Meyer writes: > Bastien writes: > >> I've seen problems with this new function when completing in agendas: >> hitting '/' does not see what tags are available for completion in the >> current buffer. >> >> I'm reverting e9b1b8fde5 from master for now. If you see what's wrong, >> please resubmit a patch. > > Stepping through both versions, it looks like the crucial thing is that > org-agenda-get-represented-tags needs to be called _before_ the > completion function. If it's not, org-agenda-filter-completion-function > calls -get-represented-tags with an unset cache, and it returns nil > because the (derived-mode-p 'org-agenda-mode) condition is nil. > > The same goes for org-agenda-get-represented-categories. Thanks for analysing this -- Stefan, if you still feel like going through this refactoring, this would be a welcome improvement for after 9.4 (coming soon). -- Bastien