I've been using Treemacs for weeks now, but this morning suddenly all the treemacs commands I invoke (treemacs, treemacs-add-project etc) all return the same error: Wrong type argument: arrayp, nil
How can I fix this? Please let me know if you need more details.
Try again with debug-on-error enabled. I'll need a stack trace to track this down.
It's probably related to this change: https://github.com/Alexander-Miller/treemacs/commit/38f5c7622815ee745e7a282047cc1b6cdefb002c#diff-a2c7a1c83fcd607a27b04f61df3cf555L56, but the workspace list is filled on the first run. How do you start treemacs?
Sure, here is the backtrace I get when I invoke treemacs (through my keybinding super-1):
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
treemacs--init()
treemacs()
funcall-interactively(treemacs)
call-interactively(treemacs nil nil)
command-execute(treemacs)
When I try to add a project "counter-app" (C-c C-p a) I get:
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
treemacs-add-project-to-workspace("/Users/ianyepan/counter-app/")
funcall-interactively(treemacs-add-project-to-workspace "/Users/ianyepan/counter-app/")
call-interactively(treemacs-add-project-to-workspace nil nil)
command-execute(treemacs-add-project-to-workspace)
For your reference here's my treemacs config:
(use-package treemacs
:after evil
:config
(global-set-key (kbd "s-1") 'treemacs)
(setq treemacs-fringe-indicator-mode nil
treemacs-no-png-images t
treemacs-width 40
treemacs-silent-refresh t
treemacs-silent-filewatch t
treemacs-file-event-delay 1000
treemacs-file-follow-delay 0.1)
(use-package treemacs-evil
:after treemacs
:config
(evil-define-key 'treemacs treemacs-mode-map (kbd "l") 'treemacs-RET-action)
(evil-define-key 'treemacs treemacs-mode-map (kbd "h") 'treemacs-TAB-action))
(use-package treemacs-projectile :after treemacs projectile)
(use-package treemacs-magit :after treemacs magit))
Should be fixed now, though you may have to rebuild your workspace layout (I fixed a bug that would sometimes wipe it on update yesterday, I guess that's what happened to you originally).
Yes, after pulling the update from MELPA, the issue disappeared. Cheers!
Most helpful comment
Should be fixed now, though you may have to rebuild your workspace layout (I fixed a bug that would sometimes wipe it on update yesterday, I guess that's what happened to you originally).