unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eduardo Ochs <eduardoochs@gmail.com>
To: Stefan Kangas <stefan@marxist.se>
Cc: Eli Zaretskii <eliz@gnu.org>, Anonymous <c4droid@foxmail.com>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Some ideas with Emacs
Date: Fri, 29 Nov 2019 10:56:03 -0300	[thread overview]
Message-ID: <CADs++6hfN7fSjJoXEAdC=5k-Pf3fJ0buwv1-Utm73n6ty6jgCw@mail.gmail.com> (raw)
In-Reply-To: <CADwFkmmc+7mVATXi_u5Gd5CydJQCxg5My+X38=jX3M665t4Pcw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4028 bytes --]

Hi Anonymous and other people,

most people test small snippets of elisp code by executing sexps with
`C-x C-e' or variants of it, not by loading elisp files. My
(admittedly biased!) feeling is that the best way to help beginners
learn Lisp is by giving them sexps to play with - configurations,
plugins, and even long texts in English, are secondary...

I tried to do something in this direction in a package that I wrote
called "eev" that I often use to teach Emacs and programming to total
beginners - here are some links to it:

  http://angg.twu.net/#eev
  http://angg.twu.net/emacsconf2019.html
  http://elpa.gnu.org/packages/eev.html

It comes with lots of tutorials. If you run

  (find-eev-quick-intro)
  (find-eev-intro)
  (find-eval-intro)

these sexps will open three of its "sandboxed tutorials" in temporary
read-write buffers; I use read-write buffers to let users play with
the sexps in them more easily. Here are links to the htmlized versions
of these three tutorials:

  http://angg.twu.net/eev-intros/find-eev-quick-intro.html
  http://angg.twu.net/eev-intros/find-eev-intro.html
  http://angg.twu.net/eev-intros/find-eval-intro.html

The tutorial in (find-eval-intro) is one of the ones that is still
very messy and in need of being rewritten, but there are is a section
in it I think that is relevant to this discussion. You can access it
with:

  http://angg.twu.net/eev-intros/find-eval-intro.html#10
  (find-eval-intro "10. More on functions")

but let me copy it here...



  10. More on functions
  =====================
  A symbol - for example `f' - can be both a varible and a
  function; its "value as a variable" and its "value as a
  function" are stored in different places. Try:

    (setq f 2)
    (setq f 5)
    (defun f (x) (* x x))
    (defun f (x) (* 10 x))
    (symbol-value    'f)
    (symbol-function 'f)

  This is explained here:

    (find-elnode "Symbol Components")
    (find-elnode "Symbol Components" "value cell")
    (find-elnode "Symbol Components" "function cell")

  The content of a "function cell" is _usually_ a lambda
  expression. See:

    (find-elnode "Lambda Expressions")
    (find-elnode "What Is a Function")
    (find-elnode "What Is a Function" "lambda expression")
    (find-elnode "What Is a Function" "byte-code function")

  Try:

    (setq f 2)
    (setq f 5)
    (set 'f 2)
    (set 'f 5)
    (fset 'f (lambda (x) (* x x)))
    (fset 'f (lambda (x) (* 10 x)))
    (defun f (x) (* 10 x))
    (defun f (x) (* x x))
    (symbol-value    'f)
    (symbol-function 'f)
    (f 4)
    (f f)

    ((lambda (x) (* x x))
     4)
    ((lambda (x) (* 10 x))
     4)


I have only used that particular section in a couple of workshops -
i.e., in situations where the participants could easily try things,
discuss with their neighbors, and ask questions - but the point is
that I feel that we need more material like this... and I would love
to work with other people to produce it.

  Cheers,
    Eduardo Ochs
    http://angg.twu.net/#eev


On Fri, 29 Nov 2019 at 10:44, Stefan Kangas <stefan@marxist.se> wrote:

> Eli Zaretskii <eliz@gnu.org> writes:
>
> > I think if we want to have an ELisp tutorial, it should be a separate
> > manual.  The current ELisp manual is a reference manual, and written
> > as such.
>
> I fail to see why a reference manual can't also include examples.
> I've had to search the web to understand how to use things before,
> even after having carefully read the relevant parts of the elisp
> manual and the doc string.  An example says a thousand words, as the
> saying goes...
>
> I think the Python documentation is very good in this regard.  Here is
> one example:
>
> https://docs.python.org/3/library/stdtypes.html#mapping-types-dict
>
> To be clear, I'm not suggesting that we should mandate that we should
> include examples.  But I'd suggest to optionally add them where it
> makes sense, and possibly then only in the info version of the manual
> (since we lack space in the print edition).
>
> Best regards,
> Stefan Kangas
>
>

[-- Attachment #2: Type: text/html, Size: 5679 bytes --]

  reply	other threads:[~2019-11-29 13:56 UTC|newest]

Thread overview: 120+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29  9:05 Some ideas with Emacs Anonymous
2019-11-29 11:16 ` Marcin Borkowski
2019-11-29 11:44   ` =?gb18030?B?QW5vbnltb3Vz?=
2019-11-30  5:54     ` Emanuel Berg via Emacs development discussions.
2019-11-30  5:51   ` Emanuel Berg via Emacs development discussions.
2019-12-01  5:57   ` Richard Stallman
2019-12-01 10:56     ` Marcin Borkowski
2019-12-01 11:08       ` Marcin Borkowski
2019-12-01 13:40         ` VanL
2019-12-01 14:07           ` Marcin Borkowski
2019-12-02  4:52             ` VanL
2019-12-02  6:12               ` Marcin Borkowski
2019-12-03  5:01                 ` Richard Stallman
2019-12-03 15:45                   ` Eli Zaretskii
2019-12-03 16:21                     ` Emanuel Berg via Emacs development discussions.
2019-12-03 17:35                       ` Eli Zaretskii
2019-12-03 17:59                       ` Stefan Monnier
2019-12-03 19:51                         ` Emanuel Berg via Emacs development discussions.
2019-12-03 19:32                     ` Marcin Borkowski
2019-12-03 19:37                       ` Eli Zaretskii
2019-12-03 23:08                         ` Marcin Borkowski
2019-12-04  3:42                           ` Eli Zaretskii
2019-12-06 18:29                             ` Marcin Borkowski
2019-12-04  8:39                     ` VanL
2019-12-03 23:12                   ` Marcin Borkowski
2019-12-05  4:41                     ` Richard Stallman
2019-12-06  6:51                       ` VanL
2019-12-06 20:13                         ` Marcin Borkowski
2019-12-06 23:58                           ` VanL
2019-12-02  5:41           ` Richard Stallman
2019-12-02 12:53             ` Marcin Borkowski
2019-12-02 18:07               ` Stefan Monnier
2019-12-02 20:57                 ` Marcin Borkowski
2019-12-02 21:19                   ` Stefan Monnier
2019-12-02 22:13                     ` Marcin Borkowski
2019-12-02 22:41                       ` Stefan Monnier
2019-12-02 23:04                         ` Marcin Borkowski
2019-12-03  0:20                           ` Stefan Monnier
2019-12-03 23:26                             ` Marcin Borkowski
2019-12-03  8:37                           ` VanL
2019-12-03 10:14                             ` Marcin Borkowski
2019-12-03 11:14                               ` VanL
2019-12-05  4:44                               ` Richard Stallman
2019-12-05  7:30                                 ` Elias Mårtenson
2019-12-06  4:11                                   ` Richard Stallman
2019-12-07  2:21                                     ` Elias Mårtenson
2019-12-08  5:06                                     ` Librepay Richard Stallman
2019-12-08 12:10                                       ` Librepay VanL
2019-12-03  5:03                         ` Some ideas with Emacs Richard Stallman
2019-12-03  4:58               ` Richard Stallman
2019-12-04  0:37                 ` Marcin Borkowski
2019-12-05  4:41                   ` Richard Stallman
2020-05-11 19:37                     ` Marcin Borkowski
2020-06-03  4:25                       ` Richard Stallman
2019-11-29 11:37 ` Stefan Kangas
2019-11-29 11:59   ` Anonymous
2019-11-29 12:31   ` Emacs: the Editor for the Next Forty Years (was Re: Some ideas with Emacs) Juanma Barranquero
2019-11-29 13:22   ` Some ideas with Emacs Eli Zaretskii
2019-11-29 13:34     ` Stefan Kangas
2019-11-29 13:56       ` Eduardo Ochs [this message]
2019-11-29 14:13       ` Eli Zaretskii
2019-11-29 14:26         ` Anonymous
2019-11-30  3:51         ` Stefan Kangas
2019-12-01  3:14         ` Emanuel Berg via Emacs development discussions.
2019-11-29 15:36       ` Stefan Monnier
2019-11-29 18:58         ` Michael Albinus
2019-11-29 19:13           ` Adding examples in the doc (was: Some ideas with Emacs) Stefan Monnier
2019-11-29 19:30             ` Yuan Fu
2019-11-29 20:03             ` Adding examples in the doc Michael Albinus
2019-11-29 19:32           ` Some ideas with Emacs Eli Zaretskii
2019-11-29 20:09             ` Michael Albinus
2019-11-29 20:14               ` Eli Zaretskii
2019-11-29 20:25                 ` Michael Albinus
2019-11-29 20:30                   ` Eli Zaretskii
2019-12-01  6:25                   ` Emanuel Berg via Emacs development discussions.
2019-12-01  7:35                     ` Eduardo Ochs
2019-12-01 10:21                     ` Michael Albinus
2019-12-01  6:19             ` Emanuel Berg via Emacs development discussions.
2019-11-29 21:42           ` Clément Pit-Claudel
2019-11-30  0:12             ` João Távora
2019-12-01  6:48               ` Emanuel Berg via Emacs development discussions.
2019-12-01 17:30                 ` Eli Zaretskii
2019-11-30  0:44             ` Yuan Fu
2019-11-30  4:00               ` Stefan Kangas
2019-11-30  7:19                 ` Eli Zaretskii
2019-11-30  7:05             ` Eli Zaretskii
2019-12-01  6:51               ` Emanuel Berg via Emacs development discussions.
2019-12-01 17:32                 ` Eli Zaretskii
2019-12-01 18:25                   ` Emanuel Berg via Emacs development discussions.
2019-12-01 19:44               ` Michael Welsh Duggan
2019-12-01 20:48                 ` Eli Zaretskii
2019-12-01 21:35                   ` Emanuel Berg via Emacs development discussions.
2019-12-02  3:32                     ` Eli Zaretskii
2019-12-02  4:17                       ` Emanuel Berg via Emacs development discussions.
2019-12-02  4:48                         ` Yuan Fu
2019-12-02  4:53                           ` Emanuel Berg via Emacs development discussions.
2019-12-02 15:57                       ` Michael Albinus
2019-12-01 22:20                   ` Michael Welsh Duggan
2019-12-01 22:46                     ` Emanuel Berg via Emacs development discussions.
2019-12-01  6:46             ` Emanuel Berg via Emacs development discussions.
2019-12-01  3:21           ` Emanuel Berg via Emacs development discussions.
2019-12-01  6:04         ` Richard Stallman
2019-12-01  6:15           ` Emanuel Berg via Emacs development discussions.
2019-12-01  6:05     ` Richard Stallman
2019-11-29 15:43   ` Stefan Monnier
2019-11-29 16:04     ` Robert Pluim
2019-11-30 11:21   ` Emanuel Berg via Emacs development discussions.
2019-12-01  2:41     ` VanL
2019-12-01 18:05     ` Stefan Monnier
2019-12-01 18:36       ` Emanuel Berg via Emacs development discussions.
2019-12-03  6:07 ` Ag Ibragimov
2019-12-06 18:30   ` Marcin Borkowski
2019-12-06 19:18     ` Juanma Barranquero
2019-12-06 20:14       ` Marcin Borkowski
2019-12-06 21:22       ` Stefan Monnier
2019-12-06 21:26         ` Juanma Barranquero
2019-12-07  2:13     ` Ag Ibragimov
2019-12-07  3:14       ` Drew Adams
2019-12-10 20:55       ` Marcin Borkowski
2019-12-11  4:21         ` VanL

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++6hfN7fSjJoXEAdC=5k-Pf3fJ0buwv1-Utm73n6ty6jgCw@mail.gmail.com' \
    --to=eduardoochs@gmail.com \
    --cc=c4droid@foxmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=stefan@marxist.se \
    /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 public inbox

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

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