How do I create an empty file in emacs?

Posted by Singletoned on Stack Overflow See other posts from Stack Overflow or by Singletoned
Published on 2010-04-07T11:49:56Z Indexed on 2010/04/07 11:53 UTC
Read the original article Hit count: 188

Filed under:
|
|
|

How can I create an empty file from emacs, ideally from within a dired buffer?

For example, I've just opened a Python module in dired mode, created a new directory, opened that in dired, and now need to add an empty __init__.py file in the directory.

If I use C-x C-f __init__.py RET C-x C-s then emacs doesn't create the file because no changes have been made to it. I would have to type in the file, save it, delete my typing and then save it again for that to work.

Thanks

© Stack Overflow or respective owner

Related posts about emacs

Related posts about elisp