0

I've started using doom-emacs recently with company-mode enabled. When I autocomplete an executable (./progr[ENTER]) in eshell it removes the "./" i.e.: I get "program" instead of "./program" on my command line. When I launch that line, I get the message: "Wrong type argument: sequencep, 771".

Any clue what's going on / how I can fix it? Thanks!

--- stacktrace ---

with toggle-debug-on-error enabled:

 error("%s: command not found" "program")
  eshell-find-interpreter("program" nil nil)
  eshell-external-command("program" nil)
  eshell-plain-command("program" nil)
  eshell-named-command("program")
  eval((eshell-named-command '"program"))
  eshell-do-eval((eshell-named-command '"program") nil)
  eshell-do-eval((prog1 (eshell-named-command '"program") (mapc #'funcall eshell-this-command-hook)) nil)
  (condition-case err (eshell-do-eval '(prog1 (eshell-named-command '"program") (mapc #'funcall eshell-this-command-hook)) nil) ((debug error) (mapc #'funcall eshell-this-command-hook) (eshell-errorn (error-message-string err)) (eshell-close-handles 1)))
  eval((condition-case err (eshell-do-eval '(prog1 (eshell-named-command '"program") (mapc #'funcall eshell-this-command-hook)) nil) ((debug error) (mapc #'funcall eshell-this-command-hook) (eshell-errorn (error-message-string err)) (eshell-close-handles 1))))
  eshell-do-eval((condition-case err (eshell-do-eval '(prog1 (eshell-named-command '"program") (mapc #'funcall eshell-this-command-hook)) nil) ((debug error) (mapc #'funcall eshell-this-command-hook) (eshell-errorn (error-message-string err)) (eshell-close-handles 1))) nil)
  #f(compiled-function () #<bytecode -0x13dc3821b05c18d2>)()
  funcall(#f(compiled-function () #<bytecode -0x13dc3821b05c18d2>))
  (let ((eshell-this-command-hook '(ignore))) (funcall '#f(compiled-function () #<bytecode -0x13dc3821b05c18d2>)))
  eval((let ((eshell-this-command-hook '(ignore))) (funcall '#f(compiled-function () #<bytecode -0x13dc3821b05c18d2>))))
  eshell-do-eval((let ((eshell-this-command-hook '(ignore))) (condition-case err (eshell-do-eval '(prog1 (eshell-named-command '"program") (mapc #'funcall eshell-this-command-hook)) nil) ((debug error) (mapc #'funcall eshell-this-command-hook) (eshell-errorn (error-message-string err)) (eshell-close-handles 1)))) nil)
  eshell-do-eval((progn (let ((eshell-this-command-hook '(ignore))) (condition-case err (eshell-do-eval '(prog1 (eshell-named-command ...) (mapc ... eshell-this-command-hook)) nil) ((debug error) (mapc #'funcall eshell-this-command-hook) (eshell-errorn (error-message-string err)) (eshell-close-handles 1))))) nil)
  (catch 'top-level (eshell-do-eval '(progn (let ((eshell-this-command-hook '...)) (condition-case err (eshell-do-eval '... nil) ((debug error) (mapc ... eshell-this-command-hook) (eshell-errorn ...) (eshell-close-handles 1))))) nil))
  eval((catch 'top-level (eshell-do-eval '(progn (let ((eshell-this-command-hook ...)) (condition-case err (eshell-do-eval ... nil) (... ... ... ...)))) nil)))
  eshell-do-eval((catch 'top-level (eshell-do-eval '(progn (let ((eshell-this-command-hook ...)) (condition-case err (eshell-do-eval ... nil) (... ... ... ...)))) nil)) nil)
  eshell-do-eval((progn 'nil (catch 'top-level (eshell-do-eval '(progn (let (...) (condition-case err ... ...))) nil)) (run-hooks 'eshell-post-command-hook)) nil)
  #f(compiled-function () #<bytecode -0x13dc3821b05c18d2>)()
  funcall(#f(compiled-function () #<bytecode -0x13dc3821b05c18d2>))
  (let ((eshell-current-handles '[nil (t . 1) (t . 1)]) (eshell-current-subjob-p 'nil)) (funcall '#f(compiled-function () #<bytecode -0x13dc3821b05c18d2>)))
  eval((let ((eshell-current-handles '[nil (t . 1) (t . 1)]) (eshell-current-subjob-p 'nil)) (funcall '#f(compiled-function () #<bytecode -0x13dc3821b05c18d2>))))
  eshell-do-eval((let ((eshell-current-handles '[nil (t . 1) (t . 1)]) eshell-current-subjob-p) (progn 'nil (catch 'top-level (eshell-do-eval '(progn (let ... ...)) nil)) (run-hooks 'eshell-post-command-hook))))
  eshell-resume-eval()
  eshell-eval-command((let ((eshell-current-handles '[nil (t . 1) (t . 1)]) eshell-current-subjob-p) (progn 'nil (catch 'top-level (eshell-do-eval '(progn (let ... ...)) nil)) (run-hooks 'eshell-post-command-hook))) "program")
  eshell-send-input(nil)
  funcall-interactively(eshell-send-input nil)
  command-execute(eshell-send-input)
Crowl
  • 37
  • 5
  • try `M-x toggle-debug-on-error` and check what is being called in the stacktrace – Rorschach Nov 08 '22 at 19:27
  • @Rorschach I added the stacktrace to my post. See anything there that could help? Other than it interpreting the string literally after autocompletion I don't see much... – Crowl Nov 10 '22 at 17:32
  • What company backends are you using in eshell? (`C-u M-;` `company-backends`). If you call `(edebug-defun)` on `company-shell` (assuming that backend is being used?) does it get the prefix of "./" appropriately? – Rorschach Nov 11 '22 at 00:05
  • It seems I'm using company-capf. From describe-variable company-backends: `Value in # (company-capf) Original Value (company-bbdb company-semantic company-cmake company-capf company-clang company-files (company-dabbrev-code company-gtags company-etags company-keywords) company-oddmuse company-dabbrev) ` Still fairly new to emacs, I couldn't figure out how to run `(debug-defun)` ... – Crowl Nov 12 '22 at 21:19
  • ok, what is the value of `completion-at-point-functions` (these are used by `company-capf`)? They can use a post-completion hook that might be trimming your results. (to debug a function, call `M-x edebug-defun` with your cursor on the function body) – Rorschach Nov 17 '22 at 18:16
  • 1
    actually, if you're TAB completing in the shell, you probably aren't using company at all, but instead triggering `completion-at-point`, which tries the functions in `completion-at-point-functions` untill one does something – Rorschach Nov 17 '22 at 18:20
  • Your last comment helped me figure it out! Thanks a lot Rorschach! I looked up which modes where active in eshell, and found that eshell-cmpl-mode was there. TAB is bound to completion-at-point like you mentionned. C-c TAB is bound to pcomplete-expand-and-complete which works! The why though kind of escapes me for the moment. – Crowl Dec 26 '22 at 14:31

0 Answers0