help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to use 'easy-menu'?


From: Sharon Kimble
Subject: how to use 'easy-menu'?
Date: Fri, 28 Nov 2014 15:04:40 +0000
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (gnu/linux)

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’m using latex,
or a shell-script, anywhere really. This is the beginning of the
script -

--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
--8<---------------cut here---------------end--------------->8---

But when its tangled it just comes back with

╭────
│easy-menu-add-item: Wrong number of arguments: (2 . 2), 3
╰────

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 -

--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]
      )))
--8<---------------cut here---------------end--------------->8---

and it shows emacs-wise. How do I get the first menu working
properly please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.5, emacs 24.4.1.0

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]