doublep / iter2 Goto Github PK
View Code? Open in Web Editor NEWReimplementation of Elisp generators
License: GNU General Public License v3.0
Reimplementation of Elisp generators
License: GNU General Public License v3.0
Since your work is a faster, fully compatible version of generator.el
, wouldn't it be a good idea to just replace generator
by iter2
? This way everyone benefits from it, and we don't have to duplicate packages which already rely on generator.el
.
(I understand if you just say "It's too much work to interact with the Emacs mailing list", seems reasonable!)
To reproduce, on master
, eval:
(iter2-defun f ()
(dolist (e '(1 2 3))
(iter-yield e)))
which gives error wrong-type-argument listp $value
. Fair enough.
Mysteriously, however, macroexpand
ing the above is fine:
(macroexpand '(iter2-defun f ()
(dolist (e '(1 2 3))
(iter-yield e))))
gives no error.
I don't know how to start fixing this, since macroexpand
works just fine.
When running code that uses save-restriction
under ert
, in certain circumstances an error is encountered. I don't have it at hand right now, but essentially, save-restriction
attempts to restore point-max
in the *ert*
buffer, not the buffer I created for the test and in which I originally ran save-restriction
, and that fails because my buffer is larger than the *ert*
buffer.
In general, it seems like internally save-restriction
, save-excursion
, save-current-buffer
are implemented essentially using unwind-protect
(example). Basically, it seems like save-current-buffer
just saves the current buffer, save-excursion
saves instead a marker to the current point in the current buffer (as well as the current window), and save-restriction
saves markers to the min and max points in the current buffer. iter2's save-restriction
, however, does not restore the current buffer from the markers before calling narrow-to-region
, which I believe causes the bug.
In general, it may be a better idea to manually convert these 3 macros to equivalent unwind-protect
forms, following the Emacs source code, and then convert those.
As part of kidd/org-gcal.el#160, I'm working on some code that uses iter2
(via a library https://github.com/skeeto/emacs-aio that I ported to use iter2
instead of iter
). I'm having some issues with my code, though. Namely, the loop that I've linked seems to somehow yield early, so that only the first entry in org-gcal-fetch-file-alist
is actually processed. What would be the best way to debug the code to see where exactly I'm running into an issue? I know about iter2-generate-tracing-functions
, but I'm unsure how exactly to interpret the output of this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.