all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: waterloo <waterloo2005@gmail.com>
Cc: emacs-pretest-bug@gnu.org, 3757@emacsbugs.donarmstrong.com
Subject: bug#3757: 23.0.95; can you explain why C-u make it appear not in minibuffer
Date: Sun, 05 Jul 2009 11:23:50 +0200	[thread overview]
Message-ID: <878wj3iiu1.fsf@escher.local.home> (raw)
In-Reply-To: <907065090907042125j47da8250re691e56de0c5529d@mail.gmail.com> (waterloo's message of "Sun, 5 Jul 2009 12:25:00 +0800")

On Sun, 5 Jul 2009 12:25:00 +0800 waterloo <waterloo2005@gmail.com> wrote:

> in 11.1.2 An Example: `print-elements-of-list' of `Instruction to
> emacs lisp' , why C-u make the output not in minubuffer.
> C-u is 4 by definition .
> I can not understant why in the context.
> can you explain more details or give some link ?

I assume you are referring to this (in node
(eintr)print-elements-of-list of the Introduction to Programming in
Emacs Lisp):

"Be sure to evaluate the last expression, `(print-elements-of-list
animals)', by typing `C-u C-x C-e', that is, by giving an argument to
`eval-last-sexp'.  This will cause the result of the evaluation to be
printed in the `*scratch*' buffer instead of being printed in the echo
area."

That is, C-u is not a prefix argument of `print-elements-of-list' but of
`eval-last-sexp', and its meaning is explained in the doc string of
`eval-last-sexp', which you can read by typing `C-h f eval-last-sexp':

,----
| eval-last-sexp is an interactive compiled Lisp function in `lisp-mode.el'.
| 
| It is bound to C-x C-e.
| 
| (eval-last-sexp eval-last-sexp-arg-internal)
| 
| Evaluate sexp before point; print value in minibuffer.
| Interactively, with prefix argument, print output into current buffer.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| Truncates long output according to the value of the variables
| `eval-expression-print-length' and `eval-expression-print-level'.
`----

You need to use `eval-last-sexp' (or another evaluation method) because
`print-elements-of-list' is not a command, i.e. an interactive function,
since it lacks `(interactive)' in its definition.  So you cannot call it
by typing `M-x print-elements-of-list' but have to explicitly evaluate
it.

Steve Berman





  reply	other threads:[~2009-07-05  9:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-05  4:25 bug#3757: 23.0.95; can you explain why C-u make it appear not in minibuffer waterloo
2009-07-05  9:23 ` Stephen Berman [this message]
2009-07-05 10:27   ` waterloo

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

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

  git send-email \
    --in-reply-to=878wj3iiu1.fsf@escher.local.home \
    --to=stephen.berman@gmx.net \
    --cc=3757@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=waterloo2005@gmail.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.