[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble using (current-filename)

From: Noah Lavine
Subject: Re: Trouble using (current-filename)
Date: Sun, 19 Feb 2012 16:30:26 -0500

What about having two bits of syntax, current-filename and
current-file-path? Or better yet, current-filename and
current-file-directory, with the guarantee that (string-append
(current-file-directory) path-separator (current-filename)) points to
the file when it was compiled?

It is more intuitive to me that (current-filename) would return only
the file name, with no other path components, and that I would use
some other form to get those.


On Sun, Feb 19, 2012 at 4:23 PM, Andy Wingo <address@hidden> wrote:
> On Sun 19 Feb 2012 22:02, address@hidden (Ludovic Courtès) writes:
>>> See Neil's use case here:
>>> Can we do something that makes sense for both cases?
>> Well, (add-to-load-path (dirname (canonicalize-path (current-filename)))) ?
>> Yes it’s verbose, but it’s predictable and clearly specified.
> It's terribly verbose, IMO.  If we can do something better for those
> users, we should.  What did you think of my other suggestion about
> searching for the file in the load path, and only canonicalizing if it
> was not found in the load path?  (If it is found in the load path, then
> it would be returned in its relative form.)
> Andy
> --

reply via email to

[Prev in Thread] Current Thread [Next in Thread]