Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treemacs won't show. Error (wrong-type-argument lisp "") #1107

Open
cogfor opened this issue May 16, 2024 · 9 comments
Open

Treemacs won't show. Error (wrong-type-argument lisp "") #1107

cogfor opened this issue May 16, 2024 · 9 comments

Comments

@cogfor
Copy link

cogfor commented May 16, 2024

I am having a hard time getting emacs installed with Treemacs as an IDE for Clojure coding. Whatever I try Treemacs does not show, only an empty buffer is visible.

Please let me know what else I can provide to get this resolved.

Emacs installed using Homebrew on MacOSX Sonoma

brew install emacs-plus@29 --with-imagemagick --with-native-comp --with-modern-sexy-v2-icon --with-xwidgets

Using this init.el file:
init.el.txt

Reported version (M-x treemacs-version):
Treemacs 3.1 Installed 2024.05.16 Emacs 29.3

Steps to reproduce:

  • open emacs emacs --debug-init
  • M-x toggle-debug-on-error
  • M-x treemacs

Error:

Debugger entered--Lisp error: (wrong-type-argument listp "")
  treemacs--setup-mode-line()
  #<subr treemacs-mode>()
  treemacs--mode-check-advice(#<subr treemacs-mode>)
  apply(treemacs--mode-check-advice #<subr treemacs-mode> nil)
  treemacs-mode()
  treemacs--init()
  treemacs(nil)
  funcall-interactively(treemacs nil)
  command-execute(treemacs record)
  counsel-M-x-action("treemacs")
  ivy-call()
  ivy-read("M-x " [company-box--max lsp-erlang-ls-server-start-fun lsp-ui-imenu-window-fix-width vls-tramp archive-proper-file-start lsp-pwsh-help-completion Browse\ URL lsp-ui-doc-hide lsp-xmlls-tramp-after-open-hook access-label :maxLength c-electric-lt-gt lsp-rust-analyzer-injected-modifier-face url-cookie-p cc-vars &error rng-parse-validate-file uniquify-rename-buffer tramp-actions-copy-out-of-band eslint-tramp treemacs-persp-scope edebug-mode-on-hook lisp-mode-map lsp-zig-build-on-save-step treemacs--button-symbol-switch c-make-ml-string-opener-re-function smie-config--guess-value company-box--handle-scroll :where which-key--stop-timer browse-url-gnome-moz-arguments byte-condition-case lsp-elixir-suggest-specs xref--push-markers 0 WatchKind lsp:set-rename-params-uri? lsp-pyls-plugins-flake8-hang-closing lsp-ui-find-workspace-symbol lsp--virtual-buffer lsp-typescript-format-insert-space-after-opening-and-before-closing-nonempty-brackets lsp-lua-hint-enable dash-expand:&JSONResponse? :kill-buffer lsp:set-file-operation-pattern-options? Futura xref-group lsp-rust-analyzer-trait-modifier tramp-handle-make-auto-save-file-name evil-command-window-current-buffer ...] :predicate #f(compiled-function (sym) #<bytecode -0x1f3600338bed889>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  command-execute(counsel-M-x)
@cogfor
Copy link
Author

cogfor commented May 16, 2024

Update: When removing the Nano theme, Treemacs seems to start working. Apparently something in the theme breaks Treemacs

@Alexander-Miller
Copy link
Owner

treemacs--setup-mode-line()

The modeline code is complicated because treemacs supports a few modeline packages that I am not familiar with. Maybe one of them changed its api somehow. Can you tell me where exactly the error is thrown in this function?

@Meqeq
Copy link

Meqeq commented May 31, 2024

I had the same problem, but setting treemacs-user-mode-line-format to a random string solved it.

@cogfor
Copy link
Author

cogfor commented Jun 3, 2024

I can confirm that this indeed fixes the issue. Thanks @Meqeq !

@Alexander-Miller
Copy link
Owner

I had the same problem, but setting treemacs-user-mode-line-format to a random string solved it.

That's not a proper fix since setting that value just means overriding treemacs' builtin modeline.

@Meqeq
Copy link

Meqeq commented Jun 3, 2024

I know, I just wanted to share this temporary fix. However, I found some time to investigate and discovered the cause. The Nano Emacs theme sets mode-line-format to an empty string using setq-default, and treemacs--setup-mode-line function tries to perform memq on this.

((memq 'moody-mode-line-buffer-identification

I'm not sure if there should be a check to see if the default value of mode-line-format is a list or if it should be fixed in Nano Emacs. I don't have much experience with elisp.

Copy link

stale bot commented Aug 3, 2024

This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues).

@stale stale bot added the stale label Aug 3, 2024
@Alexander-Miller
Copy link
Owner

I went with the easy solution for now and added a type check. Does that fix the problem?

@stale stale bot removed the stale label Aug 8, 2024
Copy link

stale bot commented Oct 12, 2024

This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues).

@stale stale bot added the stale label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants