CClookup is a mode to search C++ refernece documents especially within emacs.

Usage

1. M-x cclookup-lookup

screenshot_038.png 

  • M-x cclookup-lookup, (set your local key map)

2. Ido autocompletion

screenshot_039.png

  • Interactive do interface to search keywords
  • C-r, C-s : next/prev match

3. Search results

screenshot_040.png

screenshot_043.png

  • Results of searching a keyword
  • n/p : next/prev line
  • C-v,M-v : scroll up/down
  • q : quit
  • Space/Enter : lookup document

4.Read in your browser

screenshot_042.png

  • You can see the proper python document in your favorite browser, w3m, firefox, ie or whatever.

Install

Checkout

git clone git@github.com:tsgates/cclookup.git

Edit .emacs

;; add cclookup to your loadpath, ex) "~/.lisp/addons/cclookup"
(setq cclookup-dir "[PATH]")
(add-to-list 'load-path cclookup-dir)
;; load cclookup when compile time
(eval-when-compile (require 'cclookup))

;; set executable file and db file
(setq cclookup-program (concat cclookup-dir "/cclookup.py"))
(setq cclookup-db-file (concat cclookup-dir "/cclookup.db"))

;; to speedup, just load it on demand
(autoload 'cclookup-lookup "cclookup"
  "Lookup SEARCH-TERM in the C++ Reference indexes." t)
(autoload 'cclookup-update "cclookup" 
  "Run cclookup-update and create the database at `cclookup-db-file'." t)
  • Change [PATH] variable to proper path where you installed cclookup
  • Add above code in your .emacs

Preferences

Keybinding

(global-set-key "\C-ch" 'cclookup-lookup)

Lookup downloaded documents

  • Update Database (In repository, there is database to lookup online document, but slow to load in a browser)
$ cd ~/.lisp/addons/cclookup
$ ./cclookup.py -u ./www.cppreference.com/wiki
$ ./cclookup.py -l print
fprintf	./www.cppreference.com/wiki/c/io/fprintf	c/io	print formatted...
  • Move to cclookup directory
  • Execute cclookup.py with your cppreference document path, download from here
  • Test by executing cclookup.py -l print and check cclookup indicating proper path you set

Default browser

(setq browse-url-browser-function 'w3m-browse-url) ;; w3m
(setq browse-url-default-browser "firefox.exe")    ;; firefox in M$ Windows
  • Change to your preferneces

Acknowledgements

 

Tag page

Files 6

FileSizeDateAttached by 
 screenshot_038.png
No description
18.81 kB07:47, 16 Jul 2009tsgatesActions
 screenshot_039.png
No description
21.12 kB07:51, 16 Jul 2009tsgatesActions
 screenshot_040.png
No description
47.2 kB07:49, 16 Jul 2009tsgatesActions
screenshot_041.png
No description
26.55 kB07:52, 16 Jul 2009tsgatesActions
 screenshot_042.png
No description
61.02 kB07:54, 16 Jul 2009tsgatesActions
 screenshot_043.png
No description
51.59 kB07:54, 16 Jul 2009tsgatesActions