unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: uzibalqa <uzibalqa@proton.me>
Cc: uzibalqa via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>
Subject: RE: [External] : menu-item uses no dot period before item-property-list in examples
Date: Mon, 17 Jul 2023 16:36:37 +0000	[thread overview]
Message-ID: <SJ0PR10MB5488949B5A7B333F642495F4F33BA@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <awnt9xcgBoAzpmMRFCO8CVMmjBFP80xNfAoid7qzevfTpLHItsy2PT_pHh6knCvLGjMwhw84sd7gBpVXkIBby0B-4uj85uk_8PgBkRXyE4M=@proton.me>

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

> > > So why bother users in the manual why that is never actually used.
> > > (menu-item item-name real-binding item-property-list)
> >
> > I hope you meant this, which is not the same thing:
> > (menu-item item-name real-binding
> > . item-property-list)
> >
> > item-property-list is not an element of the
> > overall list. It's "spliced" into that list,
> > as its tail.
>
> Actual code implementations using menu-item does not include
> '.' before 'item-property-list'.
> (menu-item item-name real-binding . item-property-list)

Look again.  item-property-list must be a list.
That list is _not_ included as an element in
the list that starts (menu-item....

Instead, the _elements_ of item-property-list
are included as elements of list (menu-item....
That's apparently what you're not getting.

Example:

'(menu-item "Load" diredp-load-this-file
  :help "Load this Elisp file")

item-name           is  "Load".
real-binding        is  diredp-load-this-file
item-property-list  is
  this 2-element list: (:help
                        "Load this Elisp file")

You do _not_ see this:

'(menu-item "Load" diredp-load-this-file
  (:help "Load this Emacs Lisp file"))
  ^                                 ^

which is equal to this:

'(menu-item "Load" diredp-load-this-file
  . ((:help "Load this Emacs Lisp file")))
  ^ ^                                   ^

What you do see is equal to this:

'(menu-item "Load" diredp-load-this-file
  . (:help "Load this Emacs Lisp file"))

Now ask yourself _why_ the syntax spec
shows a dot before item-property-list.

If you still don't get it, take a break,
stand on your head for a few minutes, run
around the block, then study this again...
till you do.

When you finally get it, go look at the
Emacs documentation that introduces lists
and their notation.  You'll find it very
clear, I think.  All of this is explained.

And yes, you should read the basics, such
as notation, _before_ you start trying to
interpret the _use_ of such notation in the
doc.  E.g., before you try to interpret the
presentation of the syntax of extended menu
items, learn about Lisp dot notation.

And as has also been said, this isn't just
a doc notational convention.  It's in fact
the actual, effective, real-life Lisp list
syntax.

Crawl, then walk, before trying to run.
That way, you'll find that running isn't
so difficult, mysterious, confusing, scary,
or user-unfriendly.

And that way maybe you'll stop kvetching
that you're "drowning" and that folks need
to quickly line up and start saving you.

Don't presume that those trying to help you
don't get it.  You're not the first person
to learn Lisp, and you're not the first one
that people here, and Emacs itself, has
helped.

And maybe read this - it might be humbling.

https://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect

[-- Attachment #2: baby-bird.jpg --]
[-- Type: image/jpeg, Size: 10026 bytes --]

[-- Attachment #3: help-help-drowning.jpg --]
[-- Type: image/jpeg, Size: 5072 bytes --]

  reply	other threads:[~2023-07-17 16:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-16 22:34 menu-item uses no dot period before item-property-list in examples uzibalqa
2023-07-17  0:52 ` [External] : " Drew Adams
2023-07-17  1:07   ` Emanuel Berg
2023-07-17 15:05     ` Drew Adams
2023-07-17  1:17   ` uzibalqa
2023-07-17 15:10     ` Drew Adams
2023-07-17 15:43       ` uzibalqa
2023-07-17 16:36         ` Drew Adams [this message]
2023-07-17 16:56           ` uzibalqa
2023-07-17 17:25             ` uzibalqa
2023-07-17 19:07               ` uzibalqa
2023-07-17 19:26               ` Drew Adams

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=SJ0PR10MB5488949B5A7B333F642495F4F33BA@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=uzibalqa@proton.me \
    /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).