* SLIME and CTRL-D
@ 2010-04-08 18:22 Peter Keller
2010-04-08 19:19 ` Helmut Eller
0 siblings, 1 reply; 6+ messages in thread
From: Peter Keller @ 2010-04-08 18:22 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
I use slime with sbcl on linux and in general it works fine.
My question is: in the raw sbcl repl (say starting sbcl from the command
line) I can do ^D to signal the END-OF-FILE condition for something
reading *standard-input*. SLIME doesn't seem to understand this. How
can I do the equivalent of ^D when using the SLIME repl for sbcl?
Thank you.
-pete
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SLIME and CTRL-D
2010-04-08 18:22 SLIME and CTRL-D Peter Keller
@ 2010-04-08 19:19 ` Helmut Eller
2010-04-08 20:29 ` Peter Keller
0 siblings, 1 reply; 6+ messages in thread
From: Helmut Eller @ 2010-04-08 19:19 UTC (permalink / raw)
To: help-gnu-emacs
* Peter Keller [2010-04-08 20:22+0200] writes:
> Hello,
>
> I use slime with sbcl on linux and in general it works fine.
>
> My question is: in the raw sbcl repl (say starting sbcl from the
> command line) I can do ^D to signal the END-OF-FILE condition for
> something reading *standard-input*. SLIME doesn't seem to understand
> this. How can I do the equivalent of ^D when using the SLIME repl for
> sbcl?
Probably C-u RET.
Helmut
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SLIME and CTRL-D
2010-04-08 19:19 ` Helmut Eller
@ 2010-04-08 20:29 ` Peter Keller
2010-04-08 20:54 ` Helmut Eller
0 siblings, 1 reply; 6+ messages in thread
From: Peter Keller @ 2010-04-08 20:29 UTC (permalink / raw)
To: help-gnu-emacs
Helmut Eller <eller.helmut@gmail.com> wrote:
> * Peter Keller [2010-04-08 20:22+0200] writes:
>
>> Hello,
>>
>> I use slime with sbcl on linux and in general it works fine.
>>
>> My question is: in the raw sbcl repl (say starting sbcl from the
>> command line) I can do ^D to signal the END-OF-FILE condition for
>> something reading *standard-input*. SLIME doesn't seem to understand
>> this. How can I do the equivalent of ^D when using the SLIME repl for
>> sbcl?
>
> Probably C-u RET.
in a simple test case in slime's repl:
(handle-case (read) (end-of-file () (format t "got eof~%")))
It works just fine. I have yet to test it in my actual application, but
I don't see any reason why it wouldn't work given the test.
Another question is, why C-u RET? I never would have though that did what
it did here. Why does it work?
-pete
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SLIME and CTRL-D
2010-04-08 20:29 ` Peter Keller
@ 2010-04-08 20:54 ` Helmut Eller
2010-04-08 23:40 ` Peter Keller
0 siblings, 1 reply; 6+ messages in thread
From: Helmut Eller @ 2010-04-08 20:54 UTC (permalink / raw)
To: help-gnu-emacs
* Peter Keller [2010-04-08 22:29+0200] writes:
> Another question is, why C-u RET? I never would have though that did what
> it did here. Why does it work?
What does C-d in a tty (in cooked mode)? It sends the possibly empty
input buffer which may be empty.
In Slime, C-d is already taken and there needs to be a way to send the
current input without automatically adding newlines or closing parens,
so C-u RET seemed fitting.
Helmut
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SLIME and CTRL-D
2010-04-08 20:54 ` Helmut Eller
@ 2010-04-08 23:40 ` Peter Keller
2010-04-09 12:07 ` Jeff Clough
0 siblings, 1 reply; 6+ messages in thread
From: Peter Keller @ 2010-04-08 23:40 UTC (permalink / raw)
To: help-gnu-emacs
Helmut Eller <eller.helmut@gmail.com> wrote:
> In Slime, C-d is already taken and there needs to be a way to send the
> current input without automatically adding newlines or closing parens,
> so C-u RET seemed fitting.
Huh. Thanks for the explanation. I just know C-u to be a "do this N times"
command, so relating it to stdin was surprising. Then again, I haven't learned
all of the slime commands yet. Maybe I'll run into it in the manual.
Thank you.
-pete
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SLIME and CTRL-D
2010-04-08 23:40 ` Peter Keller
@ 2010-04-09 12:07 ` Jeff Clough
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Clough @ 2010-04-09 12:07 UTC (permalink / raw)
To: help-gnu-emacs
Peter Keller <psilord@merlin.cs.wisc.edu> writes:
> Helmut Eller <eller.helmut@gmail.com> wrote:
> ... I just know C-u to be a "do this N times"
> command, so relating it to stdin was surprising.
In Emacs, C-u specifies the prefix argument, which *may* be a repetition
count, but sometimes simply changes the behavior of the command.
I think the canonical example of this is fill-paragraph. If you give it
a prefix argument, it ignores the value but interprets the presence of
the argument to mean "justify the paragraph too".
Jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-04-09 12:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-08 18:22 SLIME and CTRL-D Peter Keller
2010-04-08 19:19 ` Helmut Eller
2010-04-08 20:29 ` Peter Keller
2010-04-08 20:54 ` Helmut Eller
2010-04-08 23:40 ` Peter Keller
2010-04-09 12:07 ` Jeff Clough
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).