emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* `org-make-tags-matcher' broken by lexical-binding
@ 2016-01-07  7:58 Samuel Loury
  2016-01-10 21:05 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Loury @ 2016-01-07  7:58 UTC (permalink / raw)
  To: OrgMode ML, Nicolas Goaziou

[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]

Hi,

I tried to move to the master branch and found out that the work about
lexical-binding everywhere is going well. Nice work Nicolas :-).

I found out that `org-make-tags-matcher' relies heavily on the dynamic
binding.

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.
-- 
Konubinix
GPG Key    : 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: `org-make-tags-matcher' broken by lexical-binding
  2016-01-07  7:58 `org-make-tags-matcher' broken by lexical-binding Samuel Loury
@ 2016-01-10 21:05 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2016-01-10 21:05 UTC (permalink / raw)
  To: Samuel Loury; +Cc: OrgMode ML

Hello,

Samuel Loury <konubinix@gmail.com> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-10 21:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-07  7:58 `org-make-tags-matcher' broken by lexical-binding Samuel Loury
2016-01-10 21:05 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).