# Tips for gradle/emacs compilation mode integration

**URL:** <https://discuss.gradle.org/t/tips-for-gradle-emacs-compilation-mode-integration/357>\
**Category:** Old Forum Archive\
**Created:** [November 15, 2011, 3:55pm UTC](https://discuss.gradle.org/t/tips-for-gradle-emacs-compilation-mode-integration/357 "2011-11-15T15:55:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bealeaj1214](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@bealeaj1214](https://discuss.gradle.org/u/bealeaj1214)\
**Post date:** [November 15, 2011, 3:55pm UTC](https://discuss.gradle.org/t/tips-for-gradle-emacs-compilation-mode-integration/357/1 "2011-11-15T15:55:00Z")

</div>

After the most recent NFJS conference, Matt and Tim encouraged me to post my gradle/emacs integration scheme for compiles

Starting point for integration between gradle and compilation mode in emacs.

1. set add a regexp for the compilation mode so that emacs can recognize gradle output.

For Gnu emacs this works (add-to-list

'compilation-error-regexp-alist

'("^\[ERROR\] \(.\*\):\[\([0-9]+\),\([0-9]+\)\]" 1 2 3))

for a little more information see

[http://praveen.kumar.in/2011/03/09/making-gnu-emacs-detect-custom-error-messages-a-maven-example](http://praveen.kumar.in/2011/03/09/making-gnu-emacs-detect-custom-error-messages-a-maven-example)

Add a command so that emacs can find your gradle build file. This provides functionality similar to ant -s.

[https://github.com/bealeaj1214/elisp-personal/blob/master/gradle-compile.el](https://github.com/bealeaj1214/elisp-personal/blob/master/gradle-compile.el)

---

<div class="post-metadata">

**Author:** ![matthew\_mccullough](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/matthew_mccullough/32/209_2.png) [@matthew\_mccullough](https://discuss.gradle.org/u/matthew_mccullough)\
**Post date:** [November 17, 2011, 2:25pm UTC](https://discuss.gradle.org/t/tips-for-gradle-emacs-compilation-mode-integration/357/2 "2011-11-17T14:25:00Z")

</div>

Very impressive. I see you turned on -q to avoid the issue with the inability to parse the status line because of the continual re-writing for progress.

---

<div class="post-metadata">

**Author:** ![rileyrg](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rileyrg](https://discuss.gradle.org/u/rileyrg)\
**Post date:** [April 28, 2014, 4:06pm UTC](https://discuss.gradle.org/t/tips-for-gradle-emacs-compilation-mode-integration/357/3 "2014-04-28T16:06:00Z")

</div>

It should look for the wrapper script and use that if it exists (gradlew)
