From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sharon Kimble Newsgroups: gmane.emacs.help Subject: how to use 'easy-menu'? Date: Fri, 28 Nov 2014 15:04:40 +0000 Message-ID: <87k32fcqnr.fsf@skimble.plus.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1417187124 3090 80.91.229.3 (28 Nov 2014 15:05:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Nov 2014 15:05:24 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 28 16:05:19 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XuN6j-0002ku-Gu for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Nov 2014 16:05:17 +0100 Original-Received: from localhost ([::1]:44820 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuN6i-0001o4-Lz for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Nov 2014 10:05:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuN6N-0001nZ-N1 for help-gnu-emacs@gnu.org; Fri, 28 Nov 2014 10:05:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuN6I-0006ce-QK for help-gnu-emacs@gnu.org; Fri, 28 Nov 2014 10:04:55 -0500 Original-Received: from avasout01.plus.net ([84.93.230.227]:34779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuN6I-0006bo-KS for help-gnu-emacs@gnu.org; Fri, 28 Nov 2014 10:04:50 -0500 Original-Received: from london ([46.208.49.40]) by avasout01 with smtp id M34l1p0060s20Ky0134nel; Fri, 28 Nov 2014 15:04:47 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=ZZGTN6lA c=1 sm=1 tr=0 a=TFhflJmy72J+D2HLcJUc6g==:117 a=TFhflJmy72J+D2HLcJUc6g==:17 a=0Bzu9jTXAAAA:8 a=AesOsg4oJXAA:10 a=EBOSESyhAAAA:8 a=LlzXLoV6AAAA:8 a=xtERp6CFAAAA:8 a=iI7HsYTVAAAA:8 a=MkbplUMsXXBur9zGneoA:9 a=fR4QqfJ0RWOeIlvs:21 a=Vy1McBkLREhEqenu:21 a=QEXdDO2ut3YA:10 a=3zLNA_y9M-43sHiY_lQA:9 X-AUTH: skimble:2500 User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 84.93.230.227 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101274 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I have an easy-menu menu that works under org-mode, but I would now like to use it emacs-wide, i.e. have it available when I=E2=80=99m using la= tex, or a shell-script, anywhere really. This is the beginning of the script - =2D-8<---------------cut here---------------start------------->8--- #+BEGIN_SRC emacs-lisp (easy-menu-add-item ;; console nil nil (easy-menu-create-menu "Mine" '("Misc" ;; submenu ["Wrap Text" auto-fill-mode] ["List packages for update" paradox-list-packages] ["Get colours" list-colors-display] ["Delete this file" delete-this-file] ["? stack-overflow" howdoi-query] ["shell" shell] ["password-vault" password-vault] ["Start org-mode" org-mode] ["insert drawer" org-insert-property-drawer] ["new buffer" xah-new-empty-buffer] ["w3m open new site" w3m-open-site] ["w3m buffer to org-style" w3m-get-buffer-with-org-style] ["new latex" fc-insert-latex-skeleton] ["cleanup buffer" buffer-cleanup] ["toggle page lines" linum-mode] ) '("Clock" ;; submenu ["In" org-clock-in] ["Out" org-clock-out] ["Resolve" org-resolve-clocks] ["Goto" org-clock-goto] ) )) #+END_SRC =2D-8<---------------cut here---------------end--------------->8--- But when its tangled it just comes back with =E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82easy-menu-add-item: Wrong number of arguments: (2 . 2), 3 =E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80 I've tried googling for it with zero success. I've looked at the code in "easymenu.el" but I can't see where its called. But this same script works when called - =2D-8<---------------cut here---------------start------------->8--- (easy-menu-add-item ;; console nil nil (easy-menu-create-menu "Theme" '(["1) Dark - Goldenrod" (tj-load-theme 'goldenrod) :active t] ["2) Dark - Darkest midnight" (tj-load-theme 'darkest-midnight) :active = t] ["3) Dark - soft-morning" (tj-load-theme 'soft-morning) :active t] ["4) Light - darkest-dawn" (tj-load-theme 'darkest-dawn) :active t] ["5) Light - Wheat" (tj-load-theme 'wheat) :active t] ["6) Dark - Smyx" (tj-load-theme 'smyx) :active t] ["7) Light - monokai" (tj-load-theme 'monokai) :active t] ["8) Dark - dark-emacs" (tj-load-theme 'dark-emacs) :active t] ))) =2D-8<---------------cut here---------------end--------------->8--- and it shows emacs-wise. How do I get the first menu working properly please? Thanks Sharon. =2D-=20 A taste of linux =3D http://www.sharons.org.uk my git repo =3D https://bitbucket.org/boudiccas/dots TGmeds =3D http://www.tgmeds.org.uk Debian testing, fluxbox 1.3.5, emacs 24.4.1.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJUeI8IAAoJEDaBgBkK+INbdMEP/2W4I0Ntlt3j1eDEJGi2Wo0C Qo1PjHe4MHj+aXpymM+QwtP6BsQbR0XkImzQPgDG4n8W0Q0KYbbe5BRLL20G8x5z qqk7m2s8XUOgKTmq+5tZEhHYXAGXMveHpGYzl2R3UeKIwtNmcMjWIrc6ioAwaFPQ UaSrxwf96/YCjYla9Dn4MMZfHSBZSx2W56iGvDRIBnjr4AcXqTGMMccjl3bE/Noy hkAGNh1oTbCUaf3+T6pm167WaQnE7/SjW4vFt73lCsBdJsnAGvs3wszUbZGNRKtJ g/AfQcZ+GTvcLw/CqzLar8QFnnXU2SNrqc7IfCmnzXjJjf56AJxed6ikkPBkkiJi o+GeIikMJbP/sX73p3H7Ma1Iy6E90nv1JKDTPRLQx+gQ3r2b8PK265dEus8bqi4A C9dnug3eBzuiymgBXwP3CVrf4FTKORSPQsBhBTBhdjFS+ocZk/I8BoUAxVctRaRo NpJ4j/7ODGf2kkDPmBM6VaOhNUTYux1zMUpbg+VWRSJ/F/azbLFSCryDUx7X+UHR Y5ObqGzT01mFRneJLkpA3+IIG+sSNXs9gtoD62d9813JxKkFADzCFUhZVcgKLQ+U 2a/Op+M5M+kTpqWOLwXorFVbeQJmtajqBx6/oERN1X64SGgh+R0PXSLzoXqG3tNG uxDu6cfLdthZQsUc//UC =HiM5 -----END PGP SIGNATURE----- --=-=-=--