unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* menu-item uses no dot period before item-property-list in examples
@ 2023-07-16 22:34 uzibalqa
  2023-07-17  0:52 ` [External] : " Drew Adams
  0 siblings, 1 reply; 12+ messages in thread
From: uzibalqa @ 2023-07-16 22:34 UTC (permalink / raw)
  To: uzibalqa via Users list for the GNU Emacs text editor


Am reading the documentation about how to make a menu.

Have read about 

 (menu-item item-name real-binding . item-property-list)

but when things actually get implemented there exist no dot period
before 'item-property-list'.

 (define-key global-map
   [menu-bar mcp-topm daphne-subm entry-sweep]
     '(menu-item "Entry Sweep" gilgamesh-entry-sweep
        :help "Entry Sweep"))







^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [External] : menu-item uses no dot period before item-property-list in examples
  2023-07-16 22:34 menu-item uses no dot period before item-property-list in examples uzibalqa
@ 2023-07-17  0:52 ` Drew Adams
  2023-07-17  1:07   ` Emanuel Berg
  2023-07-17  1:17   ` uzibalqa
  0 siblings, 2 replies; 12+ messages in thread
From: Drew Adams @ 2023-07-17  0:52 UTC (permalink / raw)
  To: uzibalqa, uzibalqa via Users list for the GNU Emacs text editor

> > Have read about
> 
>  (menu-item item-name real-binding . item-property-list)
>
> but when things actually get implemented there exist no dot period
> before 'item-property-list'.
> 
>  (define-key global-map
>    [menu-bar mcp-topm daphne-subm entry-sweep]
>      '(menu-item "Entry Sweep" gilgamesh-entry-sweep
>         :help "Entry Sweep"))

Yes, there is.  And you've been told before
that (a . (b c)) is the same as (a b c).

For simplicity, Lisp _printing_ removes the
dot and parens: . (...).  This is standard
Lisp syntax convenience: we write (a b c)
instead of (a . (b . (c . nil))).  That's
all there is to it.

And you've asked this before, and you've
been pointed to the Elisp doc, which
explains all of this in detail, even with
diagrams and examples.

Please, Ask Emacs.  Many people, over many
years, have gone to the trouble of writing
good, clear help and doc.

And you can find the same thing outside of
Emacs, in any number of Lisp introductions.

Help yourself.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [External] : menu-item uses no dot period before item-property-list in examples
  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
  1 sibling, 1 reply; 12+ messages in thread
From: Emanuel Berg @ 2023-07-17  1:07 UTC (permalink / raw)
  To: help-gnu-emacs

Drew Adams wrote:

> Yes, there is. And you've been told before that (a . (b c))
> is the same as (a b c).
>
> For simplicity, Lisp _printing_ removes the dot and parens:
> . (...). This is standard Lisp syntax convenience: we write
> (a b c) instead of (a . (b . (c . nil))). That's all there
> is to it.

You mean like this

  (equal '(a b c) '(a . (b . (c . nil))))

?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [External] : menu-item uses no dot period before item-property-list in examples
  2023-07-17  0:52 ` [External] : " Drew Adams
  2023-07-17  1:07   ` Emanuel Berg
@ 2023-07-17  1:17   ` uzibalqa
  2023-07-17 15:10     ` Drew Adams
  1 sibling, 1 reply; 12+ messages in thread
From: uzibalqa @ 2023-07-17  1:17 UTC (permalink / raw)
  To: Drew Adams; +Cc: uzibalqa via Users list for the GNU Emacs text editor


------- Original Message -------
On Monday, July 17th, 2023 at 12:52 PM, Drew Adams <drew.adams@oracle.com> wrote:


> > > Have read about
> > 
> > (menu-item item-name real-binding . item-property-list)
> > 
> > but when things actually get implemented there exist no dot period
> > before 'item-property-list'.
> > 
> > (define-key global-map
> > [menu-bar mcp-topm daphne-subm entry-sweep]
> > '(menu-item "Entry Sweep" gilgamesh-entry-sweep
> > :help "Entry Sweep"))
> 
> 
> Yes, there is. And you've been told before
> that (a . (b c)) is the same as (a b c).
> 
> For simplicity, Lisp printing removes the
> dot and parens: . (...). This is standard
> Lisp syntax convenience: we write (a b c)
> instead of (a . (b . (c . nil))). That's
> all there is to it.

So why bother users in the manual why that is never actually used.

(menu-item item-name real-binding item-property-list)
 
