https://github.com/aki2o/emacs-ctxmenu.git
git clone 'git://github.com/aki2o/emacs-ctxmenu.git'
This is a extension of Emacs that provide a context menu like right-click.
You'll be able to find/execute the command that is not used frequently even if you've forgotten the key bind.
2014/02/09 It's available by using melpa.
2014/02/19 It's available. But, master branch only.
(auto-install-from-url "https://raw.github.com/aki2o/emacs-ctxmenu/master/ctxmenu.el")
(auto-install-from-url "https://raw.github.com/aki2o/emacs-ctxmenu/master/ctxmenu-config.el")
* In this case, you need to install each of the following dependency.
Download ctxmenu.el/ctxmenu-config.el and put on your load-path.
* In this case, you need to install each of the following dependency.
Bind ctxmenu:show
to some key.
(require 'ctxmenu)
(require 'ctxmenu-config)
(define-key global-map (kbd "M-@") 'ctxmenu:show)
You need to set ctxmenu:sources
/ctxmenu:global-sources
for the definition of the menu contents.
Setting it manually is OK. But, the following helper function is defined for set it easily.
ctxmenu-config:setup
ctxmenu:add-source
The basic contents is defined in ctxmenu-config.el.
You can load it by the following config.
(ctxmenu-config:setup)
Feature is the symbol that ctxmenu-config:setup
uses for looking up the loaded definition.
About the basic features, eval (describe-variable 'ctxmenu-config:default-features)
.
The extra contents is defined in ctxmenu-config.el too.
If you want to load it, moreover use ctxmenu-config:extra-features
like the following.
(ctxmenu-config:setup ctxmenu-config:extra-features)
If you don't want to load some definition,
set ctxmenu-config:exclude-features
like the following before ctxmenu-config:setup
.
(setq ctxmenu-config:exclude-features '(window register))
You can add the contents what you want by ctxmenu:add-source
.
About usage, eval (describe-function 'ctxmenu:add-source)
or see ctxmenu-config.el.
Also, you can change behavior by customize variable.
For more information, eval (customize-group "ctxmenu")
.
The menu contents are created at first, and then they are reused in same mode buffer.
If you change the definition of the menu contents, do ctxmenu:clear-cache
for reflection.
In default, a context menu is shown on the start position of current window.
You can show it on the current position by setting ctxmenu:show-at-pointed
non-nil.
But, in the case, it might happen that a context menu is not shown so well.
There are the config by ctxmenu-config:setup
that find the contents of menu from the key stroke.
If you change the key bind from default, it might happen that the contents of menu is not right.
In the case, you should set ctxmenu-config:exclude-features
and customize for you.
Enjoy!!!