From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: Trouble using (current-filename) Date: Thu, 16 Feb 2012 23:25:12 +0100 Message-ID: <878vk2pgaf.fsf@pobox.com> References: <87d39h451b.fsf@netris.org> <87zkcjloqu.fsf@pobox.com> <871upu5unw.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1329431127 18869 80.91.229.3 (16 Feb 2012 22:25:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 16 Feb 2012 22:25:27 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Feb 16 23:25:23 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ry9lS-0000hF-7G for guile-devel@m.gmane.org; Thu, 16 Feb 2012 23:25:22 +0100 Original-Received: from localhost ([::1]:36872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ry9lQ-0001kh-Ca for guile-devel@m.gmane.org; Thu, 16 Feb 2012 17:25:20 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:35568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ry9lN-0001k9-Ix for guile-devel@gnu.org; Thu, 16 Feb 2012 17:25:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ry9lM-00064f-8l for guile-devel@gnu.org; Thu, 16 Feb 2012 17:25:17 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:36805 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ry9lM-00064a-6A; Thu, 16 Feb 2012 17:25:16 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 079279321; Thu, 16 Feb 2012 17:25:16 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=rT81wdnWvo+/ A4Km9jd5b6j/8As=; b=bV9nzaKl3k91UqBPu6eirpyEX/V45YHnIBoUrD1o5WN8 SNRFPU5VmKxgCL04stobPbbDA9xDcbmx/1/TCUu6mkKVbj9Sms4zpiParQtLrF9s nLby109va9uuymH34kCb6dmtVzE8/nafvMZKNZjVNTzCO/H9Byn9BoEbTpVclx8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=Q9MOIw hHTyPcnTs7e8WNd1yLYowjsRDb3gB+zEFoYDLOVnB1+Fvi2t6YkQ6ST/rKVLbjXr /XqpUmwBOLZm8opo2HXDdDtGsfRZyT4fZsCGnVAWo5IghSRz6AjlOtT51s/rJLqO z6ko5pKKMOALFTF2Jm2UjkCg3TO9To++QIG3k= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 00A499320; Thu, 16 Feb 2012 17:25:16 -0500 (EST) Original-Received: from badger (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 5E4C8931D; Thu, 16 Feb 2012 17:25:15 -0500 (EST) In-Reply-To: <871upu5unw.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Thu, 16 Feb 2012 22:34:59 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: 1973D27C-58ED-11E1-9353-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 74.115.168.62 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13878 Archived-At: On Thu 16 Feb 2012 22:34, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Andy Wingo skribis: > >> (define-syntax current-filename >> (lambda (x) >> "A macro that expands to the current filename: the filename that >> the (current-filename) form appears in. Expands to #f if this >> information is unavailable." >> (false-if-exception >> (pk 'canonicalized (canonicalize-path (pk 'filename (assq-ref (sy= ntax-source x) 'filename))))))) > > What about not canonicalizing the file name? That makes this recipe not work: (add-to-load-path (dirname (current-filename))) I think the canonicalize-path was added after Neil's concerns about add-to-load-path. We could take it out if that's the thing to do; dunno. A --=20 http://wingolog.org/