From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: support thunks as prompts without readline Date: Mon, 12 May 2008 21:15:16 +0200 Message-ID: References: <87bq3fcdg5.fsf@ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210619812 6920 80.91.229.12 (12 May 2008 19:16:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 May 2008 19:16:52 +0000 (UTC) Cc: guile-devel To: Neil Jerram Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 12 21:17:28 2008 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JvdWF-0001Ie-Ig for guile-devel@m.gmane.org; Mon, 12 May 2008 21:17:08 +0200 Original-Received: from localhost ([127.0.0.1]:44352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JvdVV-0005sg-Ed for guile-devel@m.gmane.org; Mon, 12 May 2008 15:16:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JvdVP-0005sH-Qc for guile-devel@gnu.org; Mon, 12 May 2008 15:16:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JvdVO-0005rz-Ax for guile-devel@gnu.org; Mon, 12 May 2008 15:16:15 -0400 Original-Received: from [199.232.76.173] (port=38693 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JvdVO-0005rw-3d for guile-devel@gnu.org; Mon, 12 May 2008 15:16:14 -0400 Original-Received: from a-sasl-fastnet.sasl.smtp.pobox.com ([207.106.133.19]:62980 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JvdVN-00063U-UP for guile-devel@gnu.org; Mon, 12 May 2008 15:16:14 -0400 Original-Received: from localhost.localdomain (localhost [127.0.0.1]) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTP id 07EE7573B; Mon, 12 May 2008 15:16:13 -0400 (EDT) Original-Received: from unquote (251.Red-81-39-162.dynamicIP.rima-tde.net [81.39.162.251]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTP id 5507E5738; Mon, 12 May 2008 15:16:11 -0400 (EDT) In-Reply-To: <87bq3fcdg5.fsf@ossau.uklinux.net> (Neil Jerram's message of "Fri, 09 May 2008 23:36:26 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Pobox-Relay-ID: E2CB2C4C-2057-11DD-9D0E-80001473D85F-02397024!a-sasl-fastnet.pobox.com X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:7237 Archived-At: Hey Neil, On Sat 10 May 2008 00:36, Neil Jerram writes: > Andy Wingo writes: > >> * ice-9/boot-9.scm (repl-reader): Support thunks as prompts. >> --- >> ice-9/boot-9.scm | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/ice-9/boot-9.scm b/ice-9/boot-9.scm >> index d1e6306..b92cfd6 100644 >> --- a/ice-9/boot-9.scm >> +++ b/ice-9/boot-9.scm >> @@ -2518,7 +2518,7 @@ >> ;;; the readline library. >> (define repl-reader >> (lambda (prompt) >> - (display prompt) >> + (display (if (string? prompt) prompt (prompt))) >> (force-output) >> (run-hook before-read-hook) >> ((or (fluid-ref current-reader) read) (current-input-port)))) > > I don't get this one. Isn't the thunk option already covered by the > code that calls repl-reader, here: > > (let ((prompt (cond ((string? scm-repl-prompt) > scm-repl-prompt) > ((thunk? scm-repl-prompt) > (scm-repl-prompt)) > (scm-repl-prompt "> ") > (else "")))) > (repl-reader prompt)))) Sorry for the long quote. Answer: It does seem that this case is covered by the scm-style REPL. I'm trying to use the repl-reader for a different repl, the one in guile-vm. The (ice-9 readline) repl-reader does handle the prompt-as-thunk case. I just want them both to act the same :) I could change to call the thunk instead, if that's the best option. Please advise as to what you want to accept. Andy -- http://wingolog.org/