Alexander-Miller / treemacs

GNU General Public License v3.0
2.09k stars 152 forks source link

Byte-compilation warning #913

Closed aaronjensen closed 2 years ago

aaronjensen commented 2 years ago

On Emacs 29 I'm now seeing this when byte-compiling my config:

Error (use-package): treemacs-tab-bar/:config: Wrong type argument: stringp, (Git "~/.emacs.d/")

The form that is triggering it is:

(use-package treemacs-tab-bar
  :after (treemacs)
  :demand t
  :config
  (treemacs-set-scope-type 'Tabs))

Specifically: (treemacs-set-scope-type 'Tabs)

Unfortunately, I don't get any more information so I'm not sure how to further debug it. Do any of you recognize that argument or know what the issue could be my chance?

aaronjensen commented 2 years ago

Wrapping the above form in (unless noninteractive ...) fixed this for me. It's not clear why it was evaluating this during my byte compilation task.

Alexander-Miller commented 2 years ago

There's probably something in your config that loads treemacs earlier than you think (I think I had such a problem some time ago due to dired), so that your tab-bar config is executed during compilation.

As for the error I assume that (Git "~/.emacs.d/") is one of your projects, as it would be reported by (project-current)? If that's the case then it might have been fixed by https://github.com/Alexander-Miller/treemacs/commit/6d232b76623ff2cf82fd9a5e1feb1020b909a6a8.

aaronjensen commented 2 years ago

Thanks, looks like 6d232b7 fixed it for me.