Giter VIP home page Giter VIP logo

iter2's People

Contributors

dependabot[bot] avatar doublep avatar wyuenho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

iter2's Issues

Why not merge this into Emacs?

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!)

`iter-yield` inside `dolist` crashes `iter2--convert-function-body` when defining function

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, macroexpanding 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.

save-restriction seems to fail in certain circumstances

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.

How to debug iter2 code not working correctly?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.