From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Bobby D. Bryant" Newsgroups: gmane.lisp.guile.user Subject: Re: Loading and saving scheme expressions Date: Sun, 9 Jun 2002 12:53:13 -0600 Sender: guile-user-admin@gnu.org Message-ID: <20020609185313.GA8463@pollux.dioscuri> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1023648895 32360 127.0.0.1 (9 Jun 2002 18:54:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 9 Jun 2002 18:54:55 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17H7q3-0008Pp-00 for ; Sun, 09 Jun 2002 20:54:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17H7pE-0001aE-00; Sun, 09 Jun 2002 14:54:04 -0400 Original-Received: from wb3-a.mail.utexas.edu ([128.83.126.138] helo=mail.utexas.edu) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 17H7oV-0001Z0-00 for ; Sun, 09 Jun 2002 14:53:19 -0400 Original-Received: (qmail 20468 invoked by uid 0); 9 Jun 2002 18:53:18 -0000 Original-Received: from dial-109-15.ots.utexas.edu (HELO pollux.dioscuri) (128.83.177.159) by umbs-smtp-3 with SMTP; 9 Jun 2002 18:53:18 -0000 Original-To: guile-user@gnu.org Content-Disposition: inline In-Reply-To: ; from ttn@giblet.glug.org on Sun, Jun 09, 2002 at 00:48:59 -0600 X-Mailer: Balsa 1.3.6 Original-Lines: 20 Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:574 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:574 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