From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97395 invoked by alias); 21 Nov 2017 23:31:28 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 97383 invoked by uid 89); 21 Nov 2017 23:31:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_LAZY_DOMAIN_SECURITY,KB_WAM_FROM_NAME_SINGLEWORD autolearn=no version=3.3.2 spammy=H*r:sk:kawa@so, H*r:Unknown, relationship X-HELO: blaine.gmane.org Received: from Unknown (HELO blaine.gmane.org) (195.159.176.226) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Nov 2017 23:31:26 +0000 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eHI0U-0001OL-Ob for kawa@sourceware.org; Wed, 22 Nov 2017 00:31:10 +0100 To: kawa@sourceware.org From: Helmut Eller Subject: Re: Prompt on read Date: Tue, 21 Nov 2017 23:31:00 -0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) X-IsSubscribed: yes X-SW-Source: 2017-q4/txt/msg00034.txt.bz2 On Tue, Nov 21 2017, Per Bothner wrote: >> Despite that the prompt in line two is confusing, the line number in the >> third prompt seems wrong. I would expect that read works basically like >> read-line, > > Yes and no. read reads an S-expression, and there may be a many-to-many > relationship between S-expressions and lines. A prompt is printed before > each input line - If a prompt is printed before each input line, then why does calling read-line not print a prompt? > however note it is possible for a procedure to change the > prompt, for example to the empty string. You mean something like (fluid-let ((input-prompt1 "")) ...) or something else? Hmm, that would work for me. > FWIW I can't come up with any valid use-case for explicitly calling > read on an interactive port. The problem is error recovery. > Enlighten me. Uhm, a REPL that wants to print its own prompt? Or something like (format #t "Please enter a filename: ") (open-output-file (read)) Helmut