Note that there are some explanatory texts on larger screens.

plurals
  1. POEmacs: Navigating to compile error
    primarykey
    data
    text
    <p>I'm setting up emacs as my ruby development environment. I run tests by doing M-x compile and then rake test. I've set up compile-error-regexp-alist appropriately so that the resulting compile buffer can recognize test failures and make them clickable, but I'm facing trouble getting compile-find-file to use the correct directory to find the file from. Suppose I'm visiting the file proj-home/test/ruby-test-file.rb and hit M-x compile and then use "rake test" for the compile-command. The resultant compile-buffer has "proj-home/test/" set as the default-directory while the rake test output has errors user [./test/ruby-test-file.rb:nn]. So when compile-find-file tries to find the file specified in the error message, it looks in "proj-home/test/./test/ruby-test-file.rb" which is obviously wrong. </p> <p>How do I make compile-find-file to look in the right place? I've spent quite some time debugging the functions and reading through the function definitions in compile.el, but no joy yet. One thing that did surprise me is that running rake test from inside a shell cd'd to "proj-home/test" correctly runs the tests (even tho' the Rakefile is in "proj-home" and not "proj-home/test"), so it looks like rake has some intelligence built-in which allows it to search up the directory tree and find the Rakefile in parent directories. </p> <p>This intelligence in rake might be confusing emacs as to what is the current directory it should use. </p> <p>The emacs wiki here: <a href="http://www.emacswiki.org/emacs/CompileCommand" rel="nofollow noreferrer">http://www.emacswiki.org/emacs/CompileCommand</a> has a code snippet to find a file by searching parent directories (under "Running Make with the closest Makefile"), but I still haven't figured out if/where I need to use that code snippet. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload