LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
LinkBack Search this Thread
Old 01-16-2007, 12:01 AM   #1
jantman
Member
 
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:
<?php
// Filename: " "
//
<?
when I save the file, I want it to become:

PHP Code:
<?php
// Filename: "test.php"
//
<?
Thanks for any help,
Jason
 
Old 01-16-2007, 01:35 PM   #2
studioj
Member
 
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.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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


All times are GMT -5. The time now is 05:41 AM.

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