任何人都可以引导我朝正确的方向前进,让gist.el
正常工作。以下是错误消息:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
call-process(nil nil #<buffer *string-output*> nil "config" "github.user")
apply(call-process nil nil #<buffer *string-output*> nil ("config" "github.user"))
process-file(nil nil #<buffer *string-output*> nil "config" "github.user")
apply(process-file nil nil #<buffer *string-output*> nil ("config" "github.user"))
(let ((standard-output standard-output)) (apply (quote process-file) git nil standard-output nil args))
(progn (let ((standard-output standard-output)) (apply (quote process-file) git nil standard-output nil args)) (save-current-buffer (set-buffer standard-output) (buffer-string)))
(unwind-protect (progn (let ((standard-output standard-output)) (apply (quote process-file) git nil standard-output nil args)) (save-current-buffer (set-buffer standard-output) (buffer-string))) (kill-buffer standard-output))
(let ((standard-output (get-buffer-create (generate-new-buffer-name " *string-output*")))) (unwind-protect (progn (let ((standard-output standard-output)) (apply (quote process-file) git nil standard-output nil args)) (save-current-buffer (set-buffer standard-output) (buffer-string))) (kill-buffer standard-output)))
(let ((git (executable-find "git"))) (let ((standard-output (get-buffer-create (generate-new-buffer-name " *string-output*")))) (unwind-protect (progn (let ((standard-output standard-output)) (apply (quote process-file) git nil standard-output nil args)) (save-current-buffer (set-buffer standard-output) (buffer-string))) (kill-buffer standard-output))))
gh-command-to-string("config" "github.user")
(funcall strip (gh-command-to-string "config" (gh-namespaced-key key)))
(let ((strip (function (lambda (string) (if (> (length string) 0) (substring string 0 (- ... 1))))))) (funcall strip (gh-command-to-string "config" (gh-namespaced-key key))))
gh-config("user")
(or (plist-get (cdr (assoc profile gh-auth-alist)) :username) (plist-get (cdr (assoc profile gh-profile-alist)) :username) (gh-config "user"))
(let* ((profile (gh-profile-current-profile)) (user (or (plist-get (cdr (assoc profile gh-auth-alist)) :username) (plist-get (cdr (assoc profile gh-profile-alist)) :username) (gh-config "user")))) (if (not user) (progn (setq user (read-string "GitHub username: ")) (gh-set-config "user" user))) (gh-auth-remember profile :username user) user)
gh-auth-get-username()
(eieio-oset obj (quote :username) (gh-auth-get-username))
(or (eieio-oref obj (quote :username)) (eieio-oset obj (quote :username) (gh-auth-get-username)))
(let ((obj (call-next-method))) (or (eieio-oref obj (quote :username)) (eieio-oset obj (quote :username) (gh-auth-get-username))) obj)
gh-authenticator(gh-oauth-authenticator "auth")
apply(gh-authenticator (gh-oauth-authenticator "auth"))
call-next-method()
(let ((obj (call-next-method))) (or (eieio-oref obj (quote :token)) (eieio-oset obj (quote :token) (gh-auth-get-oauth-token))) obj)
gh-oauth-authenticator(gh-oauth-authenticator "auth")
apply(gh-oauth-authenticator (gh-oauth-authenticator "auth"))
eieio-generic-call(constructor (gh-oauth-authenticator "auth"))
constructor(gh-oauth-authenticator "auth")
apply(constructor gh-oauth-authenticator "auth" nil)
gh-oauth-authenticator("auth")
funcall(gh-oauth-authenticator "auth")
(or (eieio-oref obj (quote :auth)) (funcall gh-api-v3-authenticator "auth"))
(gh-api-set-default-auth obj (or (eieio-oref obj (quote :auth)) (funcall gh-api-v3-authenticator "auth")))
(let ((obj (call-next-method)) (gh-profile-current-profile (gh-profile-current-profile))) (eieio-oset obj (quote :profile) (gh-profile-current-profile)) (eieio-oset obj (quote :base) (gh-profile-url)) (gh-api-set-default-auth obj (or (eieio-oref obj (quote :auth)) (funcall gh-api-v3-authenticator "auth"))) obj)
gh-api-v3(gh-gist-api "api" :sync nil :cache t :num-retries 1)
apply(gh-api-v3 (gh-gist-api "api" :sync nil :cache t :num-retries 1))
eieio-generic-call(constructor (gh-gist-api "api" :sync nil :cache t :num-retries 1))
constructor(gh-gist-api "api" :sync nil :cache t :num-retries 1)
apply(constructor gh-gist-api "api" (:sync nil :cache t :num-retries 1))
gh-gist-api("api" :sync nil :cache t :num-retries 1)
(let ((gh-profile-current-profile (or gh-profile-current-profile (gh-profile-completing-read)))) (gh-gist-api "api" :sync sync :cache t :num-retries 1))
gist-get-api(nil)
(let* ((gh-profile-current-profile (or gh-profile-current-profile (gh-profile-completing-read))) (bufname (format "*%s:gists*" gh-profile-current-profile)) (api (gist-get-api nil))) (if force-reload (progn (pcache-clear (eieio-oref api (quote :cache))) (or background (message "Retrieving list of your gists...")))) (if (and background (not (get-buffer bufname))) nil (let ((resp (gh-gist-list api))) (gh-url-add-response-callback resp (let ((--cl-buffer-- (make-symbol "--buffer--"))) (let* ((v --cl-buffer--)) (set v bufname)) (list (quote lambda) (quote (&rest --cl-rest--)) (list (quote apply) (list ... ...) (list ... --cl-buffer--) (quote --cl-rest--))))) (gh-url-add-response-callback resp (let ((--cl-profile-- (make-symbol "--profile--")) (--cl-buffer-- (make-symbol "--buffer--"))) (progn (let* (...) (set v ...)) (let* (...) (set v bufname))) (list (quote lambda) (quote (&rest --cl-rest--)) (list (quote apply) (list ... ...) (list ... --cl-buffer--) (list ... --cl-profile--) (quote --cl-rest--))))))))
gist-list(nil)
call-interactively(gist-list record nil)
command-execute(gist-list record)
(let ((prefix-arg prefixarg)) (command-execute function (quote record)))
(progn (let ((prefix-arg prefixarg)) (command-execute function (quote record))))
(if function (progn (let ((prefix-arg prefixarg)) (command-execute function (quote record)))))
(let* ((function (and (stringp command-name) (intern-soft command-name))) (binding (and suggest-key-bindings (not executing-kbd-macro) (where-is-internal function overriding-local-map t)))) (setq this-command function) (setq real-this-command function) (if function (progn (let ((prefix-arg prefixarg)) (command-execute function (quote record))))))
lawlist-execute-extended-command(nil "gist-list")
call-interactively(lawlist-execute-extended-command nil nil)
command-execute(lawlist-execute-extended-command)
答案 0 :(得分:1)
看起来(executable-find "git")
返回nil
,最终导致您看到的错误。所以您的问题是git
中没有exec-path
计划。
您可以向下看调试器堆栈,首先注意到call-process
的第一个arg需要是一个字符串(进程名称)。 (使用C-h f call-process
来了解这一点。)