-
Notifications
You must be signed in to change notification settings - Fork 150
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
The autoload file path is something like "../../../../../.emacs.d/straight/build/company/company" #701
Comments
What is the output of |
Please provide the output of this as well: (straight--autoloads-file "company") |
prerelease (grafted, HEAD -> develop, origin/develop) c94516d 2021-02-23
"/Users/Nasy/.emacs.d/straight/build/company/company-autoloads.el" |
Had some time to try reproducing this, but I am getting other errors with missing pieces of your config. (file-missing "Cannot open load file" "No such file or directory" "user-config-example") Are you able to provide a simpler reproduction case (preferably using |
Hi, Sorry for that. It should be work now. I have updated the Makefile to generate it. And about this issue. I have some progress. I notice that the nix-version emacs, build with an old macOS SDK. It uses the 10.12 version. I guess the old SDK may have issues with the new system (11.2) when I build emacs outside nix and use the latest SDK. This issue hasn't happened again. |
Glad to hear everything is working now. I'm going to close this issue, but feel free to comment if you run into the issue again or have anything you'd like to add. |
I'm actually having the same problem and can verify that specific packages are generating autoloads with a hardcoded path. I've had this problem for several months now, but it goes away when I switch back to Emacs 27 from Emacs 28. |
It would be helpful if you could reproduce the problem via |
Okay, after narrowing down the problem it seems to me that there is an issue with Test Case(straight-bug-report
:pre-bootstrap
(setq-default straight-repository-branch "develop")
:post-bootstrap
(straight-use-package 'use-package)
(use-package files :straight
(:type built-in)
:init
(setq-default find-file-visit-truename t))
(use-package editorconfig :straight t :hook
(emacs-startup . editorconfig-mode))
(message "bye"))
OutputBootstrapping straight.el...
Bootstrapping straight.el...done
Rebuilding all packages due to build cache schema change
Looking for gnu-elpa-mirror recipe → Cloning melpa...
Looking for gnu-elpa-mirror recipe → Cloning melpa...done
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...done
Looking for emacsmirror-mirror recipe → Cloning el-get...
Looking for emacsmirror-mirror recipe → Cloning el-get...done
Looking for straight recipe → Cloning emacsmirror-mirror...
Looking for straight recipe → Cloning emacsmirror-mirror...done
Building straight...
Building straight...done
Test run with version: prerelease (HEAD -> develop, origin/develop) 45eb611 2021-08-13
Cloning use-package...
Cloning use-package...done
Building use-package...
Building use-package → Building bind-key...
Building use-package → Building bind-key...done
Building use-package...
Building use-package...done
Cloning editorconfig-emacs (for editorconfig)...
Cloning editorconfig-emacs (for editorconfig)...done
Building editorconfig...
Building editorconfig...done
bye
Packages:
"org-elpa" n/a n/a
"melpa" n/a master ed12df24 2021-08-30
"gnu-elpa-mirror" n/a master a4cb567 2021-08-29
"el-get" melpa master b5a5a405 2021-09-01
"emacsmirror-mirror" n/a master fc970dc 2021-08-27
"straight" n/a develop 45eb611 2021-08-13
"use-package" melpa master a7422fb 2021-02-10
"bind-key" melpa master a7422fb 2021-02-10
"editorconfig" melpa master 2ab86dc 2021-09-02
Here is also a pretty small ;;; init.el --- Arco Emacs main configuration file -*- lexical-binding: t; -*-
(setq-default straight-repository-branch "develop")
(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)
(use-package files
:straight (:type built-in)
:init
(setq-default find-file-visit-truename t))
(use-package editorconfig
:straight t
:hook (emacs-startup . editorconfig-mode))
(provide 'init)
;;; init.el ends here
And here is the error being shown in Messages after startup:
|
Okay here, I believe I have found a complete way to reproduce this.
This will give the error |
Also, I can only reproduce this error on Emacs 28. I just tried downgrading to 27.2 and do not get an error when launching emacs. |
Thanks for the additional info, @dylanjm. Looking through anything related to symlinks I see the following: It looks like this may also be Mac specific. Not sure what the differences, if any, are on that OS. |
I see someone emailed the Emacs dev thread about this, but it did not get a response. If either of you are still experiencing this issue, I would recommend joining in on that thread, as it may help the maintainers develop a solution. https://lists.gnu.org/archive/html/emacs-devel/2021-11/msg00511.html |
@progfolio I've CCed @larsmagne in latest mail list, Hope we can get this fixed in upcoming Emacs-28. |
Hi all, this happens to me as well, on Arch linux, using emacs28-git from AUR. Please ask me anything. |
@croqaz Could you file a bug via |
They needn't file a separate bug report. They can reply to the existing thread if they have new information to add. |
Closing this issue for now. The upstream bug report shows the error is reproducible without straight.el. Unfortunately, it does not seem like it has received any attention from the maintainers. Anyone affected by this, I recommend you try the repro test provided here: https://lists.gnu.org/r/bug-gnu-emacs/2021-12/msg00376.html If you can reproduce the error with that, it may be worth adding to that thread. |
I also ran into this on Windows with Emacs 28 just now (but not on Linux with Emacs 29.0). Uninstalling 28 and reinstalling 27.2 resolved it right away. Note that the linked bug reporter mentions this workaround albeit for
I imagine because it's Does anyone know if there's a similar |
However, advising the function is not a good solution. That function should be patched to lexically bind find-file-visit-truename. Pull requests welcome. I would recommend bumping the linked Emacs bug report first. This should be solved upstream. |
Thank you @progfolio! I suppose I'll try advising it just to see if that workaround works first.
By this, do you mean that we should add I am definitely happy and willing to bump that bug report but admittedly I have zero idea how to go about doing that. My understanding is that this is a mailing list, so if I subscribe to the mailing list now, I won't get that email since it already happened in the past, so how can I reply to it? It's been a long while since I worked with mailing lists. Would you be kind enough to share some directions? It seems like I'm supposed to click on this button: and then also add |
I can confirm this workaround works: (defun my-patch-package-find-file-visit-truename (oldfun &rest r)
(let ((find-file-visit-truename nil))
(apply oldfun r)))
(advice-add #'straight--build-autoloads :around
#'my-patch-package-find-file-visit-truename) But I acknowledge you're saying that's not the ideal solution, so I'm also happy to both:
|
Without this, the autoloads end up with incorrect paths due to using a symlink for .emacs.d https://lists.gnu.org/r/bug-gnu-emacs/2021-12/msg00376.html radian-software/straight.el#701
Yes, that's the general idea. Hopefully, we can unconditionally bind I'll have to do some testing/research to see if this is OK for versions prior to 28, or if we need to condition the value on that version. Let's hold on that part for now and focus on getting this bug fixed upstream first. You have the correct idea about replying to that bug. Especially the part about manually adding [email protected] as a recipient. Thank you for taking this on. |
Thank you! I did post a reply/bump yesterday, I think/hope I did it correctly: https://lists.gnu.org/r/bug-gnu-emacs/2022-04/msg00444.html I also subscribed to the mailing list just now. |
As a further note for myself, I just learned here that the bug report is visible here as well, and here. Also added some of this information to that same wiki page. I'm not sure what "official" affiliation it has with emacs, if any (I doubt it does), but figured I'd add it there since it came up high in Google search results. |
…an-software#701) When find-file-visit-truename, a user option, is non-nil, make-directory-autoloads resolves symlinks in its second argument (as it uses find-file-noselect under the hood) but not in its first. This results in relative paths that are invalid when loaded. See radian-software#701, radian-software#944, and upstream bug report https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52292.
…an-software#701) In Emacs 28.1, when find-file-visit-truename, a user option, is non-nil, make-directory-autoloads resolves symlinks in its second argument (as it uses find-file-noselect under the hood) but not in its first. This results in relative paths that are invalid when loaded. See radian-software#701, radian-software#944, and upstream bug report https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52292.
…an-software#701) In Emacs 28.1, when find-file-visit-truename, a user option, is non-nil, make-directory-autoloads resolves symlinks in its second argument (as it uses find-file-noselect under the hood) but not in its first. This results in relative paths that are invalid when loaded. See radian-software#701, radian-software#944, and upstream bug report https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52292.
Hi all - I'm experiencing a similar issue. Note: I'm cross-posting here, because all comments point back to this thread, and my SE question is still not resolved. I'm running emacs (v28.1) on my macOS (Montery v12.2.1) and I get the following message when trying to use command-execute: Cannot open load file: No such file or directory, ../../../../../../../.emacs.d/straight/build/magit/magit-status My init file is here. Importantly I have my .emacs.d -> ~/DROPBOX/REPOS/ss_dotfiles/.emacs.d I tried the following suggested workarounds per:
Neither of these workarounds fix this issue with @blaenk @progfolio @kisaragi-hiu - based on my init file, am I implementing your suggestions correctly? Any help to get this issue resolved is sincerely appreciated 🙏🏾 . |
Hi all, I also have the exact same problem with Emacs stable 28.1 on Arch. |
@croqaz - that worked! Many thanks. To be more precise I did the following:
@croqaz - it would be good to post similar instructions on my cross-posted SE question to help others. But I would like you to get the credit and points for it. Are you able to post your advice above as an answer on my SE question? Else I will do it myself on Sunday. Update: As discussed, I've now included an answer in the stackexchange post and made sure to credit @croqaz as mentioned. |
What's wrong
Today, when I open my emacs, some errors happened like:
When I searched for the reason, I found some file paths of the auto-generate autoloads files inside
straight/build/xx
is like../../../../../.emacs.d/straight/build/xx
. E.g.:My
.emacs.d
is a soft link of~/.config/nasy-emacs
. When using the relative position of going to the parent folders and returning, it looks for~/.config/.emacs.d/
instead of~/.emacs.d/
or~/.config/nasy-emacs/
Currently, I use
gsed -i 's#../../../../../.emacs.d#/Users/Nasy/.emacs.d#g' stright/build/*/*.el
to do a temporary fixing.Is there any way to force it to generate an absolute path or a relative path without "../.."?
Directions to reproduce
For
"../../../../../.emacs.d/xxx"
, I am not sure what caused this to happen. Some of them still keep(autoload 'xx "xx")
.And you could try:
Version information
The text was updated successfully, but these errors were encountered: