[ESS] Using anything.el for R help / object browsing

ts8 tshort at epri.com
Fri Dec 5 04:28:00 CET 2008


Anything.el is a great emacs extension. I use anything.el in emacs for buffer
switching, finding recent files, and file searching on my disk. Here is more
information on anything:

http://www.emacswiki.org/emacs/Anything

It's been called quicksilver for emacs. You can use it for searching and
much more. I've extended it to act as an R help finder and object browser.
Part of my .emacs configuration is given below.  

I've attached the configuration I use in my .emacs, but I'm not sure the
attachment will go through (I'm using nabble to post). In any case, you can
find it here, too:

http://www.emacswiki.org/emacs/AnythingSources#toc38

With this configuration, I hit F12, and it pops up a temporary buffer. In
that buffer, it lists the current buffers, recent files, R objects, Imenu
items (including R functions), files in the current directory, occur in the
buffer (very handy), files on my disk (using locate), and emacs commands. I
can use the left and right arrows to jump between categories and the up and
down arrows to move between items. As I type, it narrows the selection to
match the regular expression entered. For the R objects, if I hit <enter>,
the default action brings up help on the object (as long as the buffer has
an associated R process). If I hit tab, I can get more options, and I
currently implemented head, tail, str, summary, dput, and print. The results
all appear in their own buffer. This makes it a quick object browser, like
rdired. It's a mouthful to explain, but it's easy once you see it.

(require 'anything)   ;; http://www.emacswiki.org/emacs/anything.el
(require 'anything-config) ;;
http://www.emacswiki.org/emacs/anything-config.el

(global-set-key [f12] 'anything)

(setq anything-sources
      (list anything-c-source-buffers
            anything-c-source-recentf
            anything-c-source-R-help
            anything-c-source-imenu
            anything-c-source-files-in-current-dir
            anything-c-source-occur
            anything-c-source-locate
            anything-c-source-emacs-commands
))


http://www.nabble.com/file/p20847205/R-anything-config.el
R-anything-config.el 
-- 
View this message in context: http://www.nabble.com/Using-anything.el-for-R-help---object-browsing-tp20847205p20847205.html
Sent from the ESS - Help mailing list archive at Nabble.com.




More information about the ESS-help mailing list