> And you've asked this before, and you've
> been pointed to the Elisp doc, which
> explains all of this in detail, even with
> diagrams and examples.
> 
> Please, Ask Emacs. Many people, over many
> years, have gone to the trouble of writing
> good, clear help and doc.

That's your assertion.  Bothering us with jargon that never gets used is 
just being silly to those who do not have time for nonsense intended only
for general language interest rather than practicality.

The dot should be removed from the documentation and have


 
> And you can find the same thing outside of
> Emacs, in any number of Lisp introductions.
> 
> Help yourself.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [External] : menu-item uses no dot period before item-property-list in examples
  2023-07-17  1:07   ` Emanuel Berg
@ 2023-07-17 15:05     ` Drew Adams
  0 siblings, 0 replies; 12+ messages in thread
From: Drew Adams @ 2023-07-17 15:05 UTC (permalink / raw)
  To: Emanuel Berg, help-gnu-emacs@gnu.org

> > we write (a b c) instead of (a . (b . (c . nil))).
>
> You mean like this
> (equal '(a b c) '(a . (b . (c . nil))))

Yes, of course.  Or:

(let ((x  (list 'a 'b 'c))
      (y  (cons 'a (cons 'b (cons 'c nil)))))
  (equal x y))



^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [External] : menu-item uses no dot period before item-property-list in examples
  2023-07-17  1:17   ` uzibalqa
@ 2023-07-17 15:10     ` Drew Adams
  2023-07-17 15:43       ` uzibalqa
  0 siblings, 1 reply; 12+ messages in thread
From: Drew Adams @ 2023-07-17 15:10 UTC (permalink / raw)
  To: uzibalqa; +Cc: uzibalqa via Users list for the GNU Emacs text editor

> > > Have read about
> > > (menu-item item-name real-binding . item-property-list)
> > > but when things actually get implemented there exist no dot period
> > > before 'item-property-list'.
> > >
> > > (define-key global-map
> > > [menu-bar mcp-topm daphne-subm entry-sweep]
> > > '(menu-item "Entry Sweep" gilgamesh-entry-sweep
> > > :help "Entry Sweep"))
> >
> > Yes, there is. And you've been told before
> > that (a . (b c)) is the same as (a b c).
> >
> > For simplicity, Lisp printing removes the
> > dot and parens: . (...). This is standard
> > Lisp syntax convenience: we write (a b c)
> > instead of (a . (b . (c . nil))). That's
> > all there is to it.
> 
> 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_.

What "bother" are you referring to?
item-property-list is a list.  That's all.

Lisp users like/need? to understand dotted
list notation, and its abbreviated read and
print notation, i.e., the fact that

(a b c) = (a . (b . (c . nil)))

If you intend to use Elisp, then you should
intend to read about and understand its read
and print syntax.  And if you use Elisp to
create menus then you should intend to read
and understand a syntax description such as

(menu-item item-name real-binding
 . item-property-list)

> > And you've asked this before, and you've
> > been pointed to the Elisp doc, which
> > explains all of this in detail, even with
> > diagrams and examples.
> >
> > Please, Ask Emacs. Many people, over many
> > years, have gone to the trouble of writing
> > good, clear help and doc.
> 
> That's your assertion.  Bothering us with jargon that never gets used is
> just being silly to those who do not have time for nonsense intended only
> for general language interest rather than practicality.

What "jargon that never gets used" are you referring to?

Apparently what you call "bother" is what Emacs
offers as doc to try to _help_ its users.

Who is bothering whom, with your "Help Me!!!??
I'm drowning!!!?!!" pleas for help?  Do you ever
wonder why people - even very patient people -
give up on you after a while for not trying to
_help yourself_ a bit?

> The dot should be removed from the documentation
> and have
  ^^^^^^^^ ?                                

What dot, where?  And have what?  Is it possible
for you to see that you just toss half-articulated
demands and pleas over the wall and then expect
help and mind-reading?

Maybe try ChatGPT instead?

> > And you can find the same thing outside of
> > Emacs, in any number of Lisp introductions.
> >
> > Help yourself.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [External] : menu-item uses no dot period before item-property-list in examples
  2023-07-17 15:10     ` Drew Adams
@ 2023-07-17 15:43       ` uzibalqa
  2023-07-17 16:36         ` Drew Adams
  0 siblings, 1 reply; 12+ messages in thread
From: uzibalqa @ 2023-07-17 15:43 UTC (permalink / raw)
  To: Drew Adams; +Cc: uzibalqa via Users list for the GNU Emacs text editor






Sent with Proton Mail secure email.

------- Original Message -------
On Tuesday, July 18th, 2023 at 3:10 AM, Drew Adams <drew.adams@oracle.com> wrote:


> > > > Have read about
> > > > (menu-item item-name real-binding . item-property-list)
> > > > but when things actually get implemented there exist no dot period
> > > > before 'item-property-list'.
> > > > 
> > > > (define-key global-map
> > > > [menu-bar mcp-topm daphne-subm entry-sweep]
> > > > '(menu-item "Entry Sweep" gilgamesh-entry-sweep
> > > > :help "Entry Sweep"))
> > > 
> > > Yes, there is. And you've been told before
> > > that (a . (b c)) is the same as (a b c).
> > > 
> > > For simplicity, Lisp printing removes the
> > > dot and parens: . (...). This is standard
> > > Lisp syntax convenience: we write (a b c)
> > > instead of (a . (b . (c . nil))). That's
> > > all there is to it.
> > 
> > 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.
> 
> What "bother" are you referring to?
> item-property-list is a list. That's all.
> 
> Lisp users like/need? to understand dotted
> list notation, and its abbreviated read and
> print notation, i.e., the fact that
> 
> (a b c) = (a . (b . (c . nil)))
> 
> If you intend to use Elisp, then you should
> intend to read about and understand its read
> and print syntax. And if you use Elisp to
> create menus then you should intend to read
> and understand a syntax description such as
> 
> (menu-item item-name real-binding
> . item-property-list)
> 
> > > And you've asked this before, and you've
> > > been pointed to the Elisp doc, which
> > > explains all of this in detail, even with
> > > diagrams and examples.
> > > 
> > > Please, Ask Emacs. Many people, over many
> > > years, have gone to the trouble of writing
> > > good, clear help and doc.
> > 
> > That's your assertion. Bothering us with jargon that never gets used is
> > just being silly to those who do not have time for nonsense intended only
> > for general language interest rather than practicality.
> 
> 
> What "jargon that never gets used" are you referring to?
> 
> Apparently what you call "bother" is what Emacs
> offers as doc to try to help its users.
> 
> Who is bothering whom, with your "Help Me!!!??
> I'm drowning!!!?!!" pleas for help? Do you ever
> wonder why people - even very patient people -
> give up on you after a while for not trying to
> help yourself a bit?
> 
> > The dot should be removed from the documentation
> > and have
> 
> ^^^^^^^^ ?
> 
> What dot, where? And have what? Is it possible
> for you to see that you just toss half-articulated
> demands and pleas over the wall and then expect
> help and mind-reading?

Actual code implementations using menu-item does not include
'.' before 'item-property-list'.

(menu-item item-name real-binding . item-property-list)

> Maybe try ChatGPT instead?

Maybe it would be someone's replicant here ! ;)
 
> > > And you can find the same thing outside of
> > > Emacs, in any number of Lisp introductions.
> > > 
> > > Help yourself.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [External] : menu-item uses no dot period before item-property-list in examples
  2023-07-17 15:43       ` uzibalqa
@ 2023-07-17 16:36         ` Drew Adams
  2023-07-17 16:56           ` uzibalqa
  0 siblings, 1 reply; 12+ messages in thread
From: Drew Adams @ 2023-07-17 16:36 UTC (permalink / raw)
  To: uzibalqa; +Cc: uzibalqa via Users list for the GNU Emacs text editor

[-- 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 --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [External] : menu-item uses no dot period before item-property-list in examples
  2023-07-17 16:36         ` Drew Adams
@ 2023-07-17 16:56           ` uzibalqa
  2023-07-17 17:25             ` uzibalqa
  0 siblings, 1 reply; 12+ messages in thread
From: uzibalqa @ 2023-07-17 16:56 UTC (permalink / raw)
  To: Drew Adams; +Cc: uzibalqa via Users list for the GNU Emacs text editor


------- Original Message -------
On Tuesday, July 18th, 2023 at 4:36 AM, Drew Adams <drew.adams@oracle.com> wrote:


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

Will check things out.
 
> 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–Kruger_effect

So now I am low-ability and the rest of you are high-ability.  Have you heard 
about "expert blindness" or "the curse of knowledge" ?  Individuals with high 
ability or expertise overlooking or underestimating certain problems, leading 
to negative outcomes or disasters.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [External] : menu-item uses no dot period before item-property-list in examples
  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
  0 siblings, 2 replies; 12+ messages in thread
From: uzibalqa @ 2023-07-17 17:25 UTC (permalink / raw)
  To: uzibalqa
  Cc: Drew Adams, uzibalqa via Users list for the GNU Emacs text editor


------- Original Message -------
On Tuesday, July 18th, 2023 at 4:56 AM, uzibalqa <uzibalqa@proton.me> wrote:


> ------- Original Message -------
> On Tuesday, July 18th, 2023 at 4:36 AM, Drew Adams drew.adams@oracle.com wrote:
> 
> 
> 
> > > > > 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.

Right, there is just a single list (menu-item.... with
elements in item-property-list appended to the list (menu-item....
 
> > 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.
> 
> 
> Will check things out.
> 
> > 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.

Have looked at the reference manual section

2.4.6.2 Dotted Pair Notation

I do view it as very comprehensive.  Perhaps it can be elaborated 
about the thing happening with  

(menu-item item-name real-binding . item-property-list)

Or do you think it is good enough for understanding the above
clause readily without expert experience?






^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [External] : menu-item uses no dot period before item-property-list in examples
  2023-07-17 17:25             ` uzibalqa
@ 2023-07-17 19:07               ` uzibalqa
  2023-07-17 19:26               ` Drew Adams
  1 sibling, 0 replies; 12+ messages in thread
From: uzibalqa @ 2023-07-17 19:07 UTC (permalink / raw)
  To: uzibalqa
  Cc: Drew Adams, uzibalqa via Users list for the GNU Emacs text editor


------- Original Message -------
On Tuesday, July 18th, 2023 at 5:25 AM, uzibalqa <uzibalqa@proton.me> wrote:


> ------- Original Message -------
> On Tuesday, July 18th, 2023 at 4:56 AM, uzibalqa uzibalqa@proton.me wrote:
> 
> 
> 
> > ------- Original Message -------
> > On Tuesday, July 18th, 2023 at 4:36 AM, Drew Adams drew.adams@oracle.com wrote:
> > 
> > > > > > 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.
> 
> 
> Right, there is just a single list (menu-item.... with
> elements in item-property-list appended to the list (menu-item....
> 
> > > 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.

The documentation would benefit form some real-life Lisp list
syntax.  Currently I find it short and far from real-life.

 
> > Will check things out.
> > 
> > > 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.
> 
> 
> Have looked at the reference manual section
> 
> 2.4.6.2 Dotted Pair Notation
> 
> I do view it as very comprehensive. Perhaps it can be elaborated
> about the thing happening with
> 
> (menu-item item-name real-binding . item-property-list)
> 
> Or do you think it is good enough for understanding the above
> clause readily without expert experience?
> 
>



^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [External] : menu-item uses no dot period before item-property-list in examples
  2023-07-17 17:25             ` uzibalqa
  2023-07-17 19:07               ` uzibalqa
@ 2023-07-17 19:26               ` Drew Adams
  1 sibling, 0 replies; 12+ messages in thread
From: Drew Adams @ 2023-07-17 19:26 UTC (permalink / raw)
  To: uzibalqa; +Cc: uzibalqa via Users list for the GNU Emacs text editor

> Have looked at the reference manual section
> 
> 2.4.6.2 Dotted Pair Notation
> 
> I do view it as very comprehensive.  Perhaps it can be elaborated
> about the thing happening with
> 
> (menu-item item-name real-binding . item-property-list)
> 
> Or do you think it is good enough for understanding
> the above clause readily without expert experience?

You might be a better judge of that, as it's still
new to you.  Enhancement suggestions are always
welcome (`M-x report-emacs-bug').  But please do be
specific - point out what you find confusing, or what
you'd propose as a specific change.

I do think that experience (expert or not) helps,
including experience/familiarity with Emacs's help
and doc.

But note that the Elisp manual isn't designed as a
tutorial.  Its foremost aim isn't teaching (learning);
it's reference, with some explanation.

A good place to start, for learning Elisp, is this
manual: "An Introduction to Programming in Emacs Lisp",
available within Emacs: `C-h i emacs l TAB'.

However, looking into it now I see that it apparently
doesn't cover dotted lists, dot notation, backquote,
etc.  The only occurrences of dot notation are in two
examples of an alist (with no explanation).

I'd say that its coverage of lists could benefit from
some introduction to dotted lists as such, and dot
notation.  But others might disagree.  (For one thing,
it would help users read the Elisp manual. ;-))

See also this page of Emacs Wiki:

https://www.emacswiki.org/emacs/LearnEmacsLisp

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-07-17 19:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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