all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Making new menu after Tools using keymap-set-after
@ 2023-07-18 16:04 uzibalqa
  2023-07-18 16:29 ` Eli Zaretskii
  0 siblings, 1 reply; 37+ messages in thread
From: uzibalqa @ 2023-07-18 16:04 UTC (permalink / raw)
  To: uzibalqa via Users list for the GNU Emacs text editor


The arguments for 'keymap-set-after' look the same to the ones for 'define-key-after'.

The documentation states that 'keymap-set-after' should be used instead of 'define-key-after'.
I am using 'keymap-set-after' for the purpose of making a new menu in the menubar after Tools.

The documentation for 'keymap-set-after' does not mention or imply that `keymap-set-after'
accepts the same key sequence format as `define-key-after'.  And indeed it does not.

How is 'keymap-set-after' supposed to be used to make a new menu after tools?





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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-18 16:04 Making new menu after Tools using keymap-set-after uzibalqa
@ 2023-07-18 16:29 ` Eli Zaretskii
  2023-07-18 16:56   ` uzibalqa
  0 siblings, 1 reply; 37+ messages in thread
From: Eli Zaretskii @ 2023-07-18 16:29 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 18 Jul 2023 16:04:45 +0000
> From: uzibalqa <uzibalqa@proton.me>
> 
> The documentation for 'keymap-set-after' does not mention or imply that `keymap-set-after'
> accepts the same key sequence format as `define-key-after'.  And indeed it does not.
> 
> How is 'keymap-set-after' supposed to be used to make a new menu after tools?

Similar to keymap-set, whose documentation of KEY is more detailed.



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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-18 16:29 ` Eli Zaretskii
@ 2023-07-18 16:56   ` uzibalqa
  2023-07-18 17:12     ` Eli Zaretskii
  0 siblings, 1 reply; 37+ messages in thread
From: uzibalqa @ 2023-07-18 16:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


------- Original Message -------
On Wednesday, July 19th, 2023 at 4:29 AM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Date: Tue, 18 Jul 2023 16:04:45 +0000
> > From: uzibalqa uzibalqa@proton.me
> > 
> > The documentation for 'keymap-set-after' does not mention or imply that `keymap-set-after' accepts the same key sequence format as` define-key-after'. And indeed it does not.
> > 
> > How is 'keymap-set-after' supposed to be used to make a new menu after tools?
> 
> 
> Similar to keymap-set, whose documentation of KEY is more detailed.

It is all very good, but how do I make a new menu after tools ?  
Documentation just states that key is just a string, but is this so ?



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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-18 16:56   ` uzibalqa
@ 2023-07-18 17:12     ` Eli Zaretskii
  2023-07-18 17:29       ` uzibalqa
  2023-07-18 20:49       ` uzibalqa
  0 siblings, 2 replies; 37+ messages in thread
From: Eli Zaretskii @ 2023-07-18 17:12 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 18 Jul 2023 16:56:05 +0000
> From: uzibalqa <uzibalqa@proton.me>
> Cc: help-gnu-emacs@gnu.org
> 
> > > How is 'keymap-set-after' supposed to be used to make a new menu after tools?
> > 
> > 
> > Similar to keymap-set, whose documentation of KEY is more detailed.
> 
> It is all very good, but how do I make a new menu after tools ?  
> Documentation just states that key is just a string, but is this so ?

No, it says it's a string that key-valid-p will accept, and you can
find further documentation in key-valid-p.



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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-18 17:12     ` Eli Zaretskii
@ 2023-07-18 17:29       ` uzibalqa
  2023-07-18 18:28         ` Eli Zaretskii
  2023-07-18 20:49       ` uzibalqa
  1 sibling, 1 reply; 37+ messages in thread
From: uzibalqa @ 2023-07-18 17:29 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


------- Original Message -------
On Wednesday, July 19th, 2023 at 5:12 AM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Date: Tue, 18 Jul 2023 16:56:05 +0000
> > From: uzibalqa uzibalqa@proton.me
> > Cc: help-gnu-emacs@gnu.org
> > 
> > > > How is 'keymap-set-after' supposed to be used to make a new menu after tools?
> > > 
> > > Similar to keymap-set, whose documentation of KEY is more detailed.
> > 
> > It is all very good, but how do I make a new menu after tools ?
> > Documentation just states that key is just a string, but is this so ?
> 
> 
> No, it says it's a string that key-valid-p will accept, and you can
> find further documentation in key-valid-p.

Are we going to continue like this forever ?  Now it is 'key-valid-p'.
You want people to change, yet making it extremely hard to follow.

The question is specific, how do I make a new menu after tools using 
'keymap-set-after'.  Should be two lines of code at most, am I right ?
 




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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-18 17:29       ` uzibalqa
@ 2023-07-18 18:28         ` Eli Zaretskii
  2023-07-18 18:45           ` uzibalqa
  0 siblings, 1 reply; 37+ messages in thread
From: Eli Zaretskii @ 2023-07-18 18:28 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 18 Jul 2023 17:29:05 +0000
> From: uzibalqa <uzibalqa@proton.me>
> Cc: help-gnu-emacs@gnu.org
> 
> > > It is all very good, but how do I make a new menu after tools ?
> > > Documentation just states that key is just a string, but is this so ?
> > 
> > 
> > No, it says it's a string that key-valid-p will accept, and you can
> > find further documentation in key-valid-p.
> 
> Are we going to continue like this forever ?  Now it is 'key-valid-p'.
> You want people to change, yet making it extremely hard to follow.

You keep asking questions, so I try to answer them.  If that is not
helpful, I can shut up.

> The question is specific, how do I make a new menu after tools using 
> 'keymap-set-after'.  Should be two lines of code at most, am I right ?

I don't know how many lines of code is that, because I don't know what
you want to do.  And please don't expect me to "help" you by writing
your code instead of yourself.



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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-18 18:28         ` Eli Zaretskii
@ 2023-07-18 18:45           ` uzibalqa
  2023-07-18 19:02             ` Eli Zaretskii
  2023-07-18 20:42             ` [External] : " Drew Adams
  0 siblings, 2 replies; 37+ messages in thread
From: uzibalqa @ 2023-07-18 18:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

------- Original Message -------
On Wednesday, July 19th, 2023 at 6:28 AM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Date: Tue, 18 Jul 2023 17:29:05 +0000
> > From: uzibalqa uzibalqa@proton.me
> > Cc: help-gnu-emacs@gnu.org
> > 
> > > > It is all very good, but how do I make a new menu after tools ?
> > > > Documentation just states that key is just a string, but is this so ?
> > > 
> > > No, it says it's a string that key-valid-p will accept, and you can
> > > find further documentation in key-valid-p.
> > 
> > Are we going to continue like this forever ? Now it is 'key-valid-p'.
> > You want people to change, yet making it extremely hard to follow.
> 
> 
> You keep asking questions, so I try to answer them. If that is not
> helpful, I can shut up.
> 
> > The question is specific, how do I make a new menu after tools using
> > 'keymap-set-after'. Should be two lines of code at most, am I right ?
> 
> 
> I don't know how many lines of code is that, because I don't know what
> you want to do. And please don't expect me to "help" you by writing
> your code instead of yourself.

I knew I was right about this.  You are not willing to write the code needed to 
make a new menu that I can use.  You want me to bugger off and figure it out.
That's just not on.

-------------

This is what I want people to do

The reference manual already has "23.17.4 Menu Example" on how to make a new
menu in menubar.

The example uses "define-key" but never discussed about "define-key-after".
The use of "define-key-after" should also be part of the example.  Starting
with a call to "define-key-after", followed by "define-key" for the menu items.
The making of submenus should also be included.

Now that "define-key-after" and "define-key" are to be considered legacy functions,
change the "Menu Example" to use the new recommended functions 'keymap-set-after' and
'keymap-set'.

Finally remove the example from the 'Reference Manual' and introduce it in the 
'Introduction to Programming in Emacs Lisp'.  Then add more details about "Cons Cells",
"Dotted Notation" and "Backquote Construct" as well.











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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-18 18:45           ` uzibalqa
@ 2023-07-18 19:02             ` Eli Zaretskii
  2023-07-18 19:26               ` uzibalqa
  2023-07-18 20:42             ` [External] : " Drew Adams
  1 sibling, 1 reply; 37+ messages in thread
From: Eli Zaretskii @ 2023-07-18 19:02 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 18 Jul 2023 18:45:15 +0000
> From: uzibalqa <uzibalqa@proton.me>
> Cc: help-gnu-emacs@gnu.org
> 
> > I don't know how many lines of code is that, because I don't know what
> > you want to do. And please don't expect me to "help" you by writing
> > your code instead of yourself.
> 
> I knew I was right about this.  You are not willing to write the code needed to 
> make a new menu that I can use.  You want me to bugger off and figure it out.

No, I want you to learn how to use the available documentation, and
also how to define a menu.  You will never learn if people write the
code for you.

If you want examples of how this is done, there are a lot of them in
the Emacs source tree.



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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-18 19:02             ` Eli Zaretskii
@ 2023-07-18 19:26               ` uzibalqa
  2023-07-19  2:25                 ` Eli Zaretskii
  0 siblings, 1 reply; 37+ messages in thread
