From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rocky Bernstein Newsgroups: gmane.emacs.devel Subject: Re: relative load-file Date: Fri, 13 Nov 2009 10:06:06 -0500 Message-ID: <6cd6de210911130706s688a5f15xe2cdc14fa77b37bf@mail.gmail.com> References: <4AFCED98.1080209@gmx.de> <6cd6de210911122159k7a0254dcgf74837e08f863db5@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001636b2bc83d11c80047841ff97 X-Trace: ger.gmane.org 1258124798 12675 80.91.229.12 (13 Nov 2009 15:06:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Nov 2009 15:06:38 +0000 (UTC) Cc: grischka , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 13 16:06:31 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N8xjB-0003Sw-Hz for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2009 16:06:21 +0100 Original-Received: from localhost ([127.0.0.1]:60990 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8xjA-0000BA-Sb for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2009 10:06:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8xj4-00008e-BT for emacs-devel@gnu.org; Fri, 13 Nov 2009 10:06:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8xiz-0008Rs-0v for emacs-devel@gnu.org; Fri, 13 Nov 2009 10:06:13 -0500 Original-Received: from [199.232.76.173] (port=35905 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8xiy-0008Rm-Tu for emacs-devel@gnu.org; Fri, 13 Nov 2009 10:06:08 -0500 Original-Received: from mail-pw0-f47.google.com ([209.85.160.47]:40175) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N8xiy-0000R6-Bk for emacs-devel@gnu.org; Fri, 13 Nov 2009 10:06:08 -0500 Original-Received: by pwi9 with SMTP id 9so2164976pwi.26 for ; Fri, 13 Nov 2009 07:06:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=niZ/zWE3n+qcVxrmS5CLSQvbMOBRfYAQhzVJB6PxLng=; b=ROoSnb/2NGTtY3CBLlHXvTpSjUHhyuJWXeyMPtGEC7y99OvM1z0CDSvRQKP1yXkgEk f+2EbIKkMnp2Taae4yrth+SRmdKLyD+6pcF9kbY2T9J4f51S3c8n3h2U9CEm3FD81JxJ jzMDd8hf3K+ATAHMz7ARQpmGx3rPS+oxfPER8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=FSYs9LCjJxKVWyPunfp2m5nPANJ008i1WHdGvPCUjovkoCY1LG3ISGqStDj3eCE/de SVpyAlKHG7ZrZpgwpNX1OvogqWYu1kqiVo8OKP0JQVDstsp+4taGLJCDgQvhoZfgtt5h qkkM3j4h+u+ssLpZRyspa7nmk+9FeYzUpVFgs= Original-Received: by 10.142.55.11 with SMTP id d11mr342243wfa.334.1258124766921; Fri, 13 Nov 2009 07:06:06 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: 2a9d729213ae9d6c X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116952 Archived-At: --001636b2bc83d11c80047841ff97 Content-Type: text/plain; charset=ISO-8859-1 Thanks for the info. Based on what the differences described, it looks like #$ is what I want to use. On Fri, Nov 13, 2009 at 9:26 AM, Stefan Monnier wrote: > > In fact I'd be curious to learn the differences between it > > and *load-file-name.* > > The difference is the time at which the expansion takes place (either > read-time or eval-time). > E.g. try > > (defun foo () (interactive) (message "%s" #$)) > and > (defun foo () (interactive) (message "%s" load-file-name)) > > if you load a file containing one of the above lines and then you do > M-x foo RET you should see that the first returns the file name > (i.e. the value of load-file-name at the time the file was read) whereas > the other returns nil (the value of load-file-name at the time you > called `foo'). > > > Stefan > --001636b2bc83d11c80047841ff97 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for the info. Based on what the differences described, it looks like= #$ is what I want to use.


On Fri, No= v 13, 2009 at 9:26 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:=
> In fact I'd be curious to learn the differences between it
> and *load-file-name.*

The difference is the time at which the expansion takes place (either
read-time or eval-time).
E.g. try

=A0 =A0(defun foo () (interactive) (message "%s" #$))
and
=A0 =A0(defun foo () (interactive) (message "%s" load-file-name)= )

if you load a file containing one of the above lines and then you do
M-x foo RET you should see that the first returns the file name
(i.e. the value of load-file-name at the time the file was read) whereas the other returns nil (the value of load-file-name at the time you
called `foo').


=A0 =A0 =A0 =A0Stefan

--001636b2bc83d11c80047841ff97--