[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.
Noah
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:
>>>
>>> http://thread.gmane.org/gmane.lisp.guile.devel/13440/focus=13621
>>>
>>> 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
> --
> http://wingolog.org/
>
- Trouble using (current-filename), Mark H Weaver, 2012/02/14
- Re: Trouble using (current-filename), Andy Wingo, 2012/02/15
- Re: Trouble using (current-filename), Ludovic Courtès, 2012/02/16
- Re: Trouble using (current-filename), Andy Wingo, 2012/02/16
- Re: Trouble using (current-filename), Ludovic Courtès, 2012/02/17
- Re: Trouble using (current-filename), Andy Wingo, 2012/02/18
- Re: Trouble using (current-filename), Ludovic Courtès, 2012/02/19
- Re: Trouble using (current-filename), Andy Wingo, 2012/02/19
- Re: Trouble using (current-filename), Ludovic Courtès, 2012/02/19
- Re: Trouble using (current-filename), Andy Wingo, 2012/02/19
- Re: Trouble using (current-filename),
Noah Lavine <=
- Re: Trouble using (current-filename), Ludovic Courtès, 2012/02/20
- Re: Trouble using (current-filename), Neil Jerram, 2012/02/21
- Re: Trouble using (current-filename), Ludovic Courtès, 2012/02/21
- Re: Trouble using (current-filename), Neil Jerram, 2012/02/21
Re: Trouble using (current-filename), Mark H Weaver, 2012/02/21