Fork me on GitHub
#emacs
<
2021-09-28
>
Janne Sauvala15:09:11

Does someone has any idea what is happening with projectile, I try to use projectile-find-file but then I get this (caught this with debugger on)

Debugger entered--Lisp error: (file-missing "Setting current directory" "No such file or directory" "/Users/janne.sauvala/Dev/mz-dse/\33]4;0;rgb:28/28/28...")
  call-process-shell-command("git submodule --quiet foreach 'echo $displaypath' ..." nil (t "/var/folders/bt/6tw4mxlj39b0184334ghrf980000gp/T/s..."))
  shell-command("git submodule --quiet foreach 'echo $displaypath' ..." t "*projectile-files-errors*")
  projectile-files-via-ext-command("/Users/janne.sauvala/Dev/mz-dse/\33]4;0;rgb:28/28/28..." "git submodule --quiet foreach 'echo $displaypath' ...")
  projectile-get-immediate-sub-projects("/Users/janne.sauvala/Dev/mz-dse/\33]4;0;rgb:28/28/28...")
  projectile-get-all-sub-projects("/Users/janne.sauvala/Dev/mz-dse/\33]4;0;rgb:28/28/28...")
  #f(compiled-function (s) #<bytecode -0x14160e27c49d5a72>)("/Users/janne.sauvala/Dev/mz-dse/\33]4;0;rgb:28/28/28...")
  mapcar(#f(compiled-function (s) #<bytecode -0x14160e27c49d5a72>) ("/Users/janne.sauvala/Dev/mz-dse/\33]4;0;rgb:28/28/28..."))
  projectile-get-all-sub-projects("/Users/janne.sauvala/Dev/mz-dse/")
  projectile-get-sub-projects-files("/Users/janne.sauvala/Dev/mz-dse/" git)
  projectile-dir-files-alien("/Users/janne.sauvala/Dev/mz-dse/")
  projectile-project-files("/Users/janne.sauvala/Dev/mz-dse/")
  projectile--find-file(nil)
  projectile-find-file(nil)
  funcall-interactively(projectile-find-file nil)
  command-execute(projectile-find-file)
I wonder what is causing that \33]4;0;rgb:28/28/28 to appear to the path

Janne Sauvala15:09:14

I did check projectile issues but didn’t see any obvious duplicates. I’m asking here before opening a new issue.

lukasz15:09:50

That looks like a terminal escape sequence - this is a wild guess, but perhaps your shell init file is always injected and prints something to the output? Depending on the tool used for find-file you might get some colors printed, when it shouldn't be

Janne Sauvala15:09:09

Good point, let me investigate that…

Janne Sauvala17:09:14

My shell init file calls a plugin to set a theme for the shell and it causes those to be printed. Thanks for the hint!

lukasz17:09:49

I have something like this in my bashrc: https://github.com/lukaszkorecki/command-center/blob/master/etc/bashrc#L7-L12 - so you can keep old behavior for interactive sessions only

Janne Sauvala18:09:44

Luckily that did the trick. I had to also disable also starship prompt since it was spamming “not supported” message in Emacs shell

if [ "$TERM" != "dumb" ]
  base16-gruvbox-dark-medium
  starship init fish | source
end