reddit / emacs

I want to write to a new file but I can't

that_guu · 2022-08-29 14:42
I dont know how to say this, so Im posting [this image](https://imgur.com/a/Bin0gqN). I want to write to (non existing )file `Training.py` but emacs tries to write to an existing file with similar name. How to avoid this?
anaumann · 2022-08-29 14:50
`counsel-find-file` (that I'm using) has a key binding `C-M-j` to use the typed in filename instead of the first/the selected suggestion. But it depends on the find file function you're using..
Illiamen · 2022-08-29 14:52
Your completion UI will have a way to submit exactly what you typed. In Vertico, I think it's something like `M-RET` or moving up to the input line and then hitting `RET`.
that_guu · 2022-08-29 14:54
Yes I use counsel as well. C-M-j really works! Thanks you.
xtifr · 2022-08-29 18:51
With ivy/counsel, you can also set the `ivy-use-selectable-prompt` variable to 't', This will allow you to move the cursor up to the prompt line to select the exact text you typed. I find this easier to remember/type than C-M-j.
that_guu · 2022-08-29 19:24
I will check it out