zk-phi / git-complete

Yet another completion engine powered by "git grep"
67 stars 5 forks source link

Error: Wrong type argument: listp, "(selected string)" #27

Open ut0s opened 5 years ago

ut0s commented 5 years ago

I thought this package was very useful and I installed this one. But it didn't work properly.

Specifically, as shown in the title, the following message were displayed in the mini buffer: Error: Wrong type argument: listp, "(selected string)"

ut0s commented 5 years ago

My environment is

GNU Emacs 26.1
(defconst popup-version "0.5.3") <- inside popup.el 

and Backtrace is

Debugger entered--Lisp error: (wrong-type-argument listp "void show(vector<T>& v) {")
  cdr("void show(vector<T>& v) {")
  (cdr (cdr count))
  (if (cdr (cdr count)) (car-safe (prog1 count (setq count (cdr count)))) (signal 'wrong-number-of-arguments (list nil (length count))))
  (let* ((count (popup-menu* (mapcar (function (lambda (e) (popup-make-item (car e) :value e))) filtered) :scroll-bar t :isearch git-complete-enable-isearch :keymap git-complete--popup-menu-keymap)) (str (if (cdr (cdr count)) (car-safe (prog1 count (setq count (cdr count)))) (signal 'wrong-number-of-arguments (list nil (length count))))) (whole-line-p (car-safe (prog1 count (setq count (cdr count))))) (exact-p (car-safe (prog1 count (setq count (cdr count)))))) (progn (git-complete--replace-substring (if whole-line-p (point-at-bol) (point)) (point) str (not exact-p)) (if (or (if omni-from git-complete-repeat-omni-completion git-complete-repeat-line-completion) (if (eq git-complete-repeat-completion 'newline) (looking-back "^[ \011]*") git-complete-repeat-completion)) (progn (let ((git-complete-fallback-function nil)) (git-complete--internal))))))
  (cond (filtered (let* ((count (popup-menu* (mapcar (function (lambda (e) (popup-make-item (car e) :value e))) filtered) :scroll-bar t :isearch git-complete-enable-isearch :keymap git-complete--popup-menu-keymap)) (str (if (cdr (cdr count)) (car-safe (prog1 count (setq count (cdr count)))) (signal 'wrong-number-of-arguments (list nil (length count))))) (whole-line-p (car-safe (prog1 count (setq count (cdr count))))) (exact-p (car-safe (prog1 count (setq count (cdr count)))))) (progn (git-complete--replace-substring (if whole-line-p (point-at-bol) (point)) (point) str (not exact-p)) (if (or (if omni-from git-complete-repeat-omni-completion git-complete-repeat-line-completion) (if (eq git-complete-repeat-completion 'newline) (looking-back "^[ \011]*") git-complete-repeat-completion)) (progn (let ((git-complete-fallback-function nil)) (git-complete--internal))))))) ((and (not next-line-p) git-complete-omni-completion-type) (let ((next-from (save-excursion (cond (omni-from (git-complete--beginning-of-next-word omni-from)) (t (back-to-indentation) (point)))))) (cond (next-from (git-complete--internal next-from)) (git-complete-fallback-function (funcall git-complete-fallback-function)) (t (message "No completions found."))))) (git-complete-fallback-function (funcall git-complete-fallback-function)) (t (message "No completions found.")))
  (let* ((next-line-p (looking-back "^[ \011]*")) (no-leading-whitespaces (looking-back "[ \011]")) (query (save-excursion (if next-line-p (progn (forward-line -1) (end-of-line))) (git-complete--trim-spaces (buffer-substring (or omni-from (point-at-bol)) (point)) t nil))) (candidates (if (string-match "\\_>" query) (progn (git-complete--get-query-candidates query next-line-p)))) (filtered (nconc (if (or next-line-p (null omni-from)) (progn (git-complete--filter-candidates candidates nil (or git-complete-line-completion-threshold (if next-line-p git-complete-next-line-completion-threshold git-complete-whole-line-completion-threshold)) nil))) (if next-line-p nil (git-complete--filter-candidates candidates query (or git-complete-omni-completion-threshold git-complete-threshold) no-leading-whitespaces))))) (cond (filtered (let* ((count (popup-menu* (mapcar (function (lambda (e) (popup-make-item (car e) :value e))) filtered) :scroll-bar t :isearch git-complete-enable-isearch :keymap git-complete--popup-menu-keymap)) (str (if (cdr (cdr count)) (car-safe (prog1 count (setq count (cdr count)))) (signal 'wrong-number-of-arguments (list nil (length count))))) (whole-line-p (car-safe (prog1 count (setq count (cdr count))))) (exact-p (car-safe (prog1 count (setq count (cdr count)))))) (progn (git-complete--replace-substring (if whole-line-p (point-at-bol) (point)) (point) str (not exact-p)) (if (or (if omni-from git-complete-repeat-omni-completion git-complete-repeat-line-completion) (if (eq git-complete-repeat-completion 'newline) (looking-back "^[ \011]*") git-complete-repeat-completion)) (progn (let ((git-complete-fallback-function nil)) (git-complete--internal))))))) ((and (not next-line-p) git-complete-omni-completion-type) (let ((next-from (save-excursion (cond (omni-from (git-complete--beginning-of-next-word omni-from)) (t (back-to-indentation) (point)))))) (cond (next-from (git-complete--internal next-from)) (git-complete-fallback-function (funcall git-complete-fallback-function)) (t (message "No completions found."))))) (git-complete-fallback-function (funcall git-complete-fallback-function)) (t (message "No completions found."))))
  git-complete--internal()
  (lambda nil "Complete the line at point with `git grep'." (interactive) (git-complete--internal))()
  apply((lambda nil "Complete the line at point with `git grep'." (interactive) (git-complete--internal)) nil)
  git-complete()
  funcall-interactively(git-complete)
  call-interactively(git-complete nil nil)
  command-execute(git-complete)
  recursive-edit()
  debug(debug)
  debug--implement-debug-on-entry()
  apply(debug--implement-debug-on-entry nil)
* git-complete()
  funcall-interactively(git-complete)
  call-interactively(git-complete nil nil)
  command-execute(git-complete)