Re: Using lexical-binding

2021-03-21 Thread Greg Minshall
Kyle, > Hmm, given that the lexical-binding change to ob-core was back in Org > 9.0 (November 2016), it seems like dynamic scoping wasn't really being > relied on (or, if it was, downstream code has already been adjusted). > In my view it'd be better to stick with lexical scoping for these > varia

Re: Using lexical-binding

2021-03-21 Thread Kyle Meyer
Greg Minshall writes: > Kyle, > > thanks. i see. i wondered why the talk was all about agendas. > > since, in my (brand new, experimenting) use of > =org-babel-map-src-blocks=, i'm calling a function, and that function is > trying to de-reference, e.g., =beg-block=, i get an error. Thanks for t

Re: Using lexical-binding

2021-03-19 Thread Greg Minshall
Kyle, thanks. i see. i wondered why the talk was all about agendas. since, in my (brand new, experimenting) use of =org-babel-map-src-blocks=, i'm calling a function, and that function is trying to de-reference, e.g., =beg-block=, i get an error. it is (or does seem to be) the case that if the

Re: Using lexical-binding

2021-03-19 Thread Kyle Meyer
Greg Minshall writes: > hi. i just upgraded to > : Org mode version 9.4.4 (9.4.4-27-gb712b9-elpa @ > /home/minshall/.emacs.d/elpa/org-20210315/) > > and, have also just started playing with > (org-babel-map-inline-src-blocks), the documentation for which says > > During evaluation of BODY t

Re: Using lexical-binding

2021-03-19 Thread Greg Minshall
> but, iiuc, that relies on dynamic binding. so, as =lexical-binding= is > =t=, i don't have access to those appealing variables. from reading the elisp manual, it seems that one could define those variables to be "special variables", and, iiuc, one can achieve this by using a =defvar= without a

Re: Using lexical-binding

2021-03-19 Thread Greg Minshall
hi. i just upgraded to : Org mode version 9.4.4 (9.4.4-27-gb712b9-elpa @ /home/minshall/.emacs.d/elpa/org-20210315/) and, have also just started playing with (org-babel-map-inline-src-blocks), the documentation for which says During evaluation of BODY the following local variables are set r

Re: Using lexical-binding

2021-03-10 Thread Stefan Monnier
Thanks. So now, I'm just waiting for that code to make its way to Emacs's `master` branch (which I guess first means to make its way to an Org release, so I had better find something else to do in the mean time). Stefan

Re: Using lexical-binding

