Alexander-Miller / treemacs

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

Unable to open files #1075

Closed mberrueta closed 9 months ago

mberrueta commented 10 months ago

Im unable to open files from treemacs

using RET I get button-activate: Symbol’s function definition is void: nil using o I get cond: Buffer is read-only: #<buffer *Treemacs-Scoped-Buffer-#<frame F1 0x7f7cda855428>*>

I tried to configure with different ways without success, like

(with-eval-after-load 'treemacs
    (treemacs-define-RET-action 'file-node-closed #'treemacs-visit-node-ace)
    (treemacs-define-RET-action 'file-node-open #'treemacs-visit-node-ace))

[Treemacs] v3.1 (installed 2023.12.07) @ Emacs 29.1

Using DOOM:

generated  Dec 07, 2023 11:33:54
system     MacOS 14.1.2 Darwin 23.1.0 x86_64
emacs      29.1 ~/.emacs.d/
doom       3.0.0-pre PROFILE=_@0 HEAD -> master, origin/master, origin/HEAD 986398504
           2023-10-07 02:33:45 +0200 ~/.dotfiles/emacs/doom/
shell      /bin/zsh
features   ACL CAIRO FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JSON LCMS2 LIBXML2
           MODULES NOTIFY KQUEUE PDUMPER PNG RSVG SQLITE3 THREADS TOOLKIT_SCROLL_BARS
           TREE_SITTER WEBP X11 XDBE XIM XPM LUCID ZLIB
traits     tty envvar-file custom-file
custom     package-selected-packages magit-todos-insert-after
modules    :config use-package :completion company vertico :ui doom doom-dashboard
           (emoji +unicode) hl-todo modeline neotree ophints (popup +defaults)
           (vc-gutter +pretty) vi-tilde-fringe workspaces :editor (evil +everywhere)
           file-templates fold multiple-cursors snippets :emacs dired electric undo vc
           :checkers syntax (spell +flyspell) :tools direnv docker (eval +overlay)
           lookup magit :os macos :lang clojure emacs-lisp json javascript markdown
           org (ruby +rails) sh yaml :config literate (default +bindings +smartparens)
packages   (treemacs-evil) (avy) (evil-terminal-cursor-changer) (winum) (origami)
           (windresize) (golden-ratio) (xclip) (rust-mode) (rustic) (flycheck-rust)
           (slint-mode) (highlight-indent-guides) (evil-matchit) (keycast) (eglot)
           (elixir-mode) (elixir-ts-mode) (elixir-yasnippets) (exunit)
           (flycheck-credo) (flycheck-eglot) (flycheck-elixir) (inf-elixir)
           (yasnippet-snippets) (csv-mode) (dart-mode) (lsp-mode) (lsp-dart)
           (lsp-treemacs) (flycheck) (company) (lsp-ui) (hover)
elpa       yaml treemacs spinner s posframe pkg-info pfuture markdown-mode lv lsp-ui
           lsp-treemacs lsp-mode lsp-docker lsp-dart hydra ht hover flycheck f epl
           eldoc eglot dash dart-mode dap-mode company cfrs bui avy ace-window
Alexander-Miller commented 9 months ago

The code looks correct and works for me. Maybe I'll see something if you add a stack trace with toggle-debug-on-error, but my money's on this being a doom quirk.

mberrueta commented 9 months ago

finally I figure it out. when I enter to treemacs enter like in normal mode and this error happens. If I press I and enter in edit mode it works well

¯_(ツ)_/¯

rhinoman commented 4 months ago

Strange, I just came across this in emacs 29.3 (using evil mode). Had to enter insert mode for it to work. Works fine in emacs GUI mode actually, the problem only occurs in terminal mode for me.

Alexander-Miller commented 4 months ago

Are you using treemacs-evil? It provides its own treemacs-evil-state that ensures all the keybinds work as intended.

rhinoman commented 4 months ago

Heh, I am now. Thanks :)