Get The File Path For The Current Emacs Buffer

May 2022

The absolute full path to the file in the current buffer is in the variable `buffer-file-name`. For example:

(princ buffer-file-name)
Output:
/Users/alan/Grimoire/emacs- Get the file path for the current buffer.org

You can see the value in the GUI with:

C-h v buffer-file-name
end of line