unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andreas Rottmann <a.rottmann@gmx.at>
To: Mark H Weaver <mhw@netris.org>
Cc: Ian Price <ianprice90@googlemail.com>, guile-devel@gnu.org
Subject: Re: Adding to the end of the load path
Date: Sun, 11 Nov 2012 20:02:34 +0100	[thread overview]
Message-ID: <87a9uo7yk5.fsf@delenn.home.rotty.xx.vu> (raw)
In-Reply-To: <87wqxs8tom.fsf@tines.lan> (Mark H. Weaver's message of "Sun, 11 Nov 2012 02:50:17 -0500")

Mark H Weaver <mhw@netris.org> writes:

> Hi Andreas,
>
> Andreas Rottmann <a.rottmann@gmx.at> writes:
>
>> Ian Price <ianprice90@googlemail.com> writes:
>>
>> From 1f72ddd3971a796a6f83a68ebedde7d7324c50b5 Mon Sep 17 00:00:00 2001
>> From: Andreas Rottmann <a.rottmann@gmx.at>
>> Date: Thu, 8 Nov 2012 01:59:56 +0100
>> Subject: [PATCH] More flexible %load-path and %load-compiled-path handling
>>
>> ---
>>  libguile/load.c |   25 +++++++++++++++++++++----
>>  1 file changed, 21 insertions(+), 4 deletions(-)
>>
>> diff --git a/libguile/load.c b/libguile/load.c
>> index af2ca45..a05cf76 100644
>> --- a/libguile/load.c
>> +++ b/libguile/load.c
>> @@ -226,7 +226,9 @@ SCM_DEFINE (scm_parse_path, "parse-path", 1, 1, 0,
>>  	    "Parse @var{path}, which is expected to be a colon-separated\n"
>>  	    "string, into a list and return the resulting list with\n"
>>  	    "@var{tail} appended. If @var{path} is @code{#f}, @var{tail}\n"
>> -	    "is returned.")
>> +	    "is returned.  In case an empty string occurs as an element\n"
>> +            "of @var{path}, @var{tail} is inserted at that point instead of\n"
>> +            "being append at the end of the list.")
>
> Note that 'parse-path' is documented in the manual, which would also
> have to be updated.  However, I'm really not comfortable with changing
> the behavior of 'parse-path'.  It is a documented general-purpose
> procedure which users may use for their own purposes, and I have
> recommended it as such.
>
Good point.

> If we decide to use this general approach, I'd want to leave
> 'parse-path' alone, make a new procedure that behaves differently, and
> then maybe change a few uses of 'parse-path' within Guile to use that
> new procedure.
>
> I'm also not comfortable with having the empty string be the special
> marker separating the prepend and append portions of the path.  As you
> noted in your earlier email, the empty string is currently interpreted
> as the current directory, and users may have come to rely on that.
>
> If we do this, I think the special marker should be a path component
> that is highly unlikely to occur in practice.  Some ideas off the top of
> my head are: "...", "*", or " ".  I think I like "..." best.
>
> What do you think?
>
Another idea would be to use an additional environment variable,
e.g. GUILE_LOAD_{COMPILED_,}_PATH_SUFFIX.  If we cannot use the empty
string as special token, I'd prefer introducing additional environment
variables.  IMO, introducing a "special token", for which there is no
"natural" equivalent is not the most beautiful design.  The empty string
is the only "special token", for which the escape sequence is even more
natural than itself: just use the single dot for the current directory,
instead of the empty string.  I however undertand it's an incompatible
change, so I suggest using additional environment variables.

What's also still missing is a corresponding command-line switch, if we
want to even provide one -- notably, GUILE_LOAD_COMPILED_PATH also has
no corresponding command-line switch.  Any opinion on whether we want
these command-line switches, and if so, suggestions on names?

Regards, Rotty
-- 
Andreas Rottmann -- <http://rotty.xx.vu/>



  reply	other threads:[~2012-11-11 19:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-05  3:18 Adding to the end of the load path Ian Price
2012-11-08  1:03 ` Andreas Rottmann
2012-11-11  7:50   ` Mark H Weaver
2012-11-11 19:02     ` Andreas Rottmann [this message]
2012-11-11 21:51       ` Mark H Weaver
2012-11-12 16:35         ` Bruce Korb
2012-11-13 21:04   ` Ludovic Courtès
2012-11-15 22:06     ` Andreas Rottmann
2012-11-15 22:37       ` Ludovic Courtès
2012-11-15 22:44       ` Mark H Weaver
2012-11-15 23:06         ` Ludovic Courtès
2012-11-16  0:10         ` Noah Lavine
2012-11-16 14:00           ` Noah Lavine
2012-11-16 18:06           ` Bruce Korb
2012-11-16 18:52           ` Mark H Weaver
2012-11-16 21:38             ` Noah Lavine
2012-11-28 23:12     ` [PATCH] Add parse-path-with-ellipsis, and use it for GUILE_LOAD_PATH et al Mark H Weaver
2012-11-28 23:46       ` Ludovic Courtès
2012-11-29  3:04         ` Mark H Weaver
2012-11-29 10:27           ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a9uo7yk5.fsf@delenn.home.rotty.xx.vu \
    --to=a.rottmann@gmx.at \
    --cc=guile-devel@gnu.org \
    --cc=ianprice90@googlemail.com \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).