Skip to content

brianj29/rscope

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is “yet” another interface to cscope tool (http://cscope.sf.net) for emacs.

It provides the same information as its backend cscope :

  • what functions are calling a function
  • where is a global symbol
  • what is the calling hierarchy of a function

Usage

Quick-start

  1. Download rscope.el
  2. Evaluate it
    • (load “rscope.el”)

Source browsing

Once loaded, each C/C++ file will be offered all the “C-C s” key prefix bindings, providing access to the rscope functions.

You can experiment by :

  1. Have a cscope database generated somewhere
  2. Load a C file
  3. Use a command, for example type “C-c s g”

Global keys launching source browsing

All keybindings use the “C-c s” prefix:

C-c s sFind symbol.
C-c s =Find assignments to this symbol
C-c s dFind global definition.
C-c s gFind global definition (alternate binding).
C-c s cFind functions calling a function.
C-c s CFind called functions (list functions called from a function).
C-c s tFind text string.
C-c s fFind a file.
C-c s hFind calling hierarchy of a function
C-c s nOpen rscope navigation tool

The Result buffer keys

  • Normal keystrokes :
    • Use “n” to navigate to next entry in results
    • Use “p” to navigate to previsous entry in results
    • Use ENTER bury result buffer and switch to the previewed entry
    • Use “q” to bury result buffer and switch to other window.
  • Advanced keystrokes:
    • Use SPACE to preview an entry
    • Use S-ENTER to bury result buffer, and replace it by the selected entry
    • Use number <N> to develop current leaf’s subtree up to Nth level

The rscope-nav tool

rscope-nav-mode is a major mode to help viewing and manipulating rscope marker ring. It displays rscope markers from the newest to the oldest and provides the following bindings:

nNext entry
pPrevious entry
qQuit window
gRefresh
kKill current entry
KFlush marker ring
sSet current entry as the newest one. All newer entries are deleted
ENTERGoto current entry
Shift-ENTERGoto current entry in the same window
SPACEPreview current entry

Goal

It is born to challenge its cousins :

  • xscope
  • ascope
  • bscope

The main advantages of this interface WRT to its elders are :

  • cscope process are spwaned only once for a give cscope.out
  • multiple cscope database are allowed
  • automatic cscope database is provided
  • previews of results
  • buffer number limitation (ie. close preview buffers, close buffers with pop-mark when they haven’t been touched)

Once one of the cousins will have achieved the same functionnalities, it will slip in slumber.

About

Reborn cscope extension for emacs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%