5

How to get current buffer's filename in emacs?

view full story
linux-howto

http://unix.stackexchange.com – One of the main features I miss about Vim, is that it always saves the filename of the current file in the % buffer (more info). That allows launching commands easily like: ;; compile current file :! gcc % ;; source current file (useful when I'm editing .vimrc :source % ;; get the size of current file :! du -sh % ;; etc, etc... I would like to have similar functionality under emacs (version 24, if that makes any difference), namely have an easy way to insert the name of the file opened in the current buffer. Examples of what I want to do Here I describe some basic use cases as to explain (HowTos)