[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: conditionals in elisp
From: |
Drew Adams |
Subject: |
RE: conditionals in elisp |
Date: |
Wed, 28 Oct 2009 07:03:48 -0700 |
> If these (nicely formatted) examples are useful, they could
> be added to the documentation.
Perhaps. My main suggestion in this regard was that one can explore - try things
interactively, to see what happens.
> In any case, in addition to M-:, the *scratch* buffer is also a nice
> place to interact with Emacs. There, the values of the
> expressions are
> inserted into the buffer and so are less fleeting than the output of
> M-: in the echo area....
>
> Another benefit of experimenting via the *scratch* buffer is that if
> something perplexes you there, it is very easy to mail the relevant
> fragment when asking for help.
I second what Thi says here. I'd also suggest an alternative to using *scratch*
- visit a new Emacs-Lisp file and use that buffer, which will be in Emacs-Lisp
mode: `C-x C-f whatever.el'.
I think Emacs-Lisp mode is generally easier to experiment in than is
Lisp-Interaction mode (the mode of buffer *scratch*). In particular, in
*scratch*, I too often get caught by the gotcha that `C-j' evaluates, instead of
just indenting. But that's probably a problem of habit.
In any case, either *scratch* or an Emacs-Lisp buffer is generally better than
`M-:' for extended experimenting, because, as Thi said, you can see the input
and output, compare results from one evaluation to the next, and easily
copy+paste to repeat things or report them.
The general point is that Lisp helps you learn Lisp, by being *very*
interactive. And one mustn't be afraid to break things or get lost. Just
remember that `C-g' cancels what's in progress, and if you fall into the white
hole of the debugger, `q' will yank you back out like a bungee cord.
- conditionals in elisp, Harry Putnam, 2009/10/26
- Re: conditionals in elisp, Richard Riley, 2009/10/26
- RE: conditionals in elisp, Drew Adams, 2009/10/26
- Re: conditionals in elisp, Harry Putnam, 2009/10/27
- RE: conditionals in elisp, Drew Adams, 2009/10/27
- Re: conditionals in elisp, Thien-Thi Nguyen, 2009/10/28
- RE: conditionals in elisp,
Drew Adams <=
- Re: conditionals in elisp, Harry Putnam, 2009/10/28
- Message not available
- Re: conditionals in elisp, LanX, 2009/10/28
- Re: conditionals in elisp, Harry Putnam, 2009/10/28
Re: conditionals in elisp, tomas, 2009/10/27