overtone / emacs-live

M-x start-hacking
http://overtone.github.com/emacs-live/
Other
1.52k stars 241 forks source link

Error on loading magit on Windows #135

Open joshgiesbrecht opened 10 years ago

joshgiesbrecht commented 10 years ago

"Wrong type argument: stringp, nil"

The first chunk of stuff in --debug-init call stack (probably the important bits):

Debugger entered--Lisp error: (wrong-type-argument stringp nil) string-match("cygwin" nil nil) string-match-p("cygwin" nil) (let ((case-fold-search t)) (string-match-p "cygwin" magit-git-executable)) (and (eq system-type (quote windows-nt)) (let ((case-fold-search t)) (string-match-p "cygwin" magit-git-executable)) t) eval((and (eq system-type (quote windows-nt)) (let ((case-fold-search t)) (string-match-p "cygwin" magit-git-executable)) t)) custom-initialize-reset(magit-quote-curly-braces (and (eq system-type (quote windows-nt)) (let ((case-fold-search t)) (string-match-p "cygwin" magit-git-executable)) t)) custom-declare-variable(magit-quote-curly-braces (and (eq system-type (quote windows-nt)) (let ((case-fold-search t)) (string-match-p "cygwin" magit-git-executable)) t) "Whether curly braces should be quoted when calling git.\nThis may be necessary when using Windows. On all other system\ntypes this must always be nil.\n\nWe are not certain when quoting is needed, but it appears it is\nneeded when using Cygwin Git but not when using stand-alone Git.\nThe default value is set based on that assumptions. If this\nturns out to be wrong you can customize this option but please\nalso comment on issue #816." :group magit :set-after (magit-git-executable) :type boolean) eval-buffer(#<buffer load-407294> nil "c:/home/.emacs.d/packs/live/git-pack/lib/magit/magit.el" nil t) ; Reading at buffer position 6542

samaaron commented 10 years ago

Hi there, sorry you're having issues.

Unfortunately, I don't have a windows environment to test this on. Perhaps you could raise this issue with the Magit people directly?

MC-Escherichia commented 10 years ago

I am experiencing the same issue. I will try to update magit and report back.

MC-Escherichia commented 10 years ago

I fixed it by deleting the /.emacs.d/packs/live/git-pack/lib/magit/ folder and replacing it with the current magit repository. I needed to update my path to have "Program Files/Git/bin" and Program Files/Git/cmd" on my system path, and then it worked great.

I should add that it seems to be an issue with magit, the line in the debug trace

"Whether curly braces should be quoted when calling git.\nThis may be necessary when using Windows. On all other >system\ntypes this must always be nil.\n\nWe are not certain when quoting is needed, but it appears it is\nneeded >when using Cygwin Git but not when using stand-alone Git.\nThe default value is set based on that assumptions. If >this\nturns out to be wrong you can customize this option but please\nalso comment on issue #816."

led me to issue #816 on magit which discusses errors on Windows having to do with having cygwin git and regular git installed on Windows. It seems like the latest version resolves this automatically.

viperscape commented 10 years ago

I had the same issue on my windows install- 8.1 64bit, I have a sneaky suspicion it's because my GIT was not in my Path env vars but adding it did not seem to help; I simply removed the git-pack and all is well now.