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
Windows: Have to manually clone in to the straight/repos/straight.el folder to make it work #665
Comments
Not sure what this could be. Here are some things that might help identify the problem: Does it print anything before hanging? If you type |
Also tried this, but nothing showed up, I tried like 10 time, 2 of these I get a error said :
but most of the time it will hang up forever until I hit C-g. |
from https://gnutls.org/manual/html_node/Error-codes.html :
This thread suggests a networking issue: https://forum.filezilla-project.org/viewtopic.php?t=14574 Emacs 27.1 ships with more secure TLS defaults, too: https://www.masteringemacs.org/article/whats-new-in-emacs-27-1
Sounds like a possible networking issue? |
Thanks, after I set up a proxy for emacs, now it won't hang up, but will still complains about cannot find bootstrap.el, then refuse to continue. The .emacs.d\straight\repos folder now automatically created but nothing is in the folder.
|
Try evaluating this and copying the output of the (progn
(require 'pp)
(pp-eval-expression
'(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/install/beta/straight.el"
nil 'inhibit-cookies)
(buffer-string)))) |
Here it is, the evaluated output is too long I have to use attachments. |
Thank you. The output looks fine to me. My hunch so far is that this is a networking or permissions error. I would try manually downloading |
Yeah, I seem to recall that "install code executed, but |
For what it's worth, I sidestep this issue on Windows by wrapping the provided bootstrap code in a function (below,
Maybe it'd be a good idea to add something to this effect as a FAQ item, or something? |
@duckwork can you provide a way to reproduce the error? Sidestepping is useful, but it would be much better to understand what's going wrong and add a proper fix. |
I can try stepping through it later this week, per the instructions earlier in this thread. |
Sorry fot this late response, M-x straight-version echos I also tried to adjust the permissions of my .emacs.d folder, change owner of it, move the folder out of C driver, use git-for-windows instead of msys git...etc, but it just won't work. I can almost sure that this have no deal with the permission. Eventually I found this is still a wired network issue, setup proxy in init.el won't work for bootstrap straight.el somehow (it works for eww after init though), git config --global also have no effect, So my fix is use msys bash (or git bash that comes with git-for-windows, tested, also works) and No sure if this is a nice fix but it should works for people who use the zip package version fo emacs on windows too.
|
This leads me to believe that straight is having trouble executing git in your environment. (let ((straight-process-buffer "*straight-windows-git-test*")
(inhibit-read-only t))
(with-current-buffer straight-process-buffer
(delete-region (point-min) (point-max))
(straight--call "git" "--version")
(buffer-string))) |
I ran the |
After a success bootstrap using the export https_proxy in a msys bash like I described earlier, these are printed in bufer *straight-windows-git-test*
Also tried with this init.el in a empty .emacs.d folder, same resualt (setq debug-on-error t)
(setq debug-on-quit 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))
(find-file "*straight-windows-git-test*")
(let ((straight-process-buffer "*straight-windows-git-test*")
(inhibit-read-only t))
(with-current-buffer straight-process-buffer
(delete-region (point-min) (point-max))
(straight--call "git" "--version")
(buffer-string)))
|
What's wrong
On a fresh install of Emacs 27.1, have to clone straight.el in to .emas.d/straight/repos/straight.el to install straight.el,
otherwise, emacs will hang on start, this also happens with the msys version of emacs 27.1, and my self-compiled native-comp branch emacs.
Directions to reproduce
In a fresh install emacs, with empty .emacs.d folder, and a init.el with following content:
Then start emacs.exe or runemacs.exe. emacs will hang but with abnormally high cpu usage.
Version information
I dont recall such a problem in windows 10 version 1909, so maybe its a windows problem?...
The text was updated successfully, but these errors were encountered: