[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to insert buffer name into buffer
From: |
ken |
Subject: |
Re: How to insert buffer name into buffer |
Date: |
Sun, 6 Nov 2005 10:47:12 -0500 |
This function should get you part of the way there:
(defun file-name-into-kill-buffer ()
"Put path/filename of current buffer onto kill-ring so to paste
into an X application."
(interactive)
(let ((str (buffer-file-name)))
(and str
(kill-new str)
(message "Copied %s to kill ring" str)))
)
On Sun, 06 Nov 2005 09:40:08 -0600
bturnip <bturnip@i.hate.spam> wrote:
> I am writing a little function that fills out some of my code
> documentation for me. What I want to do is take the buffer name and
> insert it into the comment block. So if I open a new buffer called
> world_domination.c and then call my function, the result looks
> something like this:
>
> /* * * * * * * * * * * * * * * * * * * * *
> * File name: world_domination.c
> * Author: bturnip
> * File date: 11/11/2011
> .
> .
> .
> etc
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
--
A lot of us are working harder than we want, at things we don't like to
do. Why? ...In order to afford the sort of existence we don't care to
live.
-- Bradford Angier