From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Re: Submenu with easy-menu-define yielding invalid menu item Date: Wed, 19 Oct 2022 21:04:29 +0000 Message-ID: References: <_ytzge6iJltpO08F1t4VuFUDoOTpUEKPiVV7ttHQW_7cHqNbyfswnrfy_1Gs2JkBX4ASzDUFGi848AY1CDj214we8QdCddXBLhmPBYDu4Aw=@protonmail.com> <87mt9syqsy.fsf@skimble09.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20774"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Heime via Users list for the GNU Emacs text editor To: Sharon Kimble Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 19 23:07:35 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1olGHn-0005Ad-Di for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 19 Oct 2022 23:07:35 +0200 Original-Received: from localhost ([::1]:40036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olGHl-0006Jr-48 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 19 Oct 2022 17:07:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olGF1-0006In-UT for help-gnu-emacs@gnu.org; Wed, 19 Oct 2022 17:04:43 -0400 Original-Received: from mail-40141.protonmail.ch ([185.70.40.141]:59181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olGEy-0000c4-QX for help-gnu-emacs@gnu.org; Wed, 19 Oct 2022 17:04:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1666213478; x=1666472678; bh=sN5RixsidGGszPHLypVm1GL4j1ozFvd9ZIQ/MSzuJss=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=wD5EGyHZQxd4hUBlDTBa46hpZ5ku2s7HOEfyLzCr+c2XP7Due7spGyFhKIW7DWfDp UuvK/WviodgjKk5NXrgyYLLFqFWxK8lLUgCCI846WYQbVjB1jnhh7K78fh82P/RSUo H9uu9fdA54M2yW3dr0y3jSeN4d2tkriPSMvk1sKZ7UKAO48cuxLsKMkVxBQ25eHiaf mKg9oJ6mYfFN0LsG7Gd4RcaYOwMCAUsThDrdYLYPt7B6K6DlZz6p4GwlBfr9fWie+N SNAsBOSnIopO4n0ghk5wYZMocKpJzSspP95i/hP9UUrK4fjQzGvQzwFMlxEl2LEqiJ 2VfbEolIJRBBA== In-Reply-To: <87mt9syqsy.fsf@skimble09.plus.com> Feedback-ID: 57735886:user:proton Received-SPF: pass client-ip=185.70.40.141; envelope-from=heimeborgia@protonmail.com; helo=mail-40141.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:140166 Archived-At: ------- Original Message ------- On Wednesday, October 19th, 2022 at 11:51 AM, Sharon Kimble wrote: > Heime via Users list for the GNU Emacs text editor help-gnu-emacs@gnu.org= writes: >=20 > > I am making menus with "easy-menu-define". But I am having difficulty c= alling the submenu "dingo-outline-subm" > > from "easy-menu-define". Would appreciate some assistance figuring out = the problem. > >=20 > > The error captured is > >=20 > > Lisp error: (error "Invalid menu item in easymenu") > >=20 > > --------------------- > >=20 > > ;; Make submenu outline > >=20 > > (defvar dingo-outline-subm > >=20 > > '("Outline" > >=20 > > ["Hide Direct Body" outline-hide-entry :help "Hide Entry"] > >=20 > > ["Expose Direct Body" outline-show-entry :help "Show Entry"] > >=20 > > ["Expose Headings" outline-hide-body :help "Hide Body"]) > >=20 > > "Submenu giving outline capability.") > >=20 > > ;; Make top menu dingo > >=20 > > (defun dingo-easym () > >=20 > > "Dingo easy menu." > >=20 > > (easy-menu-define dingo-menu global-map "Dingo" > >=20 > > '("Dingo" > >=20 > > dingo-outline-subm > >=20 > > ["Hide Entry" outline-hide-entry t] > >=20 > > ["Show Entry" outline-show-entry t] > >=20 > > ["Hide Body" outline-hide-body t])) ) >=20 >=20 > If it helps this is a very small part of my 'easy-menu' >=20 > =3D=3D=3D=3D=3D > (easy-menu-define sk-menu global-map "menu" > '("Mono" > ("Misc" ;; submenu > ["Wrap Text" auto-fill-mode] > ["Get colours" list-colors-display] > ["Delete this file" delete-this-file] > ["call paradox - package manager" paradox-list-packages] > ["Show my cheatsheet" cheatsheet-show] > ["typewriter-mode" centered-cursor-mode] > ["Tea brewing time" tea-timer] > ["Show current key-bindings" show-key-command] > ["Set the font size" set-font-size] >=20 > ) > )) > =3D=3D=3D=3D=3D Sharon, I can see you are using the [] construct to a list, which I can use with defvar or defconst when the latter two construct a list. Then the solution would be ["Outline" dingo-outline-subm t] where one uses a defvar list rather than a callable function as done in ["Hide Entry" outline-hide-entry t] =20 > -- > A taste of linux =3D http://www.sharons.org.uk > TGmeds =3D http://www.tgmeds.org.uk > DrugFacts =3D https://www.drugfacts.org.uk > Debian 11.5, fluxbox 1.3.7, emacs 29.0.50, org 9.5.5