syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.64k stars 4.89k forks source link

Buggy treemacs projectile project renaming in X11 mode #15040

Closed programmador closed 2 weeks ago

programmador commented 3 years ago

I've tried to reinstall Spacemacs, always with same results. Branch is 'develop'. It started to happen maybe a month ago, maybe earlier - I do not remember when did I upgrade and how long I didn't upgrade before.

I'm performing renaming this way:

  1. Open Treemacs: C-m f t
  2. Hover a project to rename with keyboard arrows (or with p or n)
  3. Launch renaming: C-c C-p r

So here's what is happening when I'm trying to rename project in terminal (emacs -nw): screenshot_2021-09-09-123936 Spacemacs creates an input field at the bottom of UI. Everything works perfectly.

But when I try to do the same in X11 mode recent versions do not behave as before. Old versions opened an input field (smaller font) near the project name, I could enter new name and press enter. But now the input field opens but it does not get input focus and I don't know how to switch to it as it's not a buffer as I understand. Instead the original (blue bigger font on screenshot) receives an input focus. Actually the input is quite buggy this way - I cannot enter new chars but can delete existing. And when I do it - Treemacs renames the folder on the disk instead of renaming the projectile project. BTW the input field which should receive focus but does not receive never disappears until I restart spacemacs. Here's how does it look like (I can edit the string near 'folder' icon, not near 'New name' string): screenshot_2021-09-09-124113 It does not disappear even when I close Treemacs: screenshot_2021-09-09-125415

programmador commented 3 years ago

Hmm it seems that I can just click an appeared field with a mouse and perform a rename in X11. Strange how I didn't realize it before.

So probably the essense of the issue is that the input field just does not get focus by default as it did before.

lebensterben commented 2 years ago

Confirmed

lebensterben commented 2 years ago

@programmador I've tested it with vanilla emacs and the problem persists.

  1. start vanilla emacs with emacs -Q
  2. for convenience I added all elpa directories to load-path
    (require 'cl-lib)
    (let ((fpaths (seq-filter #'file-directory-p (directory-files (expand-file-name "~/.emacs.d/elpa/27.2/develop")))))
     (cl-loop for fpath in fpaths
              do (add-to-list 'load-path fpath)))
  3. Then load treemacs and cfrs (the latter is required since it panics otherwise)
    (require 'treemacs)
    (require 'cfrs)
  4. Open treemacs buffer with (treemacs) and try to rename a project with said key bindings
  5. You'll find the same bug that the input box is not focused

Therefore this should be reported to upstream.

github-actions[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

smile13241324 commented 2 weeks ago

Upstream bug