Skip to content
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

Wrong type argument: number-or-marker-p when magit-todos-auto-group-items is non-numeric #92

Closed
hlissner opened this issue Dec 5, 2019 · 1 comment

Comments

@hlissner
Copy link
Contributor

hlissner commented Dec 5, 2019

When magit-todos-auto-group-items is set to 'always or 'never, which its definition suggests is valid, then magit-todos-list-refresh-buffer throws this error (borrowed from doomemacs/doomemacs#2155) when invoking magit-todos-list.

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p always)
  *(always 10)
  (set (make-local-variable (quote magit-todos-auto-group-items)) (* magit-todos-auto-group-items magit-todos-buffer-item-factor))
  magit-todos-list-refresh-buffer()
  apply(magit-todos-list-refresh-buffer nil)
  magit-refresh-buffer()
  magit-setup-buffer-internal(magit-todos-list-mode nil nil)
  (let ((default-directory directory)) (magit-setup-buffer-internal (function magit-todos-list-mode) nil (list)))
  magit-todos-list-internal("/home/brightone/dev/rust/rusteam/")
  (let ((magit--refresh-cache (list (cons 0 0)))) (setq directory (if directory (file-name-as-directory (expand-file-name directory)) default-directory)) (magit-todos-list-internal directory))
  (condition-case nil (let ((magit--refresh-cache (list (cons 0 0)))) (setq directory (if directory (file-name-as-directory (expand-file-name directory)) default-directory)) (magit-todos-list-internal directory)) ((quote magit-outside-git-repo) (let* ((vnew (function (lambda (&rest _) default-directory))) (old (symbol-function (quote magit-toplevel)))) (unwind-protect (progn (fset (quote magit-toplevel) vnew) (call-interactively (function magit-todos-list))) (fset (quote magit-toplevel) old)))))
  magit-todos-list(nil)
  funcall-interactively(magit-todos-list nil)
  call-interactively(magit-todos-list nil nil)
  command-execute(magit-todos-list)

The cause: in magit-todos-list-refresh-buffer, magit-todos-auto-group-items is used as though it will always have a numerical value.

@alphapapa
Copy link
Owner

That should do it. Thanks for forwarding the bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants