On Sat, Feb 12 2011, Andy Wingo wrote: > On Fri 11 Feb 2011 22:15, "Jose A. Ortega Ruiz" <j...@gnu.org> 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)