From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: exits funnel Newsgroups: gmane.emacs.help Subject: Re: Simple lisp question - printing out file name Date: Tue, 10 Jan 2006 12:44:14 -0800 (PST) Message-ID: <20060110204414.4724.qmail@web33901.mail.mud.yahoo.com> References: <87lkxn96v4.fsf@thalassa.informatimago.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1136925964 4427 80.91.229.2 (10 Jan 2006 20:46:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 10 Jan 2006 20:46:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 10 21:45:56 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EwQNI-0005Dm-Lx for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Jan 2006 21:45:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EwQPI-000130-55 for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Jan 2006 15:47:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EwQOC-0000U9-Ba for help-gnu-emacs@gnu.org; Tue, 10 Jan 2006 15:46:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EwQOA-0000Sb-Il for help-gnu-emacs@gnu.org; Tue, 10 Jan 2006 15:46:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EwQOA-0000SM-Au for help-gnu-emacs@gnu.org; Tue, 10 Jan 2006 15:46:42 -0500 Original-Received: from [66.163.178.65] (helo=web33901.mail.mud.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1EwQQf-000308-VD for help-gnu-emacs@gnu.org; Tue, 10 Jan 2006 15:49:18 -0500 Original-Received: (qmail 4726 invoked by uid 60001); 10 Jan 2006 20:44:14 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ttnonLFPobypWfjpXGAEra7Tdse6EzHRI6Dfewx/tHCoy6cYRSfpauKh5rBIlh3GS4ieTOPBOApCh/bd+SngaO6yEy2DXiPKLqPVhYgGoPRq5UwZ/qLw0Okk95Pe0Bo1u64vmOGVo8WWKOk/BBeCo7udRKId0Ckh8lJHtujUKDI= ; Original-Received: from [204.249.220.103] by web33901.mail.mud.yahoo.com via HTTP; Tue, 10 Jan 2006 12:44:14 PST Original-To: help-gnu-emacs@gnu.org In-Reply-To: <87lkxn96v4.fsf@thalassa.informatimago.com> 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:32582 Archived-At: Hi Pascal, This looks like exactly what I want except that it doens't work :) Is time-stamp-string availaible only in cvs emacs? I should have mentioned that I'm running the precompiled emacs 21.3.1 on a windows box. Apropos doesn't show any hits for time-stamp-string. If the case is that your suggested code is only good for cvs emacs, do you know of any older functions which are roughly equivalent? Thanks. -exits --- Pascal Bourguignon wrote: > exits funnel writes: > > > Hello, > > > > I have added to several .el files something like > this: > > > > (message "In prj.el") > > > > to help me straighten out configuration issues. > I'd > > like to make it slightly more sophisicated by (a) > > replacing the hard coded string with some lisp to > read > > the fully qualified file name and (b) to prepend a > > timestamp. I'm sure this is trivial lisp, but > > apparently it's not quite trivial enough for me :) > It > > seems that buffer-file-name and > current-time-string > > should be of interest to me but I can't get them > to > > work inside my message call. Can anyone help me > out > > here? Thanks in advance. > > (message (format "On %s loading %s" > (time-stamp-string) load-file-name)) > > You can also specify the time-stamp-format: > > (time-stamp-string "%:y-%02m-%02d > %02H:%02M:%02S") > > > > -- > __Pascal Bourguignon__ > http://www.informatimago.com/ > > CAUTION: The mass of this product contains the > energy equivalent of > 85 million tons of TNT per net ounce of weight. > _______________________________________________ > help-gnu-emacs mailing list > help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com