2021-03-09 Thread Kyle Meyer
Stefan Monnier writes: > Any chance you could put this in the `Package-Requires:`? Sure, added (5263eff5a). > Note that all the uses I introduced of `with-suppressed-warnings` only > wrap a very small amount of code, so you could also replace them with > `with-no-warnings` (added back in Emacs-2

Re: Using lexical-binding

2021-03-09 Thread Stefan Monnier
Hi Kyle, >> Subject: [PATCH] * lisp/org-agenda.el: Use lexical-binding > [...] >> +(pcase type >> + ('agenda >> + (org-agenda-list current-prefix-arg)) > > Unfortunately Org's minimum Emacs version is still Emacs 24.3. Sorry 'bout that. I keep forgetting ab

Re: Using lexical-binding

2021-03-08 Thread Kyle Meyer
Looking at this one more time before applying, I noticed a couple of backward compatibility issues. Stefan Monnier writes: > Subject: [PATCH] * lisp/org-agenda.el: Use lexical-binding [...] > + (pcase type > + ('agenda > +(org-agenda-list current-prefix-a

Re: Using lexical-binding

2021-03-06 Thread Stefan Monnier
>> Should I send a rebased patch for inclusion > Yes, please. Here it is, Stefan >From ba61c9660fc09321f9dfe5f746705f5d1202c474 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 23 Feb 2021 15:47:29 -0500 Subject: [PATCH] * lisp/org-agenda.el: Use lexical-binding MIME-Version: 1.

Re: Using lexical-binding

2021-03-06 Thread Kyle Meyer
Stefan Monnier writes: > Should I send a rebased patch for inclusion Yes, please. > or do you want to give more time for people to try it out? My guess is that we won't hear much more without bringing the changes into master, and I'm in favor of doing so given that Marco and I have both used it

Re: Using lexical-binding

2021-03-06 Thread Stefan Monnier
Should I send a rebased patch for inclusion or do you want to give more time for people to try it out? Stefan

Re: Using lexical-binding

2021-03-04 Thread Marco Wahl
> Kyle Meyer writes: >> Stefan Monnier writes: >> >>> Since I'm not using it, I can't really test the result in any meaningful >>> way. Furthermore, just like `calendar.el`, it relies on dynamic scoping >>> and `eval` in all kinds of ways, so it's very difficult to be sure the >>> result is "suffi

Re: Using lexical-binding

2021-03-03 Thread Kyle Meyer
Kyle Meyer writes: > Stefan Monnier writes: > >> Since I'm not using it, I can't really test the result in any meaningful >> way. Furthermore, just like `calendar.el`, it relies on dynamic scoping >> and `eval` in all kinds of ways, so it's very difficult to be sure the >> result is "sufficiently

Re: Using lexical-binding

2021-02-24 Thread Kyle Meyer
Stefan Monnier writes: >> It looks like add-to-diary-list became an obsolete alias for >> diary-add-to-list in Emacs 23.1 and was removed in Emacs 25.1, >> specifically 3f65970414 (Remove calendar code obsolete since at least >> version 23.1, 2014-10-05). > > Ah, thanks for tracking it down, so I

Re: Using lexical-binding

2021-02-24 Thread Kyle Meyer
Stefan Monnier writes: > Since I'm not using it, I can't really test the result in any meaningful > way. Furthermore, just like `calendar.el`, it relies on dynamic scoping > and `eval` in all kinds of ways, so it's very difficult to be sure the > result is "sufficiently similar" to the old behavi

Re: Using lexical-binding

2021-02-23 Thread Stefan Monnier
> With a quick test of a few main commands, burps in one of four. Excellent, and thanks for the subsequent patch (I don't think I'd have come up with the move of `extra` on my own). >> - I believe I have quashed all the compiler warnings (some had nothing >> to do with lexical scoping), > > Hmm

Re: Using lexical-binding

2021-02-23 Thread Samuel Wales
just a thanks to maintainers of emacs and org including those of you fixing this and those who wrote the tests. i had no idea org wasn't fully lexical yet. i look forward to whatever good that brings. On 2/23/21, Kyle Meyer wrote: > Kyle Meyer writes: > >> Stefan Monnier writes: > [...] >> ;

Re: Using lexical-binding

2021-02-23 Thread Kyle Meyer
Kyle Meyer writes: > Stefan Monnier writes: [...] > ;; (org-agenda-list); fails: void-variable date > > There are also some `make test' failures: > > 7 unexpected results: > FAILED test-org-agenda/diary-inclusion > FAILED test-org-agenda/empty > FAILED test-org-ag

Re: Using lexical-binding

2021-02-23 Thread Kyle Meyer
Stefan Monnier writes: > As part of the on-going work to use lexical-binding in all the files > bundled with Emacs, I took a stab at converting org-agenda.el to > lexical-binding. Thank you. > [...] > Anyway, here's my first cut (the patch is made against the head of > Org's `master` rather than

Using lexical-binding

2021-02-23 Thread Stefan Monnier
ith actual closures. >From d34f993044ee817f7ee18342bcc686285329bea5 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 23 Feb 2021 15:47:29 -0500 Subject: [PATCH] * org-agenda.el: First attempt at using `lexical-binding` --- .gitignore | 6 + doc/Makefile | 14 +-