unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* evaluate expression in scratch buffer
@ 2004-04-22 21:04 William Payne
  2004-04-22 21:27 ` Marco Parrone
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: William Payne @ 2004-04-22 21:04 UTC (permalink / raw)


Hello, I want to evaluate the following expression:
(insert (prin1-to-string (w32-select-font)))

I read that I should evaluate it in the scratch buffer, so I typed it in
there...but what do I do to get the actual evaluation to occur?

Thanks for any replies

/ WP

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: evaluate expression in scratch buffer
  2004-04-22 21:04 evaluate expression in scratch buffer William Payne
@ 2004-04-22 21:27 ` Marco Parrone
  2004-04-22 22:23 ` Andrew Taylor
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Marco Parrone @ 2004-04-22 21:27 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 730 bytes --]

William Payne on Thu, 22 Apr 2004 23:04:03 +0200 writes:

> Hello, I want to evaluate the following expression:
> (insert (prin1-to-string (w32-select-font)))
>
> I read that I should evaluate it in the scratch buffer, so I typed it in
> there...but what do I do to get the actual evaluation to occur?

C-h a eval RET

[Of these, the functions I find more useful are:]

(snip)
eval-buffer		      M-x eval-buffer RET
  Command: Execute the current buffer as Lisp code.
(snip)
eval-last-sexp		      C-x C-e
  Command: Evaluate sexp before point; print value in minibuffer.
(snip)
eval-region		      M-x eval-region RET
  Command: Execute the region as Lisp code.
(snip)

-- 
Marco Parrone (marc0) <marc0@autistici.org> [0x45070AD6]

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: evaluate expression in scratch buffer
  2004-04-22 21:04 evaluate expression in scratch buffer William Payne
  2004-04-22 21:27 ` Marco Parrone
@ 2004-04-22 22:23 ` Andrew Taylor
  2004-04-23  6:20 ` Holger Sparr
  2004-04-23 16:11 ` Kevin Rodgers
  3 siblings, 0 replies; 5+ messages in thread
From: Andrew Taylor @ 2004-04-22 22:23 UTC (permalink / raw)


William Payne wrote:

> Hello, I want to evaluate the following expression:
> (insert (prin1-to-string (w32-select-font)))
> 
> I read that I should evaluate it in the scratch buffer, so I typed it in
> there...but what do I do to get the actual evaluation to occur?

In lisp-interaction-mode (which is what the *scratch* buffer uses), C-j 
is mapped to eval-print-last-sexp.  Just position the point after the 
last closing parenthesis and press C-j.

-- 
Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: evaluate expression in scratch buffer
  2004-04-22 21:04 evaluate expression in scratch buffer William Payne
  2004-04-22 21:27 ` Marco Parrone
  2004-04-22 22:23 ` Andrew Taylor
@ 2004-04-23  6:20 ` Holger Sparr
  2004-04-23 16:11 ` Kevin Rodgers
  3 siblings, 0 replies; 5+ messages in thread
From: Holger Sparr @ 2004-04-23  6:20 UTC (permalink / raw)


On Thu, 22 Apr 2004, William Payne wrote:
> Hello, I want to evaluate the following expression:
> (insert (prin1-to-string (w32-select-font)))
> 
> I read that I should evaluate it in the scratch buffer, so I typed it
> in there...but what do I do to get the actual evaluation to occur?

Go to the closing parent and hit "C-j".

Holger

-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: evaluate expression in scratch buffer
  2004-04-22 21:04 evaluate expression in scratch buffer William Payne
                   ` (2 preceding siblings ...)
  2004-04-23  6:20 ` Holger Sparr
@ 2004-04-23 16:11 ` Kevin Rodgers
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2004-04-23 16:11 UTC (permalink / raw)


William Payne wrote:

> Hello, I want to evaluate the following expression:
> (insert (prin1-to-string (w32-select-font)))
> 
> I read that I should evaluate it in the scratch buffer, so I typed it in
> there...but what do I do to get the actual evaluation to occur?

You can find out what special commands any buffer provides with `C-h m' and

`C-h b'.

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-04-23 16:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-22 21:04 evaluate expression in scratch buffer William Payne
2004-04-22 21:27 ` Marco Parrone
2004-04-22 22:23 ` Andrew Taylor
2004-04-23  6:20 ` Holger Sparr
2004-04-23 16:11 ` Kevin Rodgers

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).