unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Bobby D. Bryant" <bdbryant@mail.utexas.edu>
Subject: Re: Loading and saving scheme expressions
Date: Sun, 9 Jun 2002 12:53:13 -0600	[thread overview]
Message-ID: <20020609185313.GA8463@pollux.dioscuri> (raw)
In-Reply-To: <E17GwVX-0000HL-00@giblet>; from ttn@giblet.glug.org on Sun, Jun 09, 2002 at 00:48:59 -0600

On 2002.06.09 00:48:59 -0600 Thien-Thi Nguyen wrote:

> how about:
> 
>  (define (load-expr file)
>    (read (open-file file OPEN_READ)))
> 
>  (define (save-expr file value)
>    (write value (open-file file OPEN_WRITE))
>    (flush-all-ports))

Is there a way to force pretty-printing to the file?  I've been using 
GUILE for things like user preferences, but if the program modifies it 
and writes it back to the file then it has to be re-formatted for human 
consumption (e.g., if the user wants to hand-edit his/her preferences).

Thanks,

Bobby Bryant
Austin, Texas

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


  reply	other threads:[~2002-06-09 18:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-09  6:14 Loading and saving scheme expressions Joris van der Hoeven
2002-06-09  6:48 ` Thien-Thi Nguyen
2002-06-09 18:53   ` Bobby D. Bryant [this message]
2002-06-10 16:49     ` Marius Vollmer

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=20020609185313.GA8463@pollux.dioscuri \
    --to=bdbryant@mail.utexas.edu \
    /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).