It happens quite often that I want to use the path of the file opened in a certain buffer in Emacs (either the full path or the basename) in another place (a buffer or a different X program, say, a terminal). I wonder whether there is some pre-defined subsystem in the Emacs user interface that would copy the filename of the current buffer ((buffer-file-name)) to the kill-ring.Related things: There is a simple command in emacs-w3m that does an analoguos thing (y -- w3m-print-current-url): it prints the URL and copies it to the kill-ring.Of course, I could simply define the command I want, but I'm asking this question because I hope to learn some user interface subsystem of Emacs that includes such a possibility among other features. (Perhaps, some buffer and path manipulation interfaces.) So that I will know more useful features of Emacs.
Is there a user interface in Emacs allowing one to grab the buffer's filename conveniently?
emacs;filenames;copy paste
I do this:C-x C-v (find-alternate-file)C-a (move-beginning-of-line)C-k (kill-line)C-g (keyboard-quit)It's quicker than using the minibuffer history.  If all you want is the base name, it's even faster - just skip the C-a in the second step.