[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with trailing comment in repl

From: Jose A. Ortega Ruiz
Subject: Re: problem with trailing comment in repl
Date: Sat, 12 Feb 2011 14:21:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

On Sat, Feb 12 2011, Andy Wingo wrote:

> On Fri 11 Feb 2011 22:15, "Jose A. Ortega Ruiz" <address@hidden> 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

    scheme@(guile-user)> ;; foo
    While compiling expression:
    Syntax error:
    standard input:2:0: unquote: expression not valid outside of quasiquote
    in form (unquote error)

This happens with all metacommands i've tried, not just ,error.  Compare

    Nothing to debug.

Convictions are more dangerous enemies of truth than lies.
 -Friedrich Wilhelm Nietzsche, philosopher (1844-1900)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]