parameterized working-directory and changing it relatively Shiro Kawai 30 Apr 2020 08:08 UTC
Re: parameterized working-directory and changing it relatively Lassi Kortela 30 Apr 2020 10:16 UTC
Re: parameterized working-directory and changing it relatively John Cowan 30 Apr 2020 15:19 UTC
Re: parameterized working-directory and changing it relatively Marc Nieper-Wißkirchen 30 Apr 2020 15:38 UTC
Re: parameterized working-directory and changing it relatively John Cowan 30 Apr 2020 15:42 UTC
Re: parameterized working-directory and changing it relatively Marc Nieper-Wißkirchen 30 Apr 2020 15:47 UTC
Re: parameterized working-directory and changing it relatively John Cowan 30 Apr 2020 15:49 UTC
Re: parameterized working-directory and changing it relatively Lassi Kortela 30 Apr 2020 16:00 UTC
Re: parameterized working-directory and changing it relatively Faré 30 Apr 2020 16:01 UTC
Re: parameterized working-directory and changing it relatively Lassi Kortela 30 Apr 2020 18:25 UTC
Re: parameterized working-directory and changing it relatively Shiro Kawai 30 Apr 2020 19:27 UTC
Re: parameterized working-directory and changing it relatively Faré 01 May 2020 01:19 UTC
Re: parameterized working-directory and changing it relatively Marc Nieper-Wißkirchen 01 May 2020 07:43 UTC
Re: parameterized working-directory and changing it relatively John Cowan 01 May 2020 13:15 UTC
Re: parameterized working-directory and changing it relatively Faré 03 May 2020 10:23 UTC
Re: parameterized working-directory and changing it relatively Shiro Kawai 30 Apr 2020 17:39 UTC

Re: parameterized working-directory and changing it relatively Lassi Kortela 30 Apr 2020 10:16 UTC

> If we make working-directory a parameter, how will it work if I want to
> change the directory relative to the current one?

 From SRFI 39: (make-parameter init [converter])

"When it is called with one argument, the content of the cell bound to
this parameter object in the current dynamic environment is set to the
result of the call (converter arg), where arg is the argument passed to
the parameter object"

If we use a converter that turns relative pathnames to absolute ones,
that should solve our problems. I hope the converter can refer to the
old value of the parameter internally.

R7RS supports the converter argument also.

> Gauche's current-directory always returns the absolute pathname, even set
> with relative pathname.

This is good.