-
Notifications
You must be signed in to change notification settings - Fork 20
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
Newer version of map library is required for pcase expansion #70
Comments
What version of Emacs are you using, and what version of the |
The only map.el I can find is in my Emacs distribution's emacs-lisp directory. (Edit: this is also the file given by
|
Thanks. Note that you can find the package's information with Please try this:
I suspect that will work. |
Yes, this works. Thanks! Using straight and use-package, I found I need to put I've been using Emacs for 30 years but didn't know about |
Thanks. I need to add |
@rmolinari If you have time, would you mind testing the fix I just pushed? i.e. install Bufler having only v2.0 of |
Verdict: yes and no. So, when I cleared out straight's installation of the But I still saw the If I add an explicit I don't have a good mental model of how everything comes together, but this is my guess at the chain of events when things go wrong.
This isn't |
Thanks for that thorough investigation. I'm waiting on MELPA to rebuild the package, and then I'll try installing it in a clean config with In the meantime, since I don't use Straight, I can't offer much help. But Straight is very carefully developed, and I'm sure this kind of issue has come up before, so I'd be surprised if it hasn't been discussed on their tracker before.
The bottom line is that it's probably a Until I can confirm that this is fixed (i.e. that it installs properly into a clean Emacs config), I'll leave this open. |
Also, another aspect of this issue is that of byte-compilation: when |
Thanks for your quick responses! I will study your notes on byte compilation and make sure I understand them. For what it's worth I did another experiment. I deleted the directories for bufler and map under ~/.emacs.d/straight/repos and ~/.emacs.d/straight/build. Then
I see that straight clones both bufler and map and the BUT, if, before executing I'll have a look through |
Thanks. Yeah, ideally the newer version of This kind of issue, failed macro expansions due to dependency versions, is reported on my repos often. AFAIK it's simply a shortcoming of the packaging systems, and it's just something that users need to be aware of; usually deleting the packages, restarting Emacs, and reinstalling them fixes it. However, sometimes issue can arise due to how I wrote this function to reload a package's symbols. It may not necessarily work in all cases, because |
I just filed a ticket against straight: radian-software/straight.el#822. |
Not currently implemented.
Packages are built in a child Emacs process which loads the package dependencies. |
@rmolinari Thanks. @progfolio Thanks, hopefully a solution can be found. Ideally it would also be fixed in |
I too have the same problem, but I don't use
I've tested it with as minimal a setup as possible, but the package still fails to compile (require 'map)
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(package-initialize) After emacs starts up with the above config, I run
It looks like it's picking up the correct package for
I've double checked that the |
@iffsid I have repeatedly installed this package into a clean Emacs config to verify that it works. And I just did it again now:
No warnings, no errors. I can't offer support for your Emacs configuration or installation problems here. |
@alphapapa thanks for checking; 👍 There seems to be some oddity to do with the emacs base install itself that's triggering an error.
|
@alphapapa it looks like issue could be related to the emacs version! |
You can see here that
However, that does not mean that This is, AFAICT, not a bug in Bufler, but an idiosyncrasy of the Emacs package system (and of Lisp image-based systems in general). The In general, if nothing else seems to work, even Emacs users should try "have you tried turning it off and on again?" |
Right, so I tried to sequence the install of
Then, inside emacs, installed Edited
Ensure that Then, I reran the sandbox script above, and So I tried some high-level debugging and installed 4 different versions of emacs to try out your simple script
where For
Note that for There seems to be something to do with macro expansion that changed during Oh well, at least I know I can use Not sure if all this is of any use to you, but I thought it might be useful for anyone else stumbling into the same problem to document what I did. 🙂 |
@iffsid Thanks for that thorough investigation. (And I'm sorry I didn't notice it for 10 days. I have too many GitHub notifications, and comments on closed issues tend to go unnoticed.) I don't have a way to easily test on multiple Emacs versions at the moment, other than using GitHub CI...which I now see that I forgot to set up for this repo. sigh Maybe I have too many Emacs packages...
Ok, I haven't seen that before. Maybe the real problem is this:
That's probably because of code in |
Well, I've confirmed the problem: On Emacs 26.3, with (macroexpand-all '(pcase-let* (((map :max-width) plist))
max-width)) correctly expands to this code (according to a debug message wrapped in (let* ((x6 (map-elt plist :max-width))) (let ((max-width x6)) max-width)) as shown in this CI run (which will eventually expire from GitHub): https://github.com/alphapapa/bufler.el/runs/3533167237#step:5:28 But on Emacs 27.1 and 27.2, the same code incorrectly expands to: (let* ((x6 (map-elt plist ':max-width))) (progn max-width)) And as the CI run shows,
as shown here: https://github.com/alphapapa/bufler.el/runs/3533167285#step:5:21 I have no explanation for this. I'm hesitant to file a bug report, but I don't know what the problem could be, so that might be necessary. Then again, since Emacs 28 doesn't exhibit the problem, maybe I could just ask on emacs-devel. In the meantime, I guess I'll have to change the |
I have no explanation for why this fails on Emacs 27 only. See <#70>.
Although the applied workaround should resolve the problem here, I'm going to leave the issue open until I find what caused it. |
I posted a message on emacs-devel: https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg00597.html |
After further digging, I found some more information. Reproducing my reply on emacs-devel here to make it easier for me to keep track of:
|
@alphapapa thanks for digging into things! I've included the log from running I've switched to using emacs 28 now anyways, but thought it might be worth flagging this up just in case. :) |
@iffsid Please try installing the version in the |
I'm affected by this on emacs 29.1,
|
Your Emacs must be misconfigured or this package is not installed correctly. This is not a problem on Emacs 29. |
When evaluating this code:
I get this error Debugger entered--Lisp error: (void-variable _)
(map-elt _ :max-width plist)
(let* ((x3420 (map-elt _ :max-width plist))) (let ((max-width x3420)) (message "MAX-WIDTH: %S" max-width)))
(progn (ignore (mapp plist)) (let* ((x3420 (map-elt _ :max-width plist))) (let ((max-width x3420)) (message "MAX-WIDTH: %S" max-width))))
(let ((plist '(:max-width 2))) (progn (ignore (mapp plist)) (let* ((x3420 (map-elt _ :max-width plist))) (let ((max-width x3420)) (message "MAX-WIDTH: %S" max-width)))))
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
eros-eval-last-sexp(nil)
funcall-interactively(eros-eval-last-sexp nil)
command-execute(eros-eval-last-sexp) There was a change in map.el 4 days ago: emacs-straight/map@613340b |
Yes, and there is a test for that: https://git.savannah.gnu.org/cgit/emacs.git/tree/test/lisp/emacs-lisp/map-tests.el?id=40994d2bafafa53464d3678b06f391fd13c884ec#n621 And you said that you're running Emacs 29.1, which does not have that change to |
I'm on doom-emacs (which uses |
Please report that bug to the DOOM maintainer! |
It looks to me as a bug in |
@progfolio Please see above. |
No idea how Straight's `map` package is following `emacs.git`, but FWIW
the latest `map.el` can also be installed via `package.el` from
GNU-devel ELPA.
In any case, I just pushed a patch to Emacs's `master` branch which
should hopefully fix it.
|
There is a mirroring script run daily: https://github.com/radian-software/gnu-elpa-mirror
So long as that script is working, the change should be picked up within a day. |
There is a mirroring script run daily: https://github.com/radian-software/gnu-elpa-mirror
"GNU ELPA uses an overly complex, unwieldy, and fragile build process."
Nice! 🙂
|
Lol not my commentary, though I do think there are some fair criticisms of the tarball distribution model. |
I installed bufler and I saw the given message out of the box when I run
M-x bufler
. What am I doing wrong?(Edit: the message - no longer in the subject - was "Symbol's value as variable is void: max-width")
I use
straight
anduse-package
. The bufler config is justI see the same behavior when starting in a clean emacs:
$ emacs -Q
M-x load-file RET ~/.emacs.d/straight/repos/straight.el/bootstrap.el RET
M-x straight-use-package RET bufler RET
M-x bufler
I appear to have the latest version (from the repo that straight downloads):
Here is the backtrace that I see:
The text was updated successfully, but these errors were encountered: