From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jose A. Ortega Ruiz" Newsgroups: gmane.lisp.guile.devel Subject: Re: problem with trailing comment in repl Date: Sat, 12 Feb 2011 14:21:09 +0100 Message-ID: <8739ntbd8a.fsf@gnu.org> References: <87r5beb7dg.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297517251 28649 80.91.229.12 (12 Feb 2011 13:27:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 12 Feb 2011 13:27:31 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Feb 12 14:27:27 2011 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.69) (envelope-from ) id 1PoFVW-0002Y0-A8 for guile-devel@m.gmane.org; Sat, 12 Feb 2011 14:27:27 +0100 Original-Received: from localhost ([127.0.0.1]:50480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PoFVV-0003e4-2K for guile-devel@m.gmane.org; Sat, 12 Feb 2011 08:27:25 -0500 Original-Received: from [140.186.70.92] (port=51510 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PoFPY-0006en-Jd for guile-devel@gnu.org; Sat, 12 Feb 2011 08:21:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PoFPX-0003os-6a for guile-devel@gnu.org; Sat, 12 Feb 2011 08:21:16 -0500 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:36691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PoFPW-0003oU-Q6 for guile-devel@gnu.org; Sat, 12 Feb 2011 08:21:14 -0500 Original-Received: by wyj26 with SMTP id 26so3465846wyj.0 for ; Sat, 12 Feb 2011 05:21:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:in-reply-to :references:user-agent:x-attribution:x-url:date:message-id :mime-version:content-type; bh=OENigWpLs+2YauTjAQAh3u5iu2nofbqLNWV+f5AgVuI=; b=cpWCIk1irHMD+NF1Vg/U5c9YAVnig/ImtKBIL62ltJP6Iko56q+cnucOFq/eeDWOzh U4EqTD1g+en1Hj0iiKTQEUy4rs9YP/Xvulplvid1Bw7PQN4qMOoD7l53cty5TgcFELbp 1Ze4YMrDfeHY//HPW1ALk8/N7fxOs88WdGSjY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:user-agent :x-attribution:x-url:date:message-id:mime-version:content-type; b=iiVm7cAd4efUK5UE4UA8VlUo972fb+9y3WqdHi+5jKo7uFYTd0K6v/XFi1ZgV46SA3 X6ofbkxjv+EGvUKLbyQXoSYQl3T9fqULS3kBL/sfvqSH39cqwXe42XLxpbPNm/KdWPWJ DREQNV457O6yzR4YZMfBD96pZns/4jdROAZEI= Original-Received: by 10.227.133.15 with SMTP id d15mr906872wbt.76.1297516873159; Sat, 12 Feb 2011 05:21:13 -0800 (PST) Original-Received: from newton (1.Red-83-36-223.dynamicIP.rima-tde.net [83.36.223.1]) by mx.google.com with ESMTPS id y29sm354263wbd.16.2011.02.12.05.21.11 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Feb 2011 05:21:12 -0800 (PST) Original-Received: from localhost ([127.0.0.1] helo=newton ident=jao) by newton with esmtp (Exim 4.72) (envelope-from ) id 1PoFPR-0005uI-TV; Sat, 12 Feb 2011 14:21:09 +0100 In-Reply-To: (Andy Wingo's message of "Sat, 12 Feb 2011 13:34:03 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Attribution: jao X-URL: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.169 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:11573 Archived-At: On Sat, Feb 12 2011, Andy Wingo wrote: > On Fri 11 Feb 2011 22:15, "Jose A. Ortega Ruiz" writes: > >> scheme@(guile-user)> (define a 3) ;; foo >> <- cursor stays here; no prompt >> >> is that intended? i'm hoping it is not, because it confuses geiser, who >> is waiting for a new prompt to mark the end of the transaction. > > It would be nice if there were a prompt in this case. However, it is > difficult to do. Because this case is very much like: > > guile> (define a 3) ( > <- no prompt, waiting for you to finish the expression > > Or indeed, like: > guile> ;; foo > <- no prompt > > After reading an expression, the REPL reader flushes any available > whitespace, then goes into a new read. If there are characters waiting > on the current input port, as they are if there is more than one > expression on one line, no prompt is printed. In this case we flush the > whitespace, and start reading at the ";", and keep on reading in the > next line. I'm not sure i understand this reasoning, because when there are two (or more) complete sexps in a line they're accepted, and a new prompt appears; and the same happens for a sexp with trailing whitespace, and i was expecting a comment to be equivalent to whitespace. But, anyway, you know better than me how the reader works and i'm sure there are good reasons for that behaviour. (And of course it is true that the case of _only_ whitespace behaves as the one of only a comment.) However, i think there's a problem with metacommands at the "non-prompt": scheme@(guile-user)> ;; foo ,error While compiling expression: Syntax error: standard input:2:0: unquote: expression not valid outside of quasiquote in form (unquote error) scheme@(guile-user)> This happens with all metacommands i've tried, not just ,error. Compare to: scheme@(guile-user)> ,error Nothing to debug. scheme@(guile-user)> Cheers, jao -- Convictions are more dangerous enemies of truth than lies. -Friedrich Wilhelm Nietzsche, philosopher (1844-1900)