From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: how to reference the current *.el file in elisp Date: Thu, 25 Jun 2009 03:23:22 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1245915651 19138 80.91.229.12 (25 Jun 2009 07:40:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Jun 2009 07:40:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 25 09:40:45 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MJjZc-0002fQ-LQ for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Jun 2009 09:40:44 +0200 Original-Received: from localhost ([127.0.0.1]:58759 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJjZc-0007W0-5a for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Jun 2009 03:40:44 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed2.telusplanet.net!newsfeed.telus.net!feeder.erje.net!eternal-september.org!news.eternal-september.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-X-Trace: news.eternal-september.org U2FsdGVkX18z8W/zLlFQV6UrtbFYFiVNeUPmJt398bOJjd8eaPS1TDQpYxdKbCycK/5d1dfcihXKjybdNG71npX2vr2dMlH6W8JxfAYZNiDkXcAzjgACPdvNVkwl7OyJr3m8j5XPev0= Original-X-Complaints-To: abuse@eternal-september.org Original-NNTP-Posting-Date: Thu, 25 Jun 2009 07:25:27 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1/6N+DRMqWSn0Cz9zgbyuKxYsDemw9c3V8= Cancel-Lock: sha1:uZCPV08HWNm9J/0autVhnfFyebE= User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Mail-Copies-To: nobody Original-Xref: news.stanford.edu gnu.emacs.help:170275 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:65494 Archived-At: In article , Harry Putnam wrote: > How does elisp reference the current *.el file?... I mean like in the > way that the variable $0 carries the the value that is the full name > of the script its in. > What I'm really after is a say to to add that value to a message > ('(message "hello")') > > Like this message (wrapped for mail): > > (message "hello world -- from > /cvsb/reader/home/reader/lisp/site-start.el") > (sit-for 1) > > that I use sometimes when tracking down how things are loading. > > How can I reference the name in a variable instead of writing it out? load-file-name -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group ***