Can I create directories that don't exist while creating a new file in emacs?
Posted
by Jim
on Super User
See other posts from Super User
or by Jim
Published on 2010-04-16T01:32:39Z
Indexed on
2010/04/16
1:33 UTC
Read the original article
Hit count: 410
In emacs, I create a file by visiting it with C-x C-f. Let's say I'd like to create /home/myself/new_directory/file.txt.
If new_directory does not exist yet, is there a way to have it get created during the creation of file.txt without any extra steps? (I'm thinking of something like using the -p flag to mkdir in Linux.)
I feel like there's a different keystroke instead of C-x C-f that can do this, but I can't remember what it is.
© Super User or respective owner