From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: Setting the readline prompt ... Date: 08 Jan 2003 21:11:17 +0000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <20030107184239.GA26279@www> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042062401 8333 80.91.224.249 (8 Jan 2003 21:46:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 8 Jan 2003 21:46:41 +0000 (UTC) Cc: guile-user@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18WO23-0002A9-00 for ; Wed, 08 Jan 2003 22:46:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WO1y-00034Z-03 for guile-devel@m.gmane.org; Wed, 08 Jan 2003 16:46:34 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18WNu7-0001BR-00 for guile-devel@gnu.org; Wed, 08 Jan 2003 16:38:27 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18WNtO-0000lu-00 for guile-devel@gnu.org; Wed, 08 Jan 2003 16:37:46 -0500 Original-Received: from mail.uklinux.net ([80.84.72.21] helo=s1.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WNlp-0005yo-00; Wed, 08 Jan 2003 16:29:54 -0500 Original-Received: from laruns.ossau.uklinux.net (bts-0335.dialup.zetnet.co.uk [194.247.49.79]) by s1.uklinux.net (8.11.6/8.11.6) with ESMTP id h08LThg11238; Wed, 8 Jan 2003 21:29:44 GMT Original-Received: from laruns.ossau.uklinux.net.ossau.uklinux.net (localhost [127.0.0.1])ESMTP id 093F2DC4D8; Wed, 8 Jan 2003 21:11:17 +0000 (GMT) Original-To: rm@fabula.de In-Reply-To: Original-Lines: 32 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Original-cc: guile-devel@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:1858 gmane.lisp.guile.user:1507 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1858 >>>>> "Paul" == Paul Jarc writes: Paul> rm@fabula.de wrote: >> just a quick question: how can i change the readline >> prompt (after readline is activated). >> I found (set-readline-prompt! prompt . prompt2) in >> 'ice-9 readline' Paul> AFAICT, set-readline-prompt! has no visible effect either in .guile or Paul> in the REPL. It's a tricky business, prompting. You can see the effect of set-readline-prompt! like this: guile> (begin (set-readline-prompt! "1> " "2> ") (readline)) 1> something "something" guile> (begin (set-readline-prompt! "1> " "2> ") (read)) 2> something something The second case uses the secondary (continuation) prompt because the (read) began by reading the trailing whitespace at the end of the `(begin ...)' line. So, in programs, you can use set-readline-prompt! to set whatever prompt you like before reading some data. It doesn't appear to work at the REPL because the REPL itself does a set-readline-prompt! to set the prompt to whatever was specified by the last set-repl-prompt!. Neil _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel