From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: `org-make-tags-matcher' broken by lexical-binding Date: Sun, 10 Jan 2016 22:05:32 +0100 Message-ID: <871t9pdu1v.fsf@nicolasgoaziou.fr> References: <87si294y93.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aINCN-0006M5-NH for emacs-orgmode@gnu.org; Sun, 10 Jan 2016 16:07:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIN9G-0008Rd-8d for emacs-orgmode@gnu.org; Sun, 10 Jan 2016 16:06:51 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:42819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIN9F-0008R5-W1 for emacs-orgmode@gnu.org; Sun, 10 Jan 2016 16:03:38 -0500 In-Reply-To: <87si294y93.fsf@gmail.com> (Samuel Loury's message of "Thu, 07 Jan 2016 08:58:16 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Loury Cc: OrgMode ML Hello, Samuel Loury writes: > I found out that `org-make-tags-matcher' relies heavily on the dynamic > binding. Unfortunately, this is not the only one. > First of all, it assumes that the `todo-only' variable is scoped > in. This is simple to fix by making todo-only a parameter of the > function and fixing the calls. > > Then, it returns a form that relies on the fact that the variables todo > and tags-list are scoped in. AFAICU, this sounds a bit trickier to fix > because the usage of the returned "matcher" can be correctly used > depending on the case. > > For instance, `org-clock-get-table-data' gives to `org-clock-sum' a > lamdba function that evaluates the obtained matcher. > > The attempt to funcall-ing the lambda in `org-clock-sum' complains that > tags-list does not exist. > > I probably won't have the time to create a patch for that, so I just > warn about the problem. > > Hope that helps. Indeed, I noticed that, too. This is fixed. Thank you. Regards, -- Nicolas Goaziou