Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-16-2007, 01:01 AM   #1
Registered: Nov 2005
Location: New Jersey, USA
Distribution: SuSE
Posts: 492

Rep: Reputation: 31
Emacs - insert filename at save

I use emacs for a LOT of programming.

I absolutely love the timestamp feature, with a save hook, so that when I save a file, it inserts a timestamp and username at Timestamp: " "

Is there any way to get it to do this with the filename?

i.e. I have a PHP file called test.php:

PHP Code:
// Filename: " "
when I save the file, I want it to become:

PHP Code:
// Filename: "test.php"
Thanks for any help,
Old 01-16-2007, 02:35 PM   #2
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
if you are using emacs to do version controll
Cntrl.x v h
will insert the vc header into the file and then after keep it up to date
this will include the file name after the first commit.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
showing emacs filename/buffer in kde panel? lublum1 Linux - General 6 09-21-2008 05:26 AM
How to save fonts option in Emacs ? naihe2010 Linux - Software 3 11-03-2005 12:14 AM
emacs #filename# file question Guvvy Linux - Newbie 3 01-31-2005 07:26 PM
cannot insert latex environment using emacs (C-c C-e) with auctex parv Linux - Software 6 09-02-2004 02:19 AM
EMACS won't save changes vanquisher Linux - Software 4 12-26-2003 07:03 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:30 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration