bbatsov/crux

Crux fails wiith "crux-open-with: Wrong type argument: stringp, nil"

AndersonTorres opened this issue · 3 comments

As the title says, crux-open-with doesn't work.

I have installed it via use-package.

This is the debug message:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
call-process("xdg-open" nil 0 nil nil)
crux-open-with(nil)
funcall-interactively(crux-open-with nil)
call-interactively(crux-open-with nil nil)
command-execute(crux-open-with)

The last argument is supposed to be the current file name but it's nil, this means you are not visiting a file. Error handling in this function should probably detect this case and show a warning message. Care to submit a PR?

When within term or ansi-term window, then C-x key not work, instead you have to use C-c. In this case C-x o(other-window) becomes C-c o, which bind to this crux-open-with function, and this function will show above message in remote ssh mode. Thus you cannot change to other window using keyboard in a term window when connected to remote ssh(Tramp) mode.

Also See: https://www.gnu.org/software/emacs/manual/html_node/emacs/Term-Mode.html

Closing as too old to be relevant. It will be better to reopen it if I found the bug again.