jtmoulia / elisp-koans

Emacs Lisp Koans -- learn elisp through test-driven development.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

koans are broken (mostly from switch from cl to cl-lib I think)

bo-tato opened this issue Β· comments

thanks for these koans, they're really helpful to get started, makes emacs lisp a lot less intimidating and I feel confident to try debugging and editing plugins now πŸ˜ƒ

At least in emacs 28 to first get the contemplate or run-test to work we need #20
then in doing the koans I had to edit case equalp subseq first second fourth typep copy-seq concatenate incf loop return evenp floor* multiple-value-list and values to their cl- equivalent.

also in line 63 of vectors.el:

(should-not (aref (list-to-bool-vector '(nil))))

I get error that aref expects two args not one, I changed it to:

 (should-not (aref (list-to-bool-vector '(nil)) 0))

adding second arg of 0 which I think is outside of the code we're intended to edit for that koan

also in cl-loops.el line 115:

      (should (eq ___ (find '("The Hobbit" "Bilbo")) pairs-in-table :test #'equal)))))

after changing it to cl-find I get error that find has too few arguments, I think the paren is misplaced and it should be:

      (should (eq ___ (find '("The Hobbit" "Bilbo") pairs-in-table :test #'equal))))))

If it's just a matter of making those changes I'm happy to edit it all and submit a pull request. But I'm also obviously just starting with emacs lisp so I'm not sure what is best, like I read it is recommended to use the built-in seq.el library that provide a lot of that stuff (find subseq etc) now rather using the cl-lib

Thanks @bo-tato! This would be a good stop-gap measure to be able to complete the koans, but I think you're right that it is worth seeking out the best equivalent elisp idioms.

@jtmoulia If this kind of review would be helpful, I am happy to help, perhaps in collaboration with @bo-tato if they're willing.

Hi @bo-tato -- I apologize for the late response.

I read it is recommended to use the built-in seq.el library that provide a lot of that stuff (find subseq etc) now rather using the cl-lib

Hm, I think it'd make sense to seq.el in addition to the cl koans, though perhaps with the cl koans being optional given it isn't the preferred approach. Given the cl koans are sprinkled throughout (?) there might be some unraveling to do