unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: Julian Graham <joolean@gmail.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: low-hanging SRFI fruit (SRFI-98)
Date: Sat, 30 May 2009 23:11:30 +0100	[thread overview]
Message-ID: <87octas0kt.fsf@arudy.ossau.uklinux.net> (raw)
In-Reply-To: <2bc5f8210905281519u1e98e859v58d42b3e3a907a37@mail.gmail.com> (Julian Graham's message of "Thu\, 28 May 2009 18\:19\:03 -0400")

Julian Graham <joolean@gmail.com> writes:

>> Looks good to me, please go ahead.
>
> Find attached a patch that includes the implementation previously
> attached, plus unit tests and additions to the NEWS and modules.texi
> files.
>
>
> Regards,
> Julian

Hi Julian,

Thanks for doing this.  The code and test all look fine to me; I just
have a few comments on the commit message and the documentation.

Am I correct in thinking that you can commit this yourself? - subject
to Savannah coming back up, of course.  If so, please do that after
incorporating the following points.

> From a1e4bcb30b80199de6f2cd620d950d04e0734592 Mon Sep 17 00:00:00 2001
> From: Julian Graham <julian@transmetropolitan.(none)>
> Date: Thu, 28 May 2009 18:15:05 -0400
> Subject: [PATCH] Implementation of SRFI-98 (An interface to environment variables)

When you commit, the commit message should include ChangeLog-style
entries for the changes.

> ---
>  NEWS                          |    1 +
>  doc/ref/srfi-modules.texi     |   19 +++++++++++++++++
>  module/srfi/srfi-98.scm       |   44 +++++++++++++++++++++++++++++++++++++++++
>  test-suite/tests/srfi-98.test |   38 +++++++++++++++++++++++++++++++++++
>  4 files changed, 102 insertions(+), 0 deletions(-)
>  create mode 100644 module/srfi/srfi-98.scm
>  create mode 100644 test-suite/tests/srfi-98.test
>
> diff --git a/NEWS b/NEWS
> index 1785fe8..94d6be7 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -10,6 +10,7 @@ Changes in 1.9.0:
>  * New modules (see the manual for details)
>  
>  ** `(srfi srfi-18)', multithreading support
> +** `(srfi srfi-98)', an interface to environment variables
>  ** The `(ice-9 i18n)' module provides internationalization support
>  
>  * Changes to the distribution
> diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi
> index 1fa50b2..638aa46 100644
> --- a/doc/ref/srfi-modules.texi
> +++ b/doc/ref/srfi-modules.texi
> @@ -47,6 +47,7 @@ get the relevant SRFI documents from the SRFI home page
>  * SRFI-61::                     A more general `cond' clause
>  * SRFI-69::                     Basic hash tables.
>  * SRFI-88::                     Keyword objects.
> +* SRFI-98::                     An interface to access environment variables.

That's not quite idiomatic English, is it?  I know it's the title of
the SRFI, but I think that `Accessing environment variables' would be
simpler and better.

>  @end menu
>  
>  
> @@ -3608,6 +3609,24 @@ Return the keyword object whose name is @var{str}.
>  @end example
>  @end deffn
>  
> +@node SRFI-98
> +@subsection SRFI-98 An interface to access environment variables.

Same again here.

> +@cindex SRFI-98
> +@cindex environment variables
> +
> +This is a portable wrapper around Guile's built-in support for 
> +interacting with the current environment, @xref{Runtime Environment}.
> +
> +@deffn {Scheme Procedure} get-environment-variable name
> +Returns the value of the named environment variable as a string, or 
> +@code{#f} if the named environment variable is not found.  This is 
> +equivalent to @code{(getenv name)}.

Looking at this from the point of view of a developer wanting to use
this procedure...  Should name be a symbol, or a string; or can it be
either?

> +@end deffn
> +
> +@deffn {Scheme Procedure} get-environment-variables
> +Returns names and values of all the environment variables as an
> +association list.

In which the keys and values are strings?  Or are the keys symbols?

Regards,
      Neil




  reply	other threads:[~2009-05-30 22:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-27  2:43 low-hanging SRFI fruit (SRFI-98) Julian Graham
2009-05-27 21:27 ` Neil Jerram
2009-05-28 22:19   ` Julian Graham
2009-05-30 22:11     ` Neil Jerram [this message]
2009-05-30 23:13       ` Julian Graham
2009-05-30 23:47         ` Neil Jerram
     [not found]           ` <2bc5f8210906020659n1cdb9c05k4b10f3903d99e9c2@mail.gmail.com>
     [not found]             ` <87y6sa1e82.fsf@arudy.ossau.uklinux.net>
     [not found]               ` <2bc5f8210906021956q6608134cucfa8f79b1d5964d8@mail.gmail.com>
     [not found]                 ` <878wk96aah.fsf@gnu.org>
     [not found]                   ` <2bc5f8210906030618j552a03ddm603744a1be0ca571@mail.gmail.com>
     [not found]                     ` <87fxehsb7s.fsf@gnu.org>
     [not found]                       ` <2bc5f8210906030647t6cd8bb68q79e9bffc1ab765b2@mail.gmail.com>
     [not found]                         ` <87skihw4k5.fsf@arudy.ossau.uklinux.net>
2009-06-03 22:08                           ` Neil Jerram
2009-06-03 22:58                             ` Neil Jerram
2009-06-04 19:20                             ` Andy Wingo
2009-06-04 21:10                               ` Neil Jerram
2009-06-05 21:23                                 ` Neil Jerram
2009-05-30 23:28     ` 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=87octas0kt.fsf@arudy.ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-devel@gnu.org \
    --cc=joolean@gmail.com \
    /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).