From: uzibalqa @ 2023-07-18 19:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


------- Original Message -------
On Wednesday, July 19th, 2023 at 7:02 AM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Date: Tue, 18 Jul 2023 18:45:15 +0000
> > From: uzibalqa uzibalqa@proton.me
> > Cc: help-gnu-emacs@gnu.org
> > 
> > > I don't know how many lines of code is that, because I don't know what
> > > you want to do. And please don't expect me to "help" you by writing
> > > your code instead of yourself.
> > 
> > I knew I was right about this. You are not willing to write the code needed to
> > make a new menu that I can use. You want me to bugger off and figure it out.
> 
> 
> No, I want you to learn how to use the available documentation, and
> also how to define a menu. You will never learn if people write the
> code for you.

I can do all that with the legacy 'define-key-after' and 'define-key',
but not with the new ones.
 
> If you want examples of how this is done, there are a lot of them in
> the Emacs source tree.

Are they using the new 'keymap-set-after' and 'keymap-set' ?



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

* RE: [External] : Re: Making new menu after Tools using keymap-set-after
  2023-07-18 18:45           ` uzibalqa
  2023-07-18 19:02             ` Eli Zaretskii
@ 2023-07-18 20:42             ` Drew Adams
  2023-07-18 20:55               ` uzibalqa
  2023-07-19 11:58               ` Eli Zaretskii
  1 sibling, 2 replies; 37+ messages in thread
From: Drew Adams @ 2023-07-18 20:42 UTC (permalink / raw)
  To: uzibalqa, Eli Zaretskii; +Cc: help-gnu-emacs@gnu.org

Caveat: I'm not really following this thread in detail.

OP: I think (among other things perhaps) you are
looking for an example of using `keymap-set-after'.

If so, I see two examples where `keymap-set-after'
is presented, in (elisp) `Modifying Menus':
___

 Here is an example:

      (keymap-set-after my-menu "<drink>"
        '("Drink" . drink-command) 'eat)

 makes a binding for the fake function key <DRINK> and puts it right
 after the binding for <EAT>.

 Here is how to insert an item called ‘Work’ in the ‘Signals’ menu
 of Shell mode, after the item ‘break’:

      (keymap-set-after shell-mode-map "<menu-bar> <signals> <work>"
        '("Work" . work-command) 'break)
___

This node of the manual comes after nodes that
specify defining menus in general.
___

BTW, Eli, isn't `define-key' here a typo -
shouldn't it be `keymap-set':

 When you insert a new item in an existing menu,
 you probably want to put it in a particular
 place among the menu’s existing items.  If you use
 ‘define-key’ to add the item, it normally goes at
  ^^^^^^^^^^
 the front of the menu.  To put it elsewhere in the
 menu, use ‘keymap-set-after’:

I expect that the contrast to be made there is
between `keymap-set' and `keymap-set-after',
not between `define-key' and `keymap-set-after'.


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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-18 17:12     ` Eli Zaretskii
  2023-07-18 17:29       ` uzibalqa
@ 2023-07-18 20:49       ` uzibalqa
  2023-07-19 12:00         ` Eli Zaretskii
  1 sibling, 1 reply; 37+ messages in thread
From: uzibalqa @ 2023-07-18 20:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs






Sent with Proton Mail secure email.

------- Original Message -------
On Wednesday, July 19th, 2023 at 5:12 AM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Date: Tue, 18 Jul 2023 16:56:05 +0000
> > From: uzibalqa uzibalqa@proton.me
> > Cc: help-gnu-emacs@gnu.org
> > 
> > > > How is 'keymap-set-after' supposed to be used to make a new menu after tools?
> > > 
> > > Similar to keymap-set, whose documentation of KEY is more detailed.
> > 
> > It is all very good, but how do I make a new menu after tools ?
> > Documentation just states that key is just a string, but is this so ?
> 
> 
> No, it says it's a string that key-valid-p will accept, and you can
> find further documentation in key-valid-p.

key-valid-p states that a valid key is a string consisting of one or more key
strokes (name of an event) separated by single space characters, surrounded by
angle brackets.

Would that mean 

  (keymap-set-after global-map
    <menu-bar mcp-topm> (cons "MCP" mcp-kdf) 'tools)




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

* RE: [External] : Re: Making new menu after Tools using keymap-set-after
  2023-07-18 20:42             ` [External] : " Drew Adams
@ 2023-07-18 20:55               ` uzibalqa
  2023-07-18 21:40                 ` uzibalqa
  2023-07-19 11:58               ` Eli Zaretskii
  1 sibling, 1 reply; 37+ messages in thread
From: uzibalqa @ 2023-07-18 20:55 UTC (permalink / raw)
  To: Drew Adams; +Cc: Eli Zaretskii, help-gnu-emacs@gnu.org


------- Original Message -------
On Wednesday, July 19th, 2023 at 8:42 AM, Drew Adams <drew.adams@oracle.com> wrote:


> Caveat: I'm not really following this thread in detail.
> 
> OP: I think (among other things perhaps) you are
> looking for an example of using `keymap-set-after'. If so, I see two examples where` keymap-set-after'
> is presented, in (elisp) `Modifying Menus':
> ___
> 
> Here is an example:
> 
> (keymap-set-after my-menu "<drink>"
> 
> '("Drink" . drink-command) 'eat)
> 
> makes a binding for the fake function key <DRINK> and puts it right
> 
> after the binding for <EAT>.

The declaration is making things much more complicated because we were just
using a vector [menu-bar mcp-topm].  Now it is characters with angled brackets
such as "<menu-bar mcp-topm>" rather than conforming with previous define-key-after way.

More torture.

 
> 
> Here is how to insert an item called ‘Work’ in the ‘Signals’ menu
> of Shell mode, after the item ‘break’:
> 
> (keymap-set-after shell-mode-map "<menu-bar> <signals> <work>"
> 
> '("Work" . work-command) 'break)
> ___
> 
> This node of the manual comes after nodes that
> specify defining menus in general.
> ___
> 
> BTW, Eli, isn't `define-key' here a typo - shouldn't it be` keymap-set':
> 
> When you insert a new item in an existing menu,
> you probably want to put it in a particular
> place among the menu’s existing items. If you use
> ‘define-key’ to add the item, it normally goes at
> ^^^^^^^^^^
> the front of the menu. To put it elsewhere in the
> menu, use ‘keymap-set-after’:
> 
> I expect that the contrast to be made there is
> between `keymap-set' and` keymap-set-after',
> not between `define-key' and` keymap-set-after'.



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

* RE: [External] : Re: Making new menu after Tools using keymap-set-after
  2023-07-18 20:55               ` uzibalqa
@ 2023-07-18 21:40                 ` uzibalqa
  2023-07-19 12:11                   ` Eli Zaretskii
  0 siblings, 1 reply; 37+ messages in thread
From: uzibalqa @ 2023-07-18 21:40 UTC (permalink / raw)
  To: Drew Adams; +Cc: Eli Zaretskii, help-gnu-emacs@gnu.org


------- Original Message -------
On Wednesday, July 19th, 2023 at 8:55 AM, uzibalqa <uzibalqa@proton.me> wrote:


> ------- Original Message -------
> On Wednesday, July 19th, 2023 at 8:42 AM, Drew Adams drew.adams@oracle.com wrote:
> 
> 
> 
> > Caveat: I'm not really following this thread in detail.
> > 
> > OP: I think (among other things perhaps) you are
> > looking for an example of using `keymap-set-after'. If so, I see two examples where` keymap-set-after'
> > is presented, in (elisp) `Modifying Menus':
> > ___
> > 
> > Here is an example:
> > 
> > (keymap-set-after my-menu "<drink>"
> > 
> > '("Drink" . drink-command) 'eat)
> > 
> > makes a binding for the fake function key <DRINK> and puts it right
> > 
> > after the binding for <EAT>.
> 
> 
> The declaration is making things much more complicated because we were just
> using a vector [menu-bar mcp-topm]. Now it is characters with angled brackets
> such as "<menu-bar mcp-topm>" rather than conforming with previous define-key-after way.
> 
> 
> More torture.
> 
> > Here is how to insert an item called ‘Work’ in the ‘Signals’ menu
> > of Shell mode, after the item ‘break’:
> > 
> > (keymap-set-after shell-mode-map "<menu-bar> <signals> <work>"
> > 
> > '("Work" . work-command) 'break)
> > ___
> > 

This is what I call help.  Eli - Learn.

Consider

  (defvar mcp-kdf (make-sparse-keymap "MCP"))
  (keymap-set-after global-map
    "<menu-bar> <mcp-topm>" (cons "MCP" mcp-kdf) 'tools)

(error "tools is not a valid key definition; see 'key-valid-p')


> > This node of the manual comes after nodes that
> > specify defining menus in general.
> > ___

Quite right.  Everything upside down,yet we have Eli and other experienced programmers
iterating how everything is properly done.  t is the same as the people in the asylum
thinking they are some and the doctor insane.  It is a disease of the Emacs Mind.  
 
> > BTW, Eli, isn't `define-key' here a typo - shouldn't it be` keymap-set':
> > 
> > When you insert a new item in an existing menu,
> > you probably want to put it in a particular
> > place among the menu’s existing items. If you use
> > ‘define-key’ to add the item, it normally goes at
> > ^^^^^^^^^^
> > the front of the menu. To put it elsewhere in the
> > menu, use ‘keymap-set-after’:
> > 
> > I expect that the contrast to be made there is
> > between `keymap-set' and` keymap-set-after',
> > not between `define-key' and` keymap-set-after'.



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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-18 19:26               ` uzibalqa
@ 2023-07-19  2:25                 ` Eli Zaretskii
  2023-07-19  8:08                   ` uzibalqa
  0 siblings, 1 reply; 37+ messages in thread
From: Eli Zaretskii @ 2023-07-19  2:25 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 18 Jul 2023 19:26:01 +0000
> From: uzibalqa <uzibalqa@proton.me>
> Cc: help-gnu-emacs@gnu.org
> 
> > If you want examples of how this is done, there are a lot of them in
> > the Emacs source tree.
> 
> Are they using the new 'keymap-set-after' and 'keymap-set' ?

Many of them do.



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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-19  2:25                 ` Eli Zaretskii
@ 2023-07-19  8:08                   ` uzibalqa
  2023-07-19  9:10                     ` Robert Pluim
  0 siblings, 1 reply; 37+ messages in thread
From: uzibalqa @ 2023-07-19  8:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs






Sent with Proton Mail secure email.

------- Original Message -------
On Wednesday, July 19th, 2023 at 2:25 PM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Date: Tue, 18 Jul 2023 19:26:01 +0000
> > From: uzibalqa uzibalqa@proton.me
> > Cc: help-gnu-emacs@gnu.org
> > 
> > > If you want examples of how this is done, there are a lot of them in
> > > the Emacs source tree.
> > 
> > Are they using the new 'keymap-set-after' and 'keymap-set' ?
> 
> 
> Many of them do.  

I have seen that 

(defvar mcp-kdf (make-sparse-keymap "MCP"))
(keymap-set-after global-map
   "<menu-bar> <mcp-topm>" (cons "MCP" mcp-kdf) 'tools)

complains about 'tools




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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-19  8:08                   ` uzibalqa
@ 2023-07-19  9:10                     ` Robert Pluim
  2023-07-19 15:58                       ` uzibalqa
  0 siblings, 1 reply; 37+ messages in thread
From: Robert Pluim @ 2023-07-19  9:10 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> On Wed, 19 Jul 2023 08:08:32 +0000, uzibalqa <uzibalqa@proton.me> said:

    uzibalqa> (defvar mcp-kdf (make-sparse-keymap "MCP"))
    uzibalqa> (keymap-set-after global-map
    uzibalqa>    "<menu-bar> <mcp-topm>" (cons "MCP" mcp-kdf) 'tools)

    uzibalqa> complains about 'tools

Works for me in emacs-30, it gives me an 'MCP' menu just after
Tools. What error are you seeing?


Robert
-- 




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

* Re: [External] : Re: Making new menu after Tools using keymap-set-after
  2023-07-18 20:42             ` [External] : " Drew Adams
  2023-07-18 20:55               ` uzibalqa
@ 2023-07-19 11:58               ` Eli Zaretskii
  2023-07-19 14:18                 ` Drew Adams
  1 sibling, 1 reply; 37+ messages in thread
From: Eli Zaretskii @ 2023-07-19 11:58 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Drew Adams <drew.adams@oracle.com>
> CC: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
> Date: Tue, 18 Jul 2023 20:42:18 +0000
> 
>       (keymap-set-after my-menu "<drink>"
>         '("Drink" . drink-command) 'eat)
> 
>  makes a binding for the fake function key <DRINK> and puts it right
>  after the binding for <EAT>.
> 
>  Here is how to insert an item called ‘Work’ in the ‘Signals’ menu
>  of Shell mode, after the item ‘break’:
> 
>       (keymap-set-after shell-mode-map "<menu-bar> <signals> <work>"
>         '("Work" . work-command) 'break)
> ___
> 
> This node of the manual comes after nodes that
> specify defining menus in general.
> ___
> 
> BTW, Eli, isn't `define-key' here a typo -
> shouldn't it be `keymap-set':
> 
>  When you insert a new item in an existing menu,
>  you probably want to put it in a particular
>  place among the menu’s existing items.  If you use
>  ‘define-key’ to add the item, it normally goes at
>   ^^^^^^^^^^
>  the front of the menu.  To put it elsewhere in the
>  menu, use ‘keymap-set-after’:

Not a typo, because all the descriptions of making menu items in
previous sections use define-key.  If someone wants to rewrite those
sections to use keymap-set, patches will be welcome.



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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-18 20:49       ` uzibalqa
@ 2023-07-19 12:00         ` Eli Zaretskii
  0 siblings, 0 replies; 37+ messages in thread
From: Eli Zaretskii @ 2023-07-19 12:00 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 18 Jul 2023 20:49:17 +0000
> From: uzibalqa <uzibalqa@proton.me>
> Cc: help-gnu-emacs@gnu.org
> 
> key-valid-p states that a valid key is a string consisting of one or more key
> strokes (name of an event) separated by single space characters, surrounded by
> angle brackets.
> 
> Would that mean 
> 
>   (keymap-set-after global-map
>     <menu-bar mcp-topm> (cons "MCP" mcp-kdf) 'tools)
      ^^^^^^^^^^^^^^^^^^^
No, because that's not a string there.



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

* Re: [External] : Re: Making new menu after Tools using keymap-set-after
  2023-07-18 21:40                 ` uzibalqa
@ 2023-07-19 12:11                   ` Eli Zaretskii
  0 siblings, 0 replies; 37+ messages in thread
From: Eli Zaretskii @ 2023-07-19 12:11 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 18 Jul 2023 21:40:21 +0000
> From: uzibalqa <uzibalqa@proton.me>
> Cc: Eli Zaretskii <eliz@gnu.org>, "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
> 
> > > Here is how to insert an item called ‘Work’ in the ‘Signals’ menu
> > > of Shell mode, after the item ‘break’:
> > > 
> > > (keymap-set-after shell-mode-map "<menu-bar> <signals> <work>"
> > > 
> > > '("Work" . work-command) 'break)
> > > ___
> > > 
> 
> This is what I call help.  Eli - Learn.

Learn what? I pointed you to that node in the manual.

> Consider
> 
>   (defvar mcp-kdf (make-sparse-keymap "MCP"))
>   (keymap-set-after global-map
>     "<menu-bar> <mcp-topm>" (cons "MCP" mcp-kdf) 'tools)
> 
> (error "tools is not a valid key definition; see 'key-valid-p')

I don't get any errors when I evaluate the above.



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

* RE: [External] : Re: Making new menu after Tools using keymap-set-after
  2023-07-19 11:58               ` Eli Zaretskii
@ 2023-07-19 14:18                 ` Drew Adams
  0 siblings, 0 replies; 37+ messages in thread
From: Drew Adams @ 2023-07-19 14:18 UTC (permalink / raw)
  To: Eli Zaretskii, help-gnu-emacs@gnu.org

> > BTW, Eli, isn't `define-key' here a typo -
> > shouldn't it be `keymap-set':
> >
> >  When you insert a new item in an existing menu,
> >  you probably want to put it in a particular
> >  place among the menu’s existing items.  If you use
> >  ‘define-key’ to add the item, it normally goes at
> >   ^^^^^^^^^^
> >  the front of the menu.  To put it elsewhere in the
> >  menu, use ‘keymap-set-after’:
> 
> Not a typo, because all the descriptions of making menu items in
> previous sections use define-key.  If someone wants to rewrite those
> sections to use keymap-set, patches will be welcome.

Got it; thx.


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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-19  9:10                     ` Robert Pluim
@ 2023-07-19 15:58                       ` uzibalqa
  2023-07-19 16:33                         ` Eli Zaretskii
  0 siblings, 1 reply; 37+ messages in thread
From: uzibalqa @ 2023-07-19 15:58 UTC (permalink / raw)
  To: help-gnu-emacs






Sent with Proton Mail secure email.

------- Original Message -------
On Wednesday, July 19th, 2023 at 9:10 PM, Robert Pluim <rpluim@gmail.com> wrote:


> > > > > > On Wed, 19 Jul 2023 08:08:32 +0000, uzibalqa uzibalqa@proton.me said:
> 
> 
> uzibalqa> (defvar mcp-kdf (make-sparse-keymap "MCP"))
> 
> uzibalqa> (keymap-set-after global-map
> 
> uzibalqa> "<menu-bar> <mcp-topm>" (cons "MCP" mcp-kdf) 'tools)
> 
> 
> uzibalqa> complains about 'tools
> 
> 
> Works for me in emacs-30, it gives me an 'MCP' menu just after
> Tools. What error are you seeing?
> 
> 
> Robert
> --

With GNU Emacs 29.0.50, I get 

Debugger entered--Lisp error: (error "tools is not a valid key definition; see ‘key-valid-p’")
  signal(error ("tools is not a valid key definition; see ‘key-valid-p’"))
  error("%S is not a valid key definition; see `key-valid-p'" tools)
  keymap--check(tools)
  keymap-set-after((keymap #^[nil nil keymap 
#^^[3 0 set-mark-command move-beginning-of-line backward-char mode-specific-command-prefix delete-char move-end-of-line forward-char keyboard-quit help-command indent-for-tab-command electric-newline-and-maybe-indent kill-line recenter-top-bottom newline next-line open-line previous-line quoted-insert isearch-backward isearch-forward transpose-chars universal-argument scroll-up-command kill-region Control-X-prefix yank suspend-frame ESC-prefix toggle-input-method abort-recursive-edit nil undo self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command ...] #^^[1 0 #^^[2 0 
#^^[3 0 set-mark-command move-beginning-of-line backward-char mode-specific-command-prefix delete-char move-end-of-line forward-char keyboard-quit help-command indent-for-tab-command electric-newline-and-maybe-indent kill-line recenter-top-bottom newline next-line open-line previous-line quoted-insert isearch-backward isearch-forward transpose-chars universal-argument scroll-up-command kill-region Control-X-prefix yank suspend-frame ESC-prefix toggle-input-method abort-recursive-edit nil undo self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command ...] self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command] self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command] self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command self-insert-command ...] (67108908 . text-scale-decrease) (67108910 . text-scale-increase) (f5 . modus-themes-toggle) (paste . clipboard-yank) (copy . clipboard-kill-ring-save) (cut . clipboard-kill-region) (f18 . clipboard-yank) (f16 . clipboard-kill-ring-save) (f20 . clipboard-kill-region) (C-wheel-down . mouse-wheel-text-scale) (C-wheel-up . mouse-wheel-text-scale) (C-mouse-5 . mouse-wheel-text-scale) (C-mouse-4 . mouse-wheel-text-scale) (C-M-wheel-down . mouse-wheel-global-text-scale) (C-M-wheel-up . mouse-wheel-global-text-scale) (C-M-mouse-5 . mouse-wheel-global-text-scale) (C-M-mouse-4 . mouse-wheel-global-text-scale) (M-wheel-right . mwheel-scroll) (M-wheel-left . mwheel-scroll) (M-wheel-down . mwheel-scroll) (M-wheel-up . mwheel-scroll) (M-mouse-7 . mwheel-scroll) (M-mouse-6 . mwheel-scroll) (M-mouse-5 . mwheel-scroll) (M-mouse-4 . mwheel-scroll) (S-wheel-right . mwheel-scroll) (S-wheel-left . mwheel-scroll) (S-wheel-down . mwheel-scroll) (S-wheel-up . mwheel-scroll) (S-mouse-7 . mwheel-scroll) (S-mouse-6 . mwheel-scroll) (S-mouse-5 . mwheel-scroll) (S-mouse-4 . mwheel-scroll) (wheel-right . mwheel-scroll) (wheel-left . mwheel-scroll) (wheel-down . mwheel-scroll) ...) "<menu-bar> <mcp-topm>" ("MCP" keymap "MCP") tools)
  mcp-menubar()




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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-19 15:58                       ` uzibalqa
@ 2023-07-19 16:33                         ` Eli Zaretskii
  2023-07-19 16:37                           ` uzibalqa
                                             ` (2 more replies)
  0 siblings, 3 replies; 37+ messages in thread
From: Eli Zaretskii @ 2023-07-19 16:33 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 19 Jul 2023 15:58:10 +0000
> From: uzibalqa <uzibalqa@proton.me>
> 
> On Wednesday, July 19th, 2023 at 9:10 PM, Robert Pluim <rpluim@gmail.com> wrote:
> 
> 
> > > > > > > On Wed, 19 Jul 2023 08:08:32 +0000, uzibalqa uzibalqa@proton.me said:
> > 
> > 
> > uzibalqa> (defvar mcp-kdf (make-sparse-keymap "MCP"))
> > 
> > uzibalqa> (keymap-set-after global-map
> > 
> > uzibalqa> "<menu-bar> <mcp-topm>" (cons "MCP" mcp-kdf) 'tools)
> > 
> > 
> > uzibalqa> complains about 'tools
> > 
> > 
> > Works for me in emacs-30, it gives me an 'MCP' menu just after
> > Tools. What error are you seeing?
> > 
> > 
> > Robert
> > --
> 
> With GNU Emacs 29.0.50, I get 
> 
> Debugger entered--Lisp error: (error "tools is not a valid key definition; see ‘key-valid-p’")

If this is in "emacs -Q", you probably have a broken snapshot of Emacs
29, the above works with the current emacs-29 branch.  If "emacs -Q"
does work, then maybe some of your customizations cause the problem.



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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-19 16:33                         ` Eli Zaretskii
@ 2023-07-19 16:37                           ` uzibalqa
  2023-07-19 16:44                           ` Robert Pluim
  2023-07-19 21:00                           ` uzibalqa
  2 siblings, 0 replies; 37+ messages in thread
From: uzibalqa @ 2023-07-19 16:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


------- Original Message -------
On Thursday, July 20th, 2023 at 4:33 AM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Date: Wed, 19 Jul 2023 15:58:10 +0000
> > From: uzibalqa uzibalqa@proton.me
> > 
> > On Wednesday, July 19th, 2023 at 9:10 PM, Robert Pluim rpluim@gmail.com wrote:
> > 
> > > > > > > > On Wed, 19 Jul 2023 08:08:32 +0000, uzibalqa uzibalqa@proton.me said:
> > > 
> > > uzibalqa> (defvar mcp-kdf (make-sparse-keymap "MCP"))
> > > 
> > > uzibalqa> (keymap-set-after global-map
> > > 
> > > uzibalqa> "<menu-bar> <mcp-topm>" (cons "MCP" mcp-kdf) 'tools)
> > > 
> > > uzibalqa> complains about 'tools
> > > 
> > > Works for me in emacs-30, it gives me an 'MCP' menu just after
> > > Tools. What error are you seeing?
> > > 
> > > Robert
> > > --
> > 
> > With GNU Emacs 29.0.50, I get
> > 
> > Debugger entered--Lisp error: (error "tools is not a valid key definition; see ‘key-valid-p’")
> 
> 
> If this is in "emacs -Q", you probably have a broken snapshot of Emacs
> 29, the above works with the current emacs-29 branch. If "emacs -Q"
> does work, then maybe some of your customizations cause the problem.

Problem persists with "emacs -Q".



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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-19 16:33                         ` Eli Zaretskii
  2023-07-19 16:37                           ` uzibalqa
@ 2023-07-19 16:44                           ` Robert Pluim
  2023-07-19 16:54                             ` uzibalqa
  2023-07-19 21:00                           ` uzibalqa
  2 siblings, 1 reply; 37+ messages in thread
From: Robert Pluim @ 2023-07-19 16:44 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: Eli Zaretskii

>>>>> On Wed, 19 Jul 2023 19:33:31 +0300, Eli Zaretskii <eliz@gnu.org> said:

    Eli> If this is in "emacs -Q", you probably have a broken snapshot of Emacs
    Eli> 29, the above works with the current emacs-29 branch.  If "emacs -Q"
    Eli> does work, then maybe some of your customizations cause the problem.

Hmm, this sounds like the `keymap-set-after' bug I fixed back in
January. When is your snapshot from?

Robert
-- 



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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-19 16:44                           ` Robert Pluim
@ 2023-07-19 16:54                             ` uzibalqa
  2023-07-19 17:07                               ` Robert Pluim
  2023-07-19 17:28                               ` [External] : " Drew Adams
  0 siblings, 2 replies; 37+ messages in thread
From: uzibalqa @ 2023-07-19 16:54 UTC (permalink / raw)
  To: Robert Pluim; +Cc: help-gnu-emacs, Eli Zaretskii


------- Original Message -------
On Thursday, July 20th, 2023 at 4:44 AM, Robert Pluim <rpluim@gmail.com> wrote:


> > > > > > On Wed, 19 Jul 2023 19:33:31 +0300, Eli Zaretskii eliz@gnu.org said:
> 
> 
> Eli> If this is in "emacs -Q", you probably have a broken snapshot of Emacs
> 
> Eli> 29, the above works with the current emacs-29 branch. If "emacs -Q"
> 
> Eli> does work, then maybe some of your customizations cause the problem.
> 
> 
> Hmm, this sounds like the `keymap-set-after' bug I fixed back in
> January. When is your snapshot from?
> 
> Robert
> --

GNU Emacs 29.0.50

Why is it so difficult to know the snapshot version after doing
a clone or a checkout on master.  Rather than just emacs, can the 
directory produced include the version (e.g. emacs-29.0.50).






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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-19 16:54                             ` uzibalqa
@ 2023-07-19 17:07                               ` Robert Pluim
  2023-07-19 17:11                                 ` uzibalqa
  2023-07-19 17:28                               ` [External] : " Drew Adams
  1 sibling, 1 reply; 37+ messages in thread
From: Robert Pluim @ 2023-07-19 17:07 UTC (permalink / raw)
  To: uzibalqa; +Cc: help-gnu-emacs, Eli Zaretskii

>>>>> On Wed, 19 Jul 2023 16:54:53 +0000, uzibalqa <uzibalqa@proton.me> said:

    uzibalqa> ------- Original Message -------
    uzibalqa> On Thursday, July 20th, 2023 at 4:44 AM, Robert Pluim <rpluim@gmail.com> wrote:


    >> > > > > > On Wed, 19 Jul 2023 19:33:31 +0300, Eli Zaretskii eliz@gnu.org said:
    >> 
    >> 
    Eli> If this is in "emacs -Q", you probably have a broken snapshot of Emacs
    >> 
    Eli> 29, the above works with the current emacs-29 branch. If "emacs -Q"
    >> 
    Eli> does work, then maybe some of your customizations cause the problem.
    >> 
    >> 
    >> Hmm, this sounds like the `keymap-set-after' bug I fixed back in
    >> January. When is your snapshot from?
    >> 
    >> Robert
    >> --

    uzibalqa> GNU Emacs 29.0.50

Thatʼs the version. I mean 'when did you last do git pull' (and
perhaps you need a 'make bootstrap' to ensure everything has been
rebuilt).

    uzibalqa> Why is it so difficult to know the snapshot version after doing
    uzibalqa> a clone or a checkout on master.  Rather than just emacs, can the 
    uzibalqa> directory produced include the version (e.g. emacs-29.0.50).

'git show' will tell you where you are in the history. And if youʼre
on master, the version would not show up as 29.0.50 (unless you
updated and didnʼt do a full rebuild).

Robert
-- 



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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-19 17:07                               ` Robert Pluim
@ 2023-07-19 17:11                                 ` uzibalqa
  2023-07-19 17:25                                   ` Platon Pronko
  0 siblings, 1 reply; 37+ messages in thread
From: uzibalqa @ 2023-07-19 17:11 UTC (permalink / raw)
  To: Robert Pluim; +Cc: help-gnu-emacs, Eli Zaretskii






Sent with Proton Mail secure email.

------- Original Message -------
On Thursday, July 20th, 2023 at 5:07 AM, Robert Pluim <rpluim@gmail.com> wrote:


> > > > > > On Wed, 19 Jul 2023 16:54:53 +0000, uzibalqa uzibalqa@proton.me said:
> 
> 
> uzibalqa> ------- Original Message -------
> 
> uzibalqa> On Thursday, July 20th, 2023 at 4:44 AM, Robert Pluim rpluim@gmail.com wrote:
> 
> 
> 
> >> > > > > > On Wed, 19 Jul 2023 19:33:31 +0300, Eli Zaretskii eliz@gnu.org said:
> 
> >>
> 
> >>
> 
> Eli> If this is in "emacs -Q", you probably have a broken snapshot of Emacs
> 
> >>
> 
> Eli> 29, the above works with the current emacs-29 branch. If "emacs -Q"
> 
> >>
> 
> Eli> does work, then maybe some of your customizations cause the problem.
> 
> >>
> 
> >>
> 
> >> Hmm, this sounds like the `keymap-set-after' bug I fixed back in
> 
> >> January. When is your snapshot from?
> 
> >>
> 
> >> Robert
> 
> >> --
> 
> 
> uzibalqa> GNU Emacs 29.0.50
> 
> 
> Thatʼs the version. I mean 'when did you last do git pull' (and
> perhaps you need a 'make bootstrap' to ensure everything has been
> rebuilt).
> 
> uzibalqa> Why is it so difficult to know the snapshot version after doing
> 
> uzibalqa> a clone or a checkout on master. Rather than just emacs, can the
> 
> uzibalqa> directory produced include the version (e.g. emacs-29.0.50).
> 
> 
> 'git show' will tell you where you are in the history. And if youʼre
> on master, the version would not show up as 29.0.50 (unless you
> updated and didnʼt do a full rebuild).
> 
> Robert
> --

If one does

git clone -b master git://git.sv.gnu.org/emacs.git

they would have no clue.





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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-19 17:11                                 ` uzibalqa
@ 2023-07-19 17:25                                   ` Platon Pronko
  2023-07-19 17:34                                     ` uzibalqa
  0 siblings, 1 reply; 37+ messages in thread
From: Platon Pronko @ 2023-07-19 17:25 UTC (permalink / raw)
  To: help-gnu-emacs, uzibalqa

On 2023-07-19 21:11, uzibalqa wrote:
> If one does
> 
> git clone -b master git://git.sv.gnu.org/emacs.git
> 
> they would have no clue.

Surely you can get a commit hash from your clone? `git log -1` or `git show` should both work. And said commit hash would quite specifically point to the exact version of the code you are using.

-- 
Best regards,
Platon Pronko
PGP 2A62D77A7A2CB94E




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

* RE: [External] : Re: Making new menu after Tools using keymap-set-after
  2023-07-19 16:54                             ` uzibalqa
  2023-07-19 17:07                               ` Robert Pluim
@ 2023-07-19 17:28                               ` Drew Adams
  2023-07-19 17:37                                 ` uzibalqa
  1 sibling, 1 reply; 37+ messages in thread
From: Drew Adams @ 2023-07-19 17:28 UTC (permalink / raw)
  To: uzibalqa, Robert Pluim; +Cc: help-gnu-emacs@gnu.org, Eli Zaretskii

> GNU Emacs 29.0.50
> 
> Why is it so difficult to know the snapshot version after doing
> a clone or a checkout on master.  Rather than just emacs, can the
> directory produced include the version (e.g. emacs-29.0.50).

Why does a new Elisp learner prefer to use
an unreleased pretest version of Emacs?

Seems like asking for additional trouble,
with not so much ability to tell whether
something is a new-feature bug or part of
what Emacs has long done (tried and true,
tested and well-used).

Like learning to drive in a test version
of a new car.  Maybe exciting, but maybe
not so great for learning what's what -
can't tell what's intended from what just
happens to be part of a not-fully-baked
current implementation.

Why not learn Emacs using the latest
release, Emacs 28.2?

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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-19 17:25                                   ` Platon Pronko
@ 2023-07-19 17:34                                     ` uzibalqa
  2023-07-20  3:17                                       ` Platon Pronko
  0 siblings, 1 reply; 37+ messages in thread
From: uzibalqa @ 2023-07-19 17:34 UTC (permalink / raw)
  To: Platon Pronko; +Cc: help-gnu-emacs






Sent with Proton Mail secure email.

------- Original Message -------
On Thursday, July 20th, 2023 at 5:25 AM, Platon Pronko <platon7pronko@gmail.com> wrote:


> On 2023-07-19 21:11, uzibalqa wrote:
> 
> > If one does
> > 
> > git clone -b master git://git.sv.gnu.org/emacs.git
> > 
> > they would have no clue.
> 
> 
> Surely you can get a commit hash from your clone? `git log -1` or `git show` should both work. And said commit hash would quite specifically point to the exact version of the code you are using.
> 
> --
> Best regards,
> Platon Pronko
> PGP 2A62D77A7A2CB94E

Is the following what you are talking about ?


Author: F. Jason Park <jp@neverwas.me>
Date:   Tue Jul 18 22:18:00 2023 -0700

    Warn when toggling erc-nicks-mode in target buffers
    
    * lisp/erc/erc-nicks.el (erc-nicks-mode, erc-nicks-enable): This local
    module isn't autoloaded like most global modules, in part to dissuade
    users from attempting to enable it by running M-x erc-nicks-mode RET.
    However, rather than signal an error upon detecting such an attempt,
    ERC should explain that the only supported means of activation is via
    `erc-modules'.  This change does that and then enables it anyway,
    despite the degraded experience.





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

* RE: [External] : Re: Making new menu after Tools using keymap-set-after
  2023-07-19 17:28                               ` [External] : " Drew Adams
@ 2023-07-19 17:37                                 ` uzibalqa
  2023-07-19 19:00                                   ` Drew Adams
  0 siblings, 1 reply; 37+ messages in thread
From: uzibalqa @ 2023-07-19 17:37 UTC (permalink / raw)
  To: Drew Adams; +Cc: Robert Pluim, help-gnu-emacs@gnu.org, Eli Zaretskii


------- Original Message -------
On Thursday, July 20th, 2023 at 5:28 AM, Drew Adams <drew.adams@oracle.com> wrote:


> > GNU Emacs 29.0.50
> > 
> > Why is it so difficult to know the snapshot version after doing
> > a clone or a checkout on master. Rather than just emacs, can the
> > directory produced include the version (e.g. emacs-29.0.50).
> 
> 
> Why does a new Elisp learner prefer to use
> an unreleased pretest version of Emacs?

To test that the menu with the new keymap-set-after I am using works. 
 
> Seems like asking for additional trouble,
> with not so much ability to tell whether
> something is a new-feature bug or part of
> what Emacs has long done (tried and true,
> tested and well-used).
> 
> Like learning to drive in a test version
> of a new car. Maybe exciting, but maybe
> not so great for learning what's what -
> can't tell what's intended from what just
> happens to be part of a not-fully-baked
> current implementation.

It is not so much fun, I admit.
 
> Why not learn Emacs using the latest
> release, Emacs 28.2?



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

* RE: [External] : Re: Making new menu after Tools using keymap-set-after
  2023-07-19 17:37                                 ` uzibalqa
@ 2023-07-19 19:00                                   ` Drew Adams
  2023-07-19 19:08                                     ` uzibalqa
  0 siblings, 1 reply; 37+ messages in thread
From: Drew Adams @ 2023-07-19 19:00 UTC (permalink / raw)
  To: uzibalqa; +Cc: Robert Pluim, help-gnu-emacs@gnu.org, Eli Zaretskii

> > > GNU Emacs 29.0.50
> > > Why is it so difficult to know the snapshot version after doing
> > > a clone or a checkout on master. Rather than just emacs, can the
> > > directory produced include the version (e.g. emacs-29.0.50).
> >
> > Why does a new Elisp learner prefer to use
> > an unreleased pretest version of Emacs?
> 
> To test that the menu with the new keymap-set-after I am using works.

Do you really need to use `keymap-set(-after)'
before it exists in an Emacs release?


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

* RE: [External] : Re: Making new menu after Tools using keymap-set-after
  2023-07-19 19:00                                   ` Drew Adams
@ 2023-07-19 19:08                                     ` uzibalqa
  2023-07-20  3:32                                       ` Platon Pronko
  0 siblings, 1 reply; 37+ messages in thread
From: uzibalqa @ 2023-07-19 19:08 UTC (permalink / raw)
  To: Drew Adams; +Cc: Robert Pluim, help-gnu-emacs@gnu.org, Eli Zaretskii


------- Original Message -------
On Thursday, July 20th, 2023 at 7:00 AM, Drew Adams <drew.adams@oracle.com> wrote:


> > > > GNU Emacs 29.0.50
> > > > Why is it so difficult to know the snapshot version after doing
> > > > a clone or a checkout on master. Rather than just emacs, can the
> > > > directory produced include the version (e.g. emacs-29.0.50).
> > > 
> > > Why does a new Elisp learner prefer to use
> > > an unreleased pretest version of Emacs?
> > 
> > To test that the menu with the new keymap-set-after I am using works.
> 
> 
> Do you really need to use `keymap-set(-after)'
> before it exists in an Emacs release?

I always strive to get ahead as much as I can.  Might be new but always aware
of the latest development.



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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-19 16:33                         ` Eli Zaretskii
  2023-07-19 16:37                           ` uzibalqa
  2023-07-19 16:44                           ` Robert Pluim
@ 2023-07-19 21:00                           ` uzibalqa
  2 siblings, 0 replies; 37+ messages in thread
From: uzibalqa @ 2023-07-19 21:00 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


------- Original Message -------
On Thursday, July 20th, 2023 at 4:33 AM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Date: Wed, 19 Jul 2023 15:58:10 +0000
> > From: uzibalqa uzibalqa@proton.me
> > 
> > On Wednesday, July 19th, 2023 at 9:10 PM, Robert Pluim rpluim@gmail.com wrote:
> > 
> > > > > > > > On Wed, 19 Jul 2023 08:08:32 +0000, uzibalqa uzibalqa@proton.me said:
> > > 
> > > uzibalqa> (defvar mcp-kdf (make-sparse-keymap "MCP"))
> > > 
> > > uzibalqa> (keymap-set-after global-map
> > > 
> > > uzibalqa> "<menu-bar> <mcp-topm>" (cons "MCP" mcp-kdf) 'tools)
> > > 
> > > uzibalqa> complains about 'tools
> > > 
> > > Works for me in emacs-30, it gives me an 'MCP' menu just after
> > > Tools. What error are you seeing?
> > > 
> > > Robert
> > > --
> > 
> > With GNU Emacs 29.0.50, I get
> > 
> > Debugger entered--Lisp error: (error "tools is not a valid key definition; see ‘key-valid-p’")
> 
> 
> If this is in "emacs -Q", you probably have a broken snapshot of Emacs
> 29, the above works with the current emacs-29 branch. If "emacs -Q"
> does work, then maybe some of your customizations cause the problem.

Got the function to work by installing emacs-30.0.50.1




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

* Re: Making new menu after Tools using keymap-set-after
  2023-07-19 17:34                                     ` uzibalqa
@ 2023-07-20  3:17                                       ` Platon Pronko
  0 siblings, 0 replies; 37+ messages in thread
From: Platon Pronko @ 2023-07-20  3:17 UTC (permalink / raw)
  To: uzibalqa; +Cc: help-gnu-emacs

On 2023-07-19 21:34, uzibalqa wrote:
> Is the following what you are talking about ?
> 
> 
> Author: F. Jason Park <jp@neverwas.me>
> Date:   Tue Jul 18 22:18:00 2023 -0700
> 
>      Warn when toggling erc-nicks-mode in target buffers
>      
>      * lisp/erc/erc-nicks.el (erc-nicks-mode, erc-nicks-enable): This local
>      module isn't autoloaded like most global modules, in part to dissuade
>      users from attempting to enable it by running M-x erc-nicks-mode RET.
>      However, rather than signal an error upon detecting such an attempt,
>      ERC should explain that the only supported means of activation is via
>      `erc-modules'.  This change does that and then enables it anyway,
>      despite the degraded experience.

Almost. There's supposed to be a line "commit abcdef" exactly one line above the "Author:" line.

-- 
Best regards,
Platon Pronko
PGP 2A62D77A7A2CB94E




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

* Re: [External] : Re: Making new menu after Tools using keymap-set-after
  2023-07-19 19:08                                     ` uzibalqa
@ 2023-07-20  3:32                                       ` Platon Pronko
  2023-07-20  8:43                                         ` uzibalqa
  0 siblings, 1 reply; 37+ messages in thread
From: Platon Pronko @ 2023-07-20  3:32 UTC (permalink / raw)
  To: uzibalqa; +Cc: help-gnu-emacs@gnu.org

On 2023-07-19 23:08, uzibalqa wrote:
> 
> ------- Original Message -------
> On Thursday, July 20th, 2023 at 7:00 AM, Drew Adams <drew.adams@oracle.com> wrote:
> 
> 
>>>>> GNU Emacs 29.0.50
>>>>> Why is it so difficult to know the snapshot version after doing
>>>>> a clone or a checkout on master. Rather than just emacs, can the
>>>>> directory produced include the version (e.g. emacs-29.0.50).
>>>>
>>>> Why does a new Elisp learner prefer to use
>>>> an unreleased pretest version of Emacs?
>>>
>>> To test that the menu with the new keymap-set-after I am using works.
>>
>>
>> Do you really need to use `keymap-set(-after)'
>> before it exists in an Emacs release?
> 
> I always strive to get ahead as much as I can.  Might be new but always aware
> of the latest development.

The adage "one must learn to walk before they can run" seems particularly fitting in your case. It's clear you're experiencing some challenges in areas such as reading and understanding basic documentation, comprehending syntax, interpreting the source code, or determining the specific git commit you're using.

As you're in the learning stages, it might not be advisable to use pre-release versions of software or aim to customize every possible feature. The reason for this caution is that these advanced steps can introduce additional complexities, making the learning curve steeper. Moreover, you may find limited help online pertaining to these versions and customized settings.

Your enthusiasm to stay ahead and be up-to-date is commendable. However, it's crucial to build a strong foundational understanding first. Trying to race ahead without a robust understanding may not always expedite your learning journey, but rather could potentially impede it. It might be better slowing down a bit, mastering the basics and gradually progressing towards more complex aspects.

-- 
Best regards,
Platon Pronko
PGP 2A62D77A7A2CB94E




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

* Re: [External] : Re: Making new menu after Tools using keymap-set-after
  2023-07-20  3:32                                       ` Platon Pronko
@ 2023-07-20  8:43                                         ` uzibalqa
  0 siblings, 0 replies; 37+ messages in thread
From: uzibalqa @ 2023-07-20  8:43 UTC (permalink / raw)
  To: Platon Pronko; +Cc: help-gnu-emacs@gnu.org


------- Original Message -------
On Thursday, July 20th, 2023 at 3:32 PM, Platon Pronko <platon7pronko@gmail.com> wrote:


> On 2023-07-19 23:08, uzibalqa wrote:
> 
> > ------- Original Message -------
> > On Thursday, July 20th, 2023 at 7:00 AM, Drew Adams drew.adams@oracle.com wrote:
> > 
> > > > > > GNU Emacs 29.0.50
> > > > > > Why is it so difficult to know the snapshot version after doing
> > > > > > a clone or a checkout on master. Rather than just emacs, can the
> > > > > > directory produced include the version (e.g. emacs-29.0.50).
> > > > > 
> > > > > Why does a new Elisp learner prefer to use
> > > > > an unreleased pretest version of Emacs?
> > > > 
> > > > To test that the menu with the new keymap-set-after I am using works.
> > > 
> > > Do you really need to use `keymap-set(-after)'
> > > before it exists in an Emacs release?
> > 
> > I always strive to get ahead as much as I can. Might be new but always aware
> > of the latest development.
> 
> 
> The adage "one must learn to walk before they can run" seems particularly fitting in your case. It's clear you're experiencing some challenges in areas such as reading and understanding basic documentation, comprehending syntax, interpreting the source code, or determining the specific git commit you're using.
> 
> As you're in the learning stages, it might not be advisable to use pre-release versions of software or aim to customize every possible feature. The reason for this caution is that these advanced steps can introduce additional complexities, making the learning curve steeper. Moreover, you may find limited help online pertaining to these versions and customized settings.
> 
> Your enthusiasm to stay ahead and be up-to-date is commendable. However, it's crucial to build a strong foundational understanding first. Trying to race ahead without a robust understanding may not always expedite your learning journey, but rather could potentially impede it. It might be better slowing down a bit, mastering the basics and gradually progressing towards more complex aspects.
> 
> --
> Best regards,
> Platon Pronko
> PGP 2A62D77A7A2CB94E


I am a sailor in a storm.  Constantly terrified.  :)



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

end of thread, other threads:[~2023-07-20  8:43 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-18 16:04 Making new menu after Tools using keymap-set-after uzibalqa
2023-07-18 16:29 ` Eli Zaretskii
2023-07-18 16:56   ` uzibalqa
2023-07-18 17:12     ` Eli Zaretskii
2023-07-18 17:29       ` uzibalqa
2023-07-18 18:28         ` Eli Zaretskii
2023-07-18 18:45           ` uzibalqa
2023-07-18 19:02             ` Eli Zaretskii
2023-07-18 19:26               ` uzibalqa
2023-07-19  2:25                 ` Eli Zaretskii
2023-07-19  8:08                   ` uzibalqa
2023-07-19  9:10                     ` Robert Pluim
2023-07-19 15:58                       ` uzibalqa
2023-07-19 16:33                         ` Eli Zaretskii
2023-07-19 16:37                           ` uzibalqa
2023-07-19 16:44                           ` Robert Pluim
2023-07-19 16:54                             ` uzibalqa
2023-07-19 17:07                               ` Robert Pluim
2023-07-19 17:11                                 ` uzibalqa
2023-07-19 17:25                                   ` Platon Pronko
2023-07-19 17:34                                     ` uzibalqa
2023-07-20  3:17                                       ` Platon Pronko
2023-07-19 17:28                               ` [External] : " Drew Adams
2023-07-19 17:37                                 ` uzibalqa
2023-07-19 19:00                                   ` Drew Adams
2023-07-19 19:08                                     ` uzibalqa
2023-07-20  3:32                                       ` Platon Pronko
2023-07-20  8:43                                         ` uzibalqa
2023-07-19 21:00                           ` uzibalqa
2023-07-18 20:42             ` [External] : " Drew Adams
2023-07-18 20:55               ` uzibalqa
2023-07-18 21:40                 ` uzibalqa
2023-07-19 12:11                   ` Eli Zaretskii
2023-07-19 11:58               ` Eli Zaretskii
2023-07-19 14:18                 ` Drew Adams
2023-07-18 20:49       ` uzibalqa
2023-07-19 12:00         ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.