Closed buster closed 9 years ago
Also, package updates used to work for some time with git-gutter+, so it is possible to be a bug introduced in one of the later commits? Can't tell exactly when this started to appearing though :(
This looks exactly like issue 16. Are you using Emacs 25?
I am using Emacs 24.4.1 from Debian with prelude and emacs in daemon mode, running "emacsclient".. But running emacs in non-daemon mode shows the same error..
Could you try the following (copy-pasted from issue 16)?
Please try to load the uncompiled source by adding to following to your config:
(load "path/to/git-gutter+.el")
That should give a more detailed backtrace. Right now, I can't see which function call is failing.
Ok.. trying to install ac-helm now leads to this:
Debugger entered--Lisp error: (wrong-number-of-arguments nil 0)
signal(wrong-number-of-arguments (nil 0))
(if (= (length --cl-rest--) 2) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal (quote wrong-number-of-arguments) (list nil (length --cl-rest--))))
(let* ((--cl-rest-- (git-gutter+-diff curfile)) (diff-header (if (= (length --cl-rest--) 2) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal (quote wrong-number-of-arguments) (list nil (length --cl-rest--))))) (diffinfos (car --cl-rest--))) (setq git-gutter+-diff-header diff-header git-gutter+-diffinfos diffinfos) (save-restriction (widen) (funcall git-gutter+-view-diff-function diffinfos)))
(progn (let* ((--cl-rest-- (git-gutter+-diff curfile)) (diff-header (if (= (length --cl-rest--) 2) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- ...))) (signal (quote wrong-number-of-arguments) (list nil (length --cl-rest--))))) (diffinfos (car --cl-rest--))) (setq git-gutter+-diff-header diff-header git-gutter+-diffinfos diffinfos) (save-restriction (widen) (funcall git-gutter+-view-diff-function diffinfos))))
git-gutter+-process-diff("/home/buster/.emacs.d/elpa/ac-helm-20140919.917/ac-helm-autoloads.el")
(if (file-remote-p file) (let* ((repo-root (git-gutter+-root-directory file)) (default-directory (git-gutter+-remote-default-directory repo-root file))) (git-gutter+-process-diff (git-gutter+-remote-file-path repo-root file))) (git-gutter+-process-diff (git-gutter+-local-file-path file)))
(progn (if (file-remote-p file) (let* ((repo-root (git-gutter+-root-directory file)) (default-directory (git-gutter+-remote-default-directory repo-root file))) (git-gutter+-process-diff (git-gutter+-remote-file-path repo-root file))) (git-gutter+-process-diff (git-gutter+-local-file-path file))))
(if (and file (file-exists-p file)) (progn (if (file-remote-p file) (let* ((repo-root (git-gutter+-root-directory file)) (default-directory (git-gutter+-remote-default-directory repo-root file))) (git-gutter+-process-diff (git-gutter+-remote-file-path repo-root file))) (git-gutter+-process-diff (git-gutter+-local-file-path file)))))
(let ((file (buffer-file-name))) (if (and file (file-exists-p file)) (progn (if (file-remote-p file) (let* ((repo-root (git-gutter+-root-directory file)) (default-directory (git-gutter+-remote-default-directory repo-root file))) (git-gutter+-process-diff (git-gutter+-remote-file-path repo-root file))) (git-gutter+-process-diff (git-gutter+-local-file-path file))))))
git-gutter+-refresh()
(progn (git-gutter+-add-local-hooks) (git-gutter+-refresh))
(if (and (git-gutter+-file-buffer-p) (git-gutter+-in-git-repository-p (buffer-file-name))) (progn (git-gutter+-add-local-hooks) (git-gutter+-refresh)) (if (called-interactively-p (quote any)) (message "No Git repo for current buffer")) (git-gutter+-mode -1))
(if git-gutter+-mode (if (and (git-gutter+-file-buffer-p) (git-gutter+-in-git-repository-p (buffer-file-name))) (progn (git-gutter+-add-local-hooks) (git-gutter+-refresh)) (if (called-interactively-p (quote any)) (message "No Git repo for current buffer")) (git-gutter+-mode -1)) (git-gutter+-remove-local-hooks) (git-gutter+-clear))
(let ((last-message (current-message))) (setq git-gutter+-mode (if (eq arg (quote toggle)) (not git-gutter+-mode) (> (prefix-numeric-value arg) 0))) (if git-gutter+-mode (if (and (git-gutter+-file-buffer-p) (git-gutter+-in-git-repository-p (buffer-file-name))) (progn (git-gutter+-add-local-hooks) (git-gutter+-refresh)) (if (called-interactively-p (quote any)) (message "No Git repo for current buffer")) (git-gutter+-mode -1)) (git-gutter+-remove-local-hooks) (git-gutter+-clear)) (run-hooks (quote git-gutter+-mode-hook) (if git-gutter+-mode (quote git-gutter+-mode-on-hook) (quote git-gutter+-mode-off-hook))) (if (called-interactively-p (quote any)) (progn nil (if (and (current-message) (not (equal last-message (current-message)))) nil (message "Git-Gutter+ mode %sabled" (if git-gutter+-mode "en" "dis"))))))
git-gutter+-mode(t)
(progn (git-gutter+-mode t))
(if (and (buffer-file-name) (not (memq major-mode git-gutter+-disabled-modes)) (not git-gutter+-mode)) (progn (git-gutter+-mode t)))
git-gutter+-turn-on()
run-hooks(find-file-hook)
after-find-file(nil t)
find-file-noselect-1(#<buffer ac-helm-autoloads.el> "~/.emacs.d/elpa/ac-helm-20140919.917/ac-helm-autoloads.el" nil nil "~/projects/dotfiles/.emacs.d/elpa/ac-helm-20140919.917/ac-helm-autoloads.el" (15607993 17))
find-file-noselect("/home/buster/.emacs.d/elpa/ac-helm-20140919.917/ac-helm-autoloads.el")
autoload-find-generated-file()
update-directory-autoloads("/home/buster/.emacs.d/elpa/ac-helm-20140919.917")
package-generate-autoloads(ac-helm "/home/buster/.emacs.d/elpa/ac-helm-20140919.917")
package--make-autoloads-and-stuff([cl-struct-package-desc ac-helm (20140919 917) "Helm interface for auto-complete" ((helm (1 6 3)) (auto-complete (1 4 0)) (popup (0 5 0)) (cl-lib (0 5))) single "melpa" nil ((:keywords "completion" "convenience" "helm")) nil] "/home/buster/.emacs.d/elpa/ac-helm-20140919.917")
package-unpack([cl-struct-package-desc ac-helm (20140919 917) "Helm interface for auto-complete" ((helm (1 6 3)) (auto-complete (1 4 0)) (popup (0 5 0)) (cl-lib (0 5))) single "melpa" nil ((:keywords "completion" "convenience" "helm")) nil])
package-install-from-archive([cl-struct-package-desc ac-helm (20140919 917) "Helm interface for auto-complete" ((helm (1 6 3)) (auto-complete (1 4 0)) (popup (0 5 0)) (cl-lib (0 5))) single "melpa" nil ((:keywords "completion" "convenience" "helm")) nil])
mapc(package-install-from-archive ([cl-struct-package-desc ac-helm (20140919 917) "Helm interface for auto-complete" ((helm (1 6 3)) (auto-complete (1 4 0)) (popup (0 5 0)) (cl-lib (0 5))) single "melpa" nil ((:keywords "completion" "convenience" "helm")) nil]))
package-download-transaction(([cl-struct-package-desc ac-helm (20140919 917) "Helm interface for auto-complete" ((helm (1 6 3)) (auto-complete (1 4 0)) (popup (0 5 0)) (cl-lib (0 5))) single "melpa" nil ((:keywords "completion" "convenience" "helm")) nil]))
package-install([cl-struct-package-desc ac-helm (20140919 917) "Helm interface for auto-complete" ((helm (1 6 3)) (auto-complete (1 4 0)) (popup (0 5 0)) (cl-lib (0 5))) single "melpa" nil ((:keywords "completion" "convenience" "helm")) nil])
package-install-button-action(#<marker (moves after insertion) at 75 in *Help*>)
button-activate(#<marker (moves after insertion) at 75 in *Help*> nil)
push-button(75)
push-button((mouse-2 (#<window 8 on *Help*> 75 (329 . 44) 4828461 nil 75 (40 . 2) nil (7 . 8) (0 . 18))))
#<subr call-interactively>(push-button nil nil)
ad-Advice-call-interactively(#<subr call-interactively> push-button nil nil)
apply(ad-Advice-call-interactively #<subr call-interactively> (push-button nil nil))
call-interactively(push-button nil nil)
command-execute(push-button)
Ok, i think it has definitely to do with symlinks. My .emacs.d directory is a symlink to a repository where i keep my dot files. Now, the during the updates something like find-file is running in the symlink and triggering this bug in git-gutter+.
When i run find-file and point it to another symlink i get the same error. But only when the symlink is not a symlink to a file in the same directory (i think).
Hope that helps.
That helped, thanks!
I'll fix this in the next release. Meanwhile, here's a super quick fix which disables git-gutter+ on symlinked files.
Great, i'll just disable git gutter during package updates for now, since luckily, i don't edit symlinked files too often.. :)
How about releasing a fixed version?
Here's the latest news on symlinks.
Everytime i run package-list, mark all upgrades and press X to run those upgrades i get an error, so the updates don't run. I've found that this is not happening when disabling the git gutter global mode.
I think i sometimes (but only sometimes) get an error in find-files, but i can reproduce this behaviour 100% with list-packages.