From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: How to insert buffer name into buffer Date: Sun, 6 Nov 2005 10:47:12 -0500 Message-ID: <20051106104712.441eb625@dellap> References: Reply-To: gebser@speakeasy.net NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1131292167 16241 80.91.229.2 (6 Nov 2005 15:49:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Nov 2005 15:49:27 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 06 16:49:24 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EYmk4-0003QG-0J for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Nov 2005 16:47:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EYmk3-0004KJ-HR for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Nov 2005 10:47:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EYmjv-0004KC-7n for help-gnu-emacs@gnu.org; Sun, 06 Nov 2005 10:47:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EYmjt-0004K0-Ia for help-gnu-emacs@gnu.org; Sun, 06 Nov 2005 10:47:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EYmjt-0004Jx-Dz for help-gnu-emacs@gnu.org; Sun, 06 Nov 2005 10:47:25 -0500 Original-Received: from [69.17.117.30] (helo=mail28.sea5.speakeasy.net) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EYmjt-0006zg-Fl for help-gnu-emacs@gnu.org; Sun, 06 Nov 2005 10:47:25 -0500 Original-Received: (qmail 15959 invoked from network); 6 Nov 2005 15:47:22 -0000 Original-Received: from dsl093-011-017.cle1.dsl.speakeasy.net (HELO dellap) ([66.93.11.17]) (envelope-sender ) by mail28.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 6 Nov 2005 15:47:22 -0000 Original-To: help-gnu-emacs@gnu.org In-Reply-To: X-Mailer: Sylpheed-Claws 1.0.3 (GTK+ 1.2.10; i686-suse-linux) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30873 Archived-At: 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 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