[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: subsitute for current file name in buffer in emacs
From: |
Drew Adams |
Subject: |
RE: subsitute for current file name in buffer in emacs |
Date: |
Sat, 26 Jan 2008 08:58:03 -0800 |
> > now instead for putting abc.cpp is there a variable or command which
> > substitutes itself as the file name in current buffer when used ?
>
> Try evaluating this:
> (file-name-nondirectory (buffer-file-name))
Sorry, I misread the question. Yes, `buffer-file-name' is what you want, if
you want the name of the current buffer's file.
I mistakenly thought you wanted to use a file name that is text in some
buffer.