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.56k stars 4.9k forks source link

Cannot create new file if similar name exists #16443

Closed tigerjack closed 2 weeks ago

tigerjack commented 3 weeks ago

Description :octocat:

I think this bug is related to the following two issues, that were solved at some point. https://github.com/syl20bnr/spacemacs/issues/13551 and https://github.com/syl20bnr/spacemacs/issues/8571

Basically, when I try to create a new file in Spacemacs SPC f f or rename an existing one SPC f R, if a file with a similar name exists, I cannot select the new name.

For instance, if I want to rename _cmds.tex to cmds.tex, I cannot select cmds.tex using the down arrow as before.

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: I cannot select the new name from the minibuffer with down arrow. The mouse left-click works. image

Expected behaviour: :heart: :smile: I can select the new name from the minibuffer using the down arrow.

System Info :computer:

emacs18 commented 3 weeks ago

Did you try Control-o while selecting with helm? This is how I select the new name being typed rather than any other name.

tigerjack commented 3 weeks ago

@emacs18 thanks, it seems to work indeed. Still, before, it was working by just using the down arrow. Is this the expected behavior?

emacs18 commented 3 weeks ago

For me Control-o or UP arrow work. DOWN arrow moves the cursor even further away from the top item which you are typing. I've been using helm for many years. I don't think anything changed recently.

fnussbaum commented 2 weeks ago

In https://github.com/emacs-helm/helm/commit/a4380caef3a9e4b1e8d11458852ab67ba9b4cf58, the default value of helm-move-to-line-cycle-in-source was changed to t. Spacemacs does not customize this variable.

tigerjack commented 2 weeks ago

For me Control-o or UP arrow work.

Thank you for pointing out an alternative.

In emacs-helm/helm@a4380ca, the default value of helm-move-to-line-cycle-in-source was changed to t. Spacemacs does not customize this variable.

And that should be the culprit I guess. I will try to change this variable and test it soon. Many thanks!

emacs18 commented 2 weeks ago

The value of the variable does not matter much in that the new item being typed can be reached. Whether it is t or nil, Control-o works. Up/down arrows work slightly differently depending on the value of the variable. If the variable is nil, then down arrow needs to be used to reach the item being typed. If the variable is t, then up arrow needs to be used to reach the item being typed. Thus the new item being typed can be reached either via Control-o or via up/down arrows.

smile13241324 commented 2 weeks ago

If this variable is not true control-j and control-k does not longer work as expected breaking the evil workflow. I have noticed that too but did not come around to investigate.

I'll let the helm layer customise this var.