Reputation: 71
This question may sound stupid. But I do search online and couldn't find a answer. So what's the emacs command to clear all the content in a file? I want to clear my error_log file.
Upvotes: 4
Views: 4673
Reputation: 11203
Is M-x erase-buffer
what you are looking for? Note that it is disabled by default because new users find it confusing and you'll be asked about enabling it temporarily or permanently the first time you run it. You can then bind it to a keyboard shortcut for convenience.
Upvotes: 4