Learn Emacs: Delete-file-and-buffer Jun 21st, 2011 • Permalink From my ~/.emacs.d (defun delete-file-and-buffer () "Deletes the current file and buffer, assumes file exists" (interactive) (delete-file buffer-file-name) (kill-buffer (buffer-name))) Inspired by Steve Yegge's .emacs file (rename-file-and-buffer)