How to print the name of the current file being edited in Emacs?

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.

Eric Z Ma

Eric is a father and systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *