mickeynp / discover.el

Discover more of emacs with context menus!
http://www.masteringemacs.org/article/discoverel-discover-emacs-context-menus
GNU General Public License v3.0
176 stars 16 forks source link

Prodigy #3

Closed rejeep closed 10 years ago

rejeep commented 10 years ago

Hey,

Nice package. I figured I would add support for prodigy.el, but the code does not seem ready. I figured it would be a simple as adding the descriptions and then everything would work automatically (I expected I could add the code below, enter prodigy-mode and press ? to get the popup description).

(prodigy
 (actions
  ("Navigation"
   ("n" "next line" prodigy-next)
   ("p" "prev line" prodigy-prev))
  ("Marking"
   ("m" "mark service" prodigy-mark)
   ("t" "mark services with tag" prodigy-mark-tag)
   ("M" "mark all services" prodigy-mark-all)
   ("u" "unmark service" prodigy-unmark)
   ("T" "unmark services with tag" prodigy-unmark-tag)
   ("U" "unmark all services" prodigy-unmark-all))
  ("Process"
   ("s" "start service" prodigy-start)
   ("S" "stop service" prodigy-stop)
   ("r" "restart service" prodigy-restart)
   ("$" "display service process buffer" prodigy-display-process))
  ("Filters"
   ("f t" "add tag filter" prodigy-add-tag-filter)
   ("f n" "add name filter" prodigy-add-name-filter)
   ("F" "clear all filters" prodigy-clear-filters))
  ("Misc"
   ("o" "open in browser" prodigy-browse))))

Another idea would be to add an API and then each mode could register instead of having everything in this repo.

mickeynp commented 10 years ago

Hi rejeep,

It should be that simple. You need to update the minor mode defun so it binds a key to your mode map. We also need to think about how we handle packages that may not yet be installed.