Dired create or rename a file to a filename that is a substring of an existing file

96 Views Asked by At

In Dired imagine you have the following directory.

| - src
| -  | - text_input.rs

How do you create a file in the src directory named text.rs (in emacs)? How would you rename a file in the same directory to text.rs?

If you try to create a file through 'find file' or rename a file colocated with text_input you can have an issue.

If the file you are trying to create is text.rs, the '.' will be interpreted as a regex "any character" selector. You will not be able to create as find will resolve to text_input. Rename similarly fails, however I don't understand why.

If this is unanswered and you find yourself here I have a gnarly hack. Rename text_input.rs to a placeholder name, rename or create text.rs, then return the name to the text_input.rs.

Edit: Its been brought to my attention this isn't because of vanilla emacs, but because of the combination of tools bundled within doom emacs. Given this I am moving to escalate this within proper channels.

0

There are 0 best solutions below