Re: (warn) isn't doing what I expect it to



On Wed, 31 Aug 2005 01:49:41 GMT, Kent M Pitman wrote:

>> (If the line is empty, there will be zero characters, interpreted as EOF.)
>> For example, here's a Lisp session where I used ^D to enter three input
>> lines:
>>
>> This is SBCL [...]
>> * 42
>> 42
>> * (defun foo () (quit))
>> FOO
>> * (foo)[Exit]

> Btw, for me, on both LispWorks 4.4.5 and Allegro 7.0 on Linux, control-D on
> a teletype (i.e., in a REPL in a shell, not in some GUI/IDE thing)
> neither echos nor has any apparent effect. Typed to Emacs with either
> of these lisps beneath it by using control-Q to quote it into the
> input stream, it just gets ignored, too. That is (if you assume my

Typing it into Emacs is different. When you type it into a shell, the
terminal driver intercepts it before it gets passed through to the
program underneath and does something else with it (or may do...you
can change it with `stty', make some other key, or no key at all, have
that functionality; whatever). But Emacs will just pass the character
through to Lisp (which I expect treats it as whitespace)

Typing it on a non-empty line in a shell just does something like
"force-output" (only in the other direction, of course)

> notation ^D below is replaced by an actual control-D (ascii 4), then:
> 3^D4 => 34
> (+ 3 ^D 4) => 7

As expected. But "34 ^D" should give you 34

[Except in CLISP, I guess, since that uses readline...]

--
Don't worry about people stealing your ideas. If your ideas are any good,
you'll have to ram them down people's throats.
-- Howard Aiken
(setq reply-to
(concatenate 'string "Paul Foley " "<mycroft" '(#\@) "actrix.gen.nz>"))
.



Relevant Pages

  • Re: why some people call emacs operating system?
    ... > Emacs is an editor afloat in a sea of lisp. ... > I'm pretty sure no one person knows everything that emacs can do. ... >> Simple shell scripts can be used to weave them together as needed.... ... you have simple shell scripts that implement the game of Tetris? ...
    (comp.os.linux.misc)
  • Re: IDEs, syntactic vs. semantic highlighting, etc.
    ... never learned Emacs, but if I had to do serious Lisp programming, I'd ... against that philosophy as it is nearly a complete OS (or at least an OS shell) ... functionality via the keyboard and don't have to use the mouse at all if I ...
    (comp.lang.ruby)
  • Re: lisp-based netcat standin?
    ... Mountain -- and I would like to be ... Can anyone suggest a LISP equivalent to nc ... emacs side of SLIME? ... shell with lisp-mode enabled would work. ...
    (comp.lang.lisp)