In Emacs, how to print the name of the current file that I am editing? The built-in function buffer-file-name gives the full path of your file.To get the file name:M-: buffer-file-name Answered by Eric Z Ma.Related posts:How to convert between dos and unix file coding in Emacs? How to merge a commit from another branch to my current branch in git? How to get a FILE pointer from a file descriptor and how to get a file descriptor from a FILE pointer in C on Linux? How to print a plain text file to printers from a terminal in Linux Emacs highlighting part of lines that go over 80 chars Replacing with a string with newline in Emacs?