unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Pascal Bourguignon <spam@mouse-potato.com>
Subject: Re: How to use emacs as a lisp interpreter?
Date: Mon, 08 Aug 2005 03:19:48 +0200	[thread overview]
Message-ID: <87oe89rzrf.fsf@thalassa.informatimago.com> (raw)
In-Reply-To: 1123449147.971983.57200@g44g2000cwa.googlegroups.com

"Erik the Red" <the.g.man.x@gmail.com> writes:

> Topic question.

M-x ielm RET

But actually, you can just type in any buffer s-expressions and type
C-u C-x C-e to get the result.

For exmaple, in this gnus article, if I type:
    (mapcar (lambda (x) (* x 2)) '(1 2 3)) C-u C-x C-e
I get:
    (2 4 6)

Or if I type: (format "\n\n    ** Hello %s! **\n\n" 
                (save-excursion
                   (goto-char 0)
                   (re-search-forward "\"\\([^\"]*\\)\"" nil nil 2)
                    (match-string-no-properties 1))) C-u C-x C-e
I get:

"

    ** Hello Erik the Red! **

"

-- 
"A TRUE Klingon warrior does not comment his code!"

      parent reply	other threads:[~2005-08-08  1:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-07 21:12 How to use emacs as a lisp interpreter? Erik the Red
2005-08-07 21:50 ` Peter Dyballa
2005-08-08  1:19 ` Pascal Bourguignon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oe89rzrf.fsf@thalassa.informatimago.com \
    --to=spam@mouse-potato.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).