[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: Wed, 14 Mar 2012 22:00:49 -0400


What ever happened to this issue? Is it considered resolved now, or is
there more to do?

And if it's not resolved, what do people think of having more than one
piece of syntax?


On Tue, Feb 21, 2012 at 4:00 PM, Neil Jerram <address@hidden> wrote:
> address@hidden (Ludovic Courtès) writes:
>> Hi Neil!
>> Neil Jerram <address@hidden> skribis:
>>> Perhaps after all the right thing, for my use case, is something based
>>> on (car (command-line)) and (getcwd).  I currently have this
>>> 'compatibility definition' for Guile 1.8.x:
>>>       (define (current-filename)
>>>      (let* ((script (car (command-line)))
>>>             (scriptdir (dirname script))
>>>             (absdir (cond ((string=? scriptdir ".")
>>>                            (getcwd))
>>>                           ((string-match "^/" scriptdir)
>>>                            scriptdir)
>>>                           (else
>>>                            (in-vicinity (getcwd) scriptdir)))))
>>>        (in-vicinity scriptdir (basename script))))
>>> But maybe that's the better solution for 2.x as well.
>> Yes, for that case, you definitely want something that happens at
>> run-time, pretty much like $ORIGIN in ELF files.
> OK thanks.  I think that means you can disregard my use case when
> considering the future of 'current-filename', then.
>       Neil

reply via email to

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