From: Eduardo Ochs <eduardoochs@gmail.com>
To: fatiparty@tutanota.com
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Elisp function that performs numeric computations
Date: Wed, 19 Jan 2022 14:31:12 -0300 [thread overview]
Message-ID: <CADs++6jQ8iOJtRL8z87h1iRaiNeTN8Y_SqmOJv0Z_r9ns6V91w@mail.gmail.com> (raw)
In-Reply-To: <MtlZuDS--3-2@tutanota.com>
On Wed, 19 Jan 2022 at 06:18, fatiparty--- via Users list for the GNU Emacs
text editor <help-gnu-emacs@gnu.org> wrote:
> I have done as follows. But one problem is: How do I use the output in
> another elisp function?
>
>
Hi Fatiparty,
the easiest way to test small elisp snippets is to run them by typing
C-e C-x C-e on the last line of the snippet... the C-e will move to
the end of the line, and the C-x C-e will then execute the "sexp
before point" and show the result in the echo area. This is explained
here:
(info "(emacs)Lisp Eval")
http://www.gnu.org/software/emacs/manual/html_node/emacs/Lisp-Eval.html
Try this on these sexps:
(* 2 3)
(* 4 5)
(+ (* 2 3) (* 4 5))
(progn (* 2 3) (* 4 5) (* 6 7))
(prog1 (* 2 3) (* 4 5) (* 6 7))
(prog2 (* 2 3) (* 4 5) (* 6 7))
If you like this way of running sexps then you should take a look at
this tutorial, that is all written in this style - "run each of these
sexps with `C-e C-x C-e' and try to understand what they do"...
http://angg.twu.net/eev-intros/find-elisp-intro.html
Note that the introduction of that tutorial says:
Different people prefer different kinds of tutorials.
Many people love the eintr, but I don't: (find-node "(eintr)Top")
This tutorial here is what I would have liked to have had access to
when I started learning Emacs Lisp.
Cheers,
Eduardo Ochs
http://angg.twu.net/#eev
next prev parent reply other threads:[~2022-01-19 17:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 7:20 Elisp function that performs numeric computations fatiparty--- via Users list for the GNU Emacs text editor
[not found] ` <MtlCLWs--3-2@tutanota.com-MtlItBn----2>
2022-01-19 9:03 ` fatiparty--- via Users list for the GNU Emacs text editor
2022-01-19 10:14 ` tomas
2022-01-19 11:29 ` Marcin Borkowski
2022-01-19 22:52 ` fatiparty--- via Users list for the GNU Emacs text editor
2022-01-20 22:53 ` Sergey Organov
2022-01-21 8:23 ` fatiparty--- via Users list for the GNU Emacs text editor
2022-01-21 11:39 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-21 13:03 ` Sergey Organov
2022-01-21 15:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-21 17:13 ` Sergey Organov
2022-01-21 9:04 ` fatiparty--- via Users list for the GNU Emacs text editor
2022-01-21 11:51 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-21 12:25 ` fatiparty--- via Users list for the GNU Emacs text editor
[not found] ` <MtoXj5p--3-2@tutanota.com-MtoXrZH----2>
2022-01-20 18:17 ` fatiparty--- via Users list for the GNU Emacs text editor
2022-01-19 10:24 ` Manuel Giraud
2022-01-19 17:31 ` Eduardo Ochs [this message]
2022-01-19 15:31 ` Michael Heerdegen
2022-01-19 18:41 ` H. Dieter Wilhelm
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=CADs++6jQ8iOJtRL8z87h1iRaiNeTN8Y_SqmOJv0Z_r9ns6V91w@mail.gmail.com \
--to=eduardoochs@gmail.com \
--cc=fatiparty@tutanota.com \
--cc=help-gnu-emacs@gnu.org \
/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).