Hello,
Ok, I've downloaded Emacs on my Win98 system. In the scratch pad I type:
(defun test(x)(oddp x))
and then type (test 5) and nothing happens. Why not?
How do I get Emacs to evaluate LISP?
Sincerely,
DJ
----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts
made through NewsOne.Net violate posting guidelines, email ·····@newsone.net
In article <············@news.netmar.com>, <··@spam.com> wrote:
>Hello,
>
>Ok, I've downloaded Emacs on my Win98 system. In the scratch pad I type:
FYI, comp.emacs and gnu.emacs.help are better newsgroups to use for Emacs
questions.
>(defun test(x)(oddp x))
>
>and then type (test 5) and nothing happens. Why not?
>
>How do I get Emacs to evaluate LISP?
In the *scratch* buffer, C-j (Linefeed) is bound to eval-print-last-sexp.
So put your cursor after the ')' and type C-j.
--
Barry Margolin, ······@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
> >How do I get Emacs to evaluate LISP?
>
> In the *scratch* buffer, C-j (Linefeed) is bound to eval-print-last-sexp.
> So put your cursor after the ')' and type C-j.
You may also try M-x ielm, which will get you an elisp read-eval-print
loop, which can be a lot nicer (sometimes).
[no]
| How do I get Emacs to evaluate LISP?
lots of ways, one of them is to place the cursor after the expression
and type C-x e.
--
Rolf Lindgren http://www.roffe.com/
·····@tag.uio.no
In article <···············@aqualene.uio.no>,
Rolf Marvin B�e Lindgren <·····@aqualene.uio.no> wrote:
>[no]
>
>| How do I get Emacs to evaluate LISP?
>
>lots of ways, one of them is to place the cursor after the expression
>and type C-x e.
You mean C-x C-e; C-x e is for executing the last keyboard macro.
--
Barry Margolin, ······@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
··@spam.com writes:
> (defun test(x)(oddp x))
>
> and then type (test 5) and nothing happens. Why not?
Typing into *scratch* does not do anything by itself. You need to
evaluate the code. Here is one simple way: Put the cursor after the
lisp expression and type "C-x C-e" (bound to "eval-last-sexp"). Then
type "(test 5)" and type "C-x C-e" again to evaluate it. You'll see
"t" in the minibuffer.
Caveat emptor: I don't use XEmacs on Wondows, but I think it should
work the same way anywhere.
--
Oleg Goldshmidt | ···········@NOSPAM.computer.org
"I'd rather write programs to write programs than write programs."
What I like to do is . . .
1) put the buffer in "lisp interaction mode" by going M-x lisp-interaction-mode
2) after the buffer is in LIM, place the cursor at the end of the defun (the top
level
parens) and type C-j.
That should do it.
··@spam.com wrote:
> Hello,
>
> Ok, I've downloaded Emacs on my Win98 system. In the scratch pad I type:
>
> (defun test(x)(oddp x))
>
> and then type (test 5) and nothing happens. Why not?
>
> How do I get Emacs to evaluate LISP?
>
> Sincerely,
> DJ
>
> ----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
> http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
> NewsOne.Net prohibits users from posting spam. If this or other posts
> made through NewsOne.Net violate posting guidelines, email ·····@newsone.net
--
A picture may be worth a thousand words, but it costs 1024
In article <·················@italian4springtime.com>,
Paul B. Krause <·······@primavera.com> wrote:
>What I like to do is . . .
>1) put the buffer in "lisp interaction mode" by going M-x lisp-interaction-mode
Isn't that the default mode for the *scratch* buffer? He said "In the
scratch pad", which I presume refers to this buffer.
>2) after the buffer is in LIM, place the cursor at the end of the defun (the top
>level
> parens) and type C-j.
Isn't that what I said a week ago?
But if you're doing this in a buffer that isn't already in LIM, the other
suggestions of using C-x C-e seem much more convenient than changing major
modes just for a single command.
--
Barry Margolin, ······@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.