Alexander-Miller / treemacs

GNU General Public License v3.0
2.05k stars 151 forks source link

Projet follow mode fails with vterm #1068

Closed pierrelegall closed 7 months ago

pierrelegall commented 7 months ago

Given treemacs-project-follow-mode enabled.

When I run +vterm/here.

Then Error running timer: (wrong-type-argument integer-or-marker-p nil) occurs and the Treemacs buffer is broken, i.e. it only shows an empty directory with no name and is no more refreshed.

More weird, when I set myself treemacs--project-follow-delay to 0.1 instead of the default 1.5, this behavior appends at the second consequent execution of +vterm/here.

Debug output:

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  get-text-property(nil :project)
  treemacs--consolidate-projects()
  treemacs--show-single-project("/" "")
  treemacs--do-follow-project()
  #f(compiled-function () #<bytecode 0x1801a7f5c3d521>)()
  apply(#f(compiled-function () #<bytecode 0x1801a7f5c3d521>) nil)
  timer-event-handler([t 0 1 500000 nil #f(compiled-function () #<bytecode 0x1801a7f5c3d521>) nil idle 0 nil])

Treemacs config:

(use-package! treemacs
  :config
  (treemacs-filewatch-mode)
  (treemacs-add-and-display-current-project-exclusively)
  (treemacs-project-follow-mode))

Treemacs: version 20231109.1915 Emacs: version 29.1 Doom core: v3.0.0-pre, HEAD -> master 98639850 2023-10-07 02:33:45 +0200 Doom modules: v23.09.0-pre, HEAD -> master 98639850 2023-10-07 02:33:45 +0200 System: Archlinux 6.5.9-arch2-1

pierrelegall commented 7 months ago

It is caused by my shell which is fish.

I added this configuration to it and it solved the problem! :partying_face: