From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Rottmann Newsgroups: gmane.lisp.guile.devel Subject: Re: Adding to the end of the load path Date: Sun, 11 Nov 2012 20:02:34 +0100 Message-ID: <87a9uo7yk5.fsf@delenn.home.rotty.xx.vu> References: <87sj8o20v0.fsf@googlemail.com> <87liecucrz.fsf@delenn.home.rotty.xx.vu> <87wqxs8tom.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1352660583 3672 80.91.229.3 (11 Nov 2012 19:03:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2012 19:03:03 +0000 (UTC) Cc: Ian Price , guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Nov 11 20:03:14 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TXcoK-0006iS-0L for guile-devel@m.gmane.org; Sun, 11 Nov 2012 20:03:12 +0100 Original-Received: from localhost ([::1]:33603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXcoA-0007WS-EA for guile-devel@m.gmane.org; Sun, 11 Nov 2012 14:03:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXco5-0007T9-OX for guile-devel@gnu.org; Sun, 11 Nov 2012 14:03:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXco2-0007cp-M3 for guile-devel@gnu.org; Sun, 11 Nov 2012 14:02:57 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:44892) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TXco2-0007cc-Cz for guile-devel@gnu.org; Sun, 11 Nov 2012 14:02:54 -0500 Original-Received: (qmail invoked by alias); 11 Nov 2012 19:02:39 -0000 Original-Received: from 91-119-177-155.dynamic.xdsl-line.inode.at (EHLO cubox.home.rotty.xx.vu) [91.119.177.155] by mail.gmx.net (mp010) with SMTP; 11 Nov 2012 20:02:39 +0100 X-Authenticated: #3102804 X-Provags-ID: V01U2FsdGVkX1+ShS4UulGS5RHPgvQ231A1Zv26d+TI7bBCoLyk2u 2HLY0apdPSEyH9 Original-Received: from delenn.home.rotty.xx.vu (delenn.home.rotty.xx.vu [IPv6:fdfb:599d:f328:2::6e]) by cubox.home.rotty.xx.vu (Postfix) with ESMTP id 6F12C160087; Sun, 11 Nov 2012 20:02:34 +0100 (CET) Original-Received: by delenn.home.rotty.xx.vu (Postfix, from userid 1000) id 2730832002C; Sun, 11 Nov 2012 20:02:34 +0100 (CET) In-Reply-To: <87wqxs8tom.fsf@tines.lan> (Mark H. Weaver's message of "Sun, 11 Nov 2012 02:50:17 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 213.165.64.22 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:15155 Archived-At: Mark H Weaver writes: > Hi Andreas, > > Andreas Rottmann writes: > >> Ian Price writes: >> >> From 1f72ddd3971a796a6f83a68ebedde7d7324c50b5 Mon Sep 17 00:00:00 2001 >> From: Andreas Rottmann >> 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 --