-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error message wrong-type-argument listp #1
Comments
Thanks for reporting this. It seems to be related to treating strings as arrays of characters, although I'd be surprised if string handling was any different. I haven't been able to reproduce this on my own Emacs snapshot, built today:
If possible, would you mind running the following code in your (mapcar (lambda (it) (char-to-string it))
"ooooooooooooo\nooooooooooooo\nooooooooooooo") Let me know if that triggers the same error (although I'd be very surprised if it did). |
It throws this:
|
Thanks for checking. I suspect it's a bug in the use of dash's anaphoric What version of dash are you using? I can reproduce it using any version between the following two commits:
This implementation has an offending call to (defmacro --map (form list)
"Eval FORM for each item in LIST and return the list of results.
Each element of LIST in turn is bound to `it' before evaluating
BODY.
This is the anaphoric counterpart to `-map'."
(declare (debug (form form)))
(let ((l (make-symbol "list"))
(r (make-symbol "res")))
`(let ((,l ,list) ,r it)
(ignore it)
(while ,l
(setq it (pop ,l))
(push ,form ,r))
(nreverse ,r)))) It's possibly inlined, and hence doesn't appear in the stack trace. |
It seems I am using the last I am not a elisp ninja. I do not know what you are refering with:
|
Apologies for the jargon vomit! I was so engrossed in the problem that I didn't explain myself properly. Since both our Emacs are the same, and Unfortunately all versions of dash since January 2020 will have the version number "2.17.0". The Emacs package versioning system is a bit bizarre. One way to check what dash you're using is to look at the date in the On my Emacs, I can do this with:
It would be very helpful to know:
If you're using a version between 6th Jan 2021 and 11th Jan 2021, then you may see different code. In this case, you'll need to upgrade dash to the latest version. You can do this using the package menu with |
Thanks for the explanation. In the straight directory are three other directories:
In the repos directory is where straight download the packages from melpa, github or wherever the source. This is how I installed your package using straight.
I went to check
It is the same as your last message. |
Straight looks nice! I use nix myself, so also don't use the typical package update workflow. I think we can assume that your dash version is up to date, or at the very least isn't a direct suspect. It's difficult to see what's wrong from the trace as the elisp has been optimized. Emacs re-wrote the Could you un-optimize it by evaluating the original definition?
Hopefully, you will see a more detailed trace that looks a bit like this:
I'll be able to correlate that with the code. Thank you very much for bearing with me on this. |
I am glad, I am helping. Plus I am learning new stuff. I have seen some videos about nix in youtube. It looks very interesting. I wonder how you manage your packages in nix. I followed your instructions and no errors were thrown. So I am guessing the error is cause by how straight load This the structure of how straight set up pair-tree. ~/.emacs.d/straight/build/pair-tree/
~/.emacs.d/straight/repos/pair-tree.el/
If I understand correctly, straight loads If you think, it is straight the cause of the error, I could write to the developer that made straight. He always responses to messages in gitter straight channel. |
I'm glad it's fixed! I've tried to reproduce it by spinning up a new user with a straight-controlled Emacs (it turns out this is pretty quick to do with nix), but oddly enough everything ran smoothly. This is the config I used, the first snippet being taken from straight.el: ;; -*- lexical-binding: t; -*-
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(straight-use-package 'use-package)
(straight-use-package 'dash)
(straight-use-package
'(pair-tree :type git :host github :repo "zainab-ali/pair-tree.el")) I'm not sure why So maybe it's not just To be absolutely sure, could you add the (use-package pair-tree
:straight (pair-tree
:type git :host github
:repo "zainab-ali/pair-tree.el"
:no-byte-compile t)) If that works, byte compiling must be the culprit and you can ask the straight.el maintainer (be sure to mention me too — it's a pretty interesting issue). As an aside, I'll take a look at sorting out the SVGs - that white background isn't what I was aiming for. |
It does work with that configuration.
I will make an issue in the straight repo about this unexpected behavior. Thanks. |
First off, neat package!
straight.el parses the package metadata for dependencies. The regexp we were using was a little strict and your package uses an unconventional amount of semicolons for that section (#4 should take care of that). I've relaxed the regexp to be more tolerant, but I still think it's a good idea to stick with convention. |
When
M-x pair-tree '((2 . (turtle doves)) (3 french hens) 4 (calling . birds) partridge)
.I get this message.
This is the message I get
M-x toggle-debug-on-error
.This is my configuration.
The text was updated successfully, but these errors were encountered: