[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: insert name of current file
From: |
Dirk-Jan C . Binnema |
Subject: |
Re: insert name of current file |
Date: |
Wed, 26 Jan 2011 00:09:42 +0200 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) Emacs/24.0 Mule/6.0 (HANACHIRUSATO) |
>>>>> On Tue, 25 Jan 2011 16:59:03 -0500, Gradivus wrote:
> [1 <text/plain; ISO-8859-1 (7bit)>]
> Hi,
> Sorry I'm a noob.
> I wonder if someone knows how I can insert the current file's name
> (i.e., the name of the file I'm editing) at the cursor, and without the full
> path.
M-: (insert-string (file-name-nondirectory (buffer-file-name))) RET
If you need it more often, you can of course write a function for it.
Best wishes,
Dirk.
--
Dirk-Jan C. Binnema Helsinki, Finland
e:djcb@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C