Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add capability to jump to MRI C method sources #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 28, 2016

  1. Add capability to jump to MRI C method sources

    Human-readable explanation of the scope of changes is below:
    
    Overview
    --------
    
    This PR adds the ability to (usually!) jump to the C sources of
    Ruby methods.
    
    It only works if the user has GNU Global installed and sets a few
    Elisp variables to the right values.
    
    If the user doesn't set the variable `robe-use-global-p` to true,
    the behavior of Robe stays exactly as it is now -- none of
    the "jump to C source" machinery is engaged.
    
    Summary of code changes
    -----------------------
    
    - Add functions `robe-list-c-method-files`,
      `robe-determine-c-file-for`, `robe-jump-to-c-source`
    
    - Add variables `robe-use-global-p`,
      `robe-ruby-source-directory`, `robe-global-command`
    
    - Change the interface of `robe-jump-to` to add optional
      arguments that allow it to pass in the value of
      `thing-at-point` for the "jump to C source" machinery.  Because
      the arguments are optional, we don't need to change any of
      `robe-jump-to`'s callers
    
    - Modify `robe-jump-to` to check the value of `robe-use-global-p`
      to decide whether to try to jump to C method sources.  For
      users who haven't set this variable, Robe works exactly as it
      does today.
    
    Remaining bugs/weird UX
    -----------------------
    
    - Finding the C source of the method is not 100% accurate - some
      of this is due to GLOBAL, some due to the regex search's
      incomplete coverage
    
    - When jumping back from the C source, you have to hit `M-,`
      twice for some reason (possibly a `ggtags-mode` thing)
    
    - Sometimes you have to enter the module name in the minibuffer
      twice to jump to C-based definitions, I'm not sure why yet
    Rich Loveland committed May 28, 2016
    Configuration menu
    Copy the full SHA
    bcbe1eb View commit details
    Browse the repository at this point in the history