Hi,
Andy Wingo skribis:
> On Thu 15 Mar 2012 17:41, l...@gnu.org (Ludovic Courtès) writes:
>
>> So if my recollection is correct, the ‘canonicalize-path’ call in
>> ‘current-filename’, which was controversial, can now be removed.
>>
>> Andy: WDYT?
>
> Well it's not what I wanted, but I don't car
On Thu 15 Mar 2012 17:41, l...@gnu.org (Ludovic Courtès) writes:
> So if my recollection is correct, the ‘canonicalize-path’ call in
> ‘current-filename’, which was controversial, can now be removed.
>
> Andy: WDYT?
Well it's not what I wanted, but I don't care much. Please fix the
documentation
Hello,
So if my recollection is correct, the ‘canonicalize-path’ call in
‘current-filename’, which was controversial, can now be removed.
Andy: WDYT?
Ludo’.
Noah Lavine writes:
> Hello,
>
> What ever happened to this issue? Is it considered resolved now, or is
> there more to do?
For my use case it's resolved, in the sense that I really needed a
runtime directory that may not be the same as the source compilation
location; and hence 'current-filenam
Hello,
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?
Noah
On Tue, Feb 21, 2012 at 4:00 PM, Neil Jerram wrote:
> l...@gnu.org (Ludovic Courtès) writes:
>
>> Hi Neil
l...@gnu.org (Ludovic Courtès) writes:
> Hi Neil!
>
> Neil Jerram 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-filena
Hi Neil!
Neil Jerram 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)))
>
Sorry for chipping in late to this discussion.
l...@gnu.org (Ludovic Courtès) writes:
> I think it’s often undesirable.
>
> Suppose you want to use ‘current-filename’ in an ‘assert’ macro, for
> instance: what you want is a hint, not an absolute path, since that path
> is likely to be invalid at
Andy Wingo writes:
> Not sure what the right thing is here. It seems to depend on whether
> the file is relative to the path or the current working directory. You
> have any thoughts here?
Why don't the source properties include the full pathname? If there are
places where it's desirable to st
Hi,
Noah Lavine skribis:
> 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
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
On Sun 19 Feb 2012 22:02, l...@gnu.org (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-filenam
Hello!
Andy Wingo skribis:
> On Sun 19 Feb 2012 15:10, l...@gnu.org (Ludovic Courtès) writes:
>
>> Andy Wingo skribis:
>>
>>> On Fri 17 Feb 2012 23:49, l...@gnu.org (Ludovic Courtès) writes:
>>>
Would it work to let the user call it themself if needed, like:
(add-to-load-path (
Hi,
On Sun 19 Feb 2012 15:10, l...@gnu.org (Ludovic Courtès) writes:
> Andy Wingo skribis:
>
>> On Fri 17 Feb 2012 23:49, l...@gnu.org (Ludovic Courtès) writes:
>>
>>> Would it work to let the user call it themself if needed, like:
>>>
>>> (add-to-load-path (dirname (canonicalize-path (current
Hi,
Andy Wingo skribis:
> On Fri 17 Feb 2012 23:49, l...@gnu.org (Ludovic Courtès) writes:
>
>> Would it work to let the user call it themself if needed, like:
>>
>> (add-to-load-path (dirname (canonicalize-path (current-filename
>
> I would rather have current-filename do a
>
> (or (fal
On Fri 17 Feb 2012 23:49, l...@gnu.org (Ludovic Courtès) writes:
> Would it work to let the user call it themself if needed, like:
>
> (add-to-load-path (dirname (canonicalize-path (current-filename
I would rather have current-filename do a
(or (false-if-exception (canonicalize-path p))
Hi,
Andy Wingo skribis:
> On Thu 16 Feb 2012 22:34, l...@gnu.org (Ludovic Courtès) 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 i
On Thu 16 Feb 2012 22:34, l...@gnu.org (Ludovic Courtès) 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
>> infor
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 'canonica
Hi Mark :)
On Tue 14 Feb 2012 19:57, Mark H Weaver writes:
> scheme@(guile-user)> my-filename
> $1 = #f
I get this result regardless of whether or not the (identity 1 2 3) is
there, at least with master; but perhaps that is to be expected, given
what you say:
> The same thing happens if I
I put the following test module in my load path:
(define-module (current-filename-fail)
:export (my-filename))
(define my-filename (current-filename))
(define (force-a-warning-message) (identity 1 2 3))
And this is what I see with Guile 2.0.5:
GNU Guile 2.0.5
Copyright (C) 1995-201
21 matches
Mail list logo