emacs create new file with ido enabled

EmacsIdo ModeIdo

Emacs Problem Overview


I reciently switched to emacs starter kit which includes the ido package.

ido has a nice feature that suggests paths when find-file which is usually very handy except when trying to create a new file. When the new file name matches a suggestion in another path ido automatically switches to that path assuming that's what I wanted, but usually its not and I find it annoying.

To workaround the issue I either touch newfile from shell, create a new buffer and save as, or M-x find-file to get the original behavior. I could of course rebind C-x C-f to find-file again but must of the time I like ido-find-file, I just want it to stop automatically switching paths when I type the path explicitly.

I figure there is probably some simple key I can press during ido-find-file to tell it that the file I'm looking for does not exist and to stop making suggestions, or some var I can set to get more desirable behavior?

Emacs Solutions


Solution 1 - Emacs

Try:

C-x C-f C-f

It should kick you out of ido mode into "normal" find file mode

Solution 2 - Emacs

C-j is the key combination you are seeking.

Solution 3 - Emacs

As mentioned: being fast, using C-j to confirm immediately, and using and additional C-f to temporarily switch to the traditional mode are all useful.

Also, when ido has already selected an alternate file path, you can hit C-z to return where you were and temporarily disable that behavior.

Solution 4 - Emacs

A solution for a related problem - ido not asking overwrite confirmation.

http://lists.gnu.org/archive/html/bug-gnu-emacs/2010-11/msg00226.html

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKurt HarrigerView Question on Stackoverflow
Solution 1 - EmacsSteve LianoglouView Answer on Stackoverflow
Solution 2 - EmacsI GIVE CRAP ANSWERSView Answer on Stackoverflow
Solution 3 - EmacsMatthewView Answer on Stackoverflow
Solution 4 - EmacssabofView Answer on Stackoverflow