|
This patch adds (optional) support for flymake mode
(on-the-fly syntax checking) on Emacs, for UNIX systems. This work was originally submitted to the Erlware version of the Emacs mode by Mats Cronqvist. http://github.com/jdavisp3/otp/tree/emacs-flymake dave ________________________________________________________________ erlang-patches (at) erlang.org mailing list. See http://www.erlang.org/faq.html To unsubscribe; mailto:[hidden email] |
|
On Sat, May 15, 2010 at 11:01:34PM -0700, Dave Peticolas wrote:
> This patch adds (optional) support for flymake mode > (on-the-fly syntax checking) on Emacs, for UNIX systems. > > This work was originally submitted to the Erlware version > of the Emacs mode by Mats Cronqvist. > > http://github.com/jdavisp3/otp/tree/emacs-flymake Thanks. Included in 'pu' with minor tweaks of the commit message and whitespace fixes. For future contributions please use the recommended source format e.g: git fetch git://github.com/jdavisp3/otp.git emacs-flymake -- / Raimo Niskanen, Erlang/OTP, Ericsson AB ________________________________________________________________ erlang-patches (at) erlang.org mailing list. See http://www.erlang.org/faq.html To unsubscribe; mailto:[hidden email] |
|
Hi.
A few doubts about your contribusion: * The added files are missing from the Makefile. Can you please fix this? * flymaker.sh is a bash script and we have Solaris 8 on our list of supported platforms, so a /bin/sh script would be more portable. This will not not stop us from accepting your contribution, but is there anything bash specific in the script? A quick readthrough only revealed some '==' tests that is portably written as '=', but I saw no essential bash features used. * Could even flymaker.sh be an escript? That might even make it work on Windows. On Mon, May 17, 2010 at 07:53:47AM -0700, Dave Peticolas wrote: > On 05/17/2010 06:24 AM, Raimo Niskanen wrote: > >On Sat, May 15, 2010 at 11:01:34PM -0700, Dave Peticolas wrote: > > > >>This patch adds (optional) support for flymake mode > >>(on-the-fly syntax checking) on Emacs, for UNIX systems. > >> > >>This work was originally submitted to the Erlware version > >>of the Emacs mode by Mats Cronqvist. > >> > >> http://github.com/jdavisp3/otp/tree/emacs-flymake > >> > >Thanks. Included in 'pu' with minor tweaks of the commit message > >and whitespace fixes. > > > >For future contributions please use the recommended > >source format e.g: > > git fetch git://github.com/jdavisp3/otp.git emacs-flymake > > > > Will do, thanks! > > dave -- / Raimo Niskanen, Erlang/OTP, Ericsson AB ________________________________________________________________ erlang-patches (at) erlang.org mailing list. See http://www.erlang.org/faq.html To unsubscribe; mailto:[hidden email] |
|
>> >>This patch adds (optional) support for flymake mode
>> >>(on-the-fly syntax checking) on Emacs, for UNIX systems. >> >> >> >>This work was originally submitted to the Erlware version >> >>of the Emacs mode by Mats Cronqvist. Hi, I took a different approach, which perhaps is of interest to someone. I'll post it here for the record. This patch is a pure elisp implementation and seems to work on linux, mac osx and windows (provided that erlc is in the path). ;; Syntax check erlang source code on the fly (integrates with flymake). ;; ;; Start using flymake with erlang by putting the following somewhere ;; in your .emacs file: ;; ;; (require 'erlang-flymake) ;; ;; Flymake is rather eager and does its syntax checks frequently by ;; default and if you are bothered by this, you might want to put the ;; following in your .emacs as well: ;; ;; (erlang-flymake-only-on-save) ;; ;; There are a couple of variables which control the compilation options: ;; * erlang-flymake-get-code-path-dirs-function ;; * erlang-flymake-get-include-dirs-function ;; * erlang-flymake-extra-opts ;; ;; This code is inspired by http://www.emacswiki.org/emacs/FlymakeErlang. There are a few differences that I've spotted. The previously posted version adds include and code paths whereas mine are by default empty (any takers? :-) ). They are configurable though. I've used this in a setting where include and code paths are stated in a special file within the application. I wrote functions which produced lists of paths based on that file. The following variables can be set to point at such functions: * erlang-flymake-get-code-path-dirs-function and * erlang-flymake-get-include-dirs-function The flags used to specify compiler warnings differ as well. There's another variable that can be used to specify the options one wants to use: * erlang-flymake-extra-opts Code here: git fetch git://github.com/klajo/otp.git erlang-flymake Cheers, Klas ________________________________________________________________ erlang-patches (at) erlang.org mailing list. See http://www.erlang.org/faq.html To unsubscribe; mailto:[hidden email] |
|
On 05/27/2010 02:44 PM, Klas Johansson wrote:
>>>>> This patch adds (optional) support for flymake mode >>>>> (on-the-fly syntax checking) on Emacs, for UNIX systems. >>>>> >>>>> This work was originally submitted to the Erlware version >>>>> of the Emacs mode by Mats Cronqvist. >>>>> > Hi, > > I took a different approach, which perhaps is of interest to > someone. I'll post it here for the record. This patch is a pure > elisp implementation and seems to work on linux, mac osx and > windows (provided that erlc is in the path). > > ;; Syntax check erlang source code on the fly (integrates with flymake). > ;; > ;; Start using flymake with erlang by putting the following somewhere > ;; in your .emacs file: > ;; > ;; (require 'erlang-flymake) > ;; > ;; Flymake is rather eager and does its syntax checks frequently by > ;; default and if you are bothered by this, you might want to put the > ;; following in your .emacs as well: > ;; > ;; (erlang-flymake-only-on-save) > ;; > ;; There are a couple of variables which control the compilation options: > ;; * erlang-flymake-get-code-path-dirs-function > ;; * erlang-flymake-get-include-dirs-function > ;; * erlang-flymake-extra-opts > ;; > ;; This code is inspired by http://www.emacswiki.org/emacs/FlymakeErlang. > > There are a few differences that I've spotted. The previously > posted version adds include and code paths whereas mine are by > default empty (any takers? :-) ). They are configurable though. > I've used this in a setting where include and code paths are > stated in a special file within the application. I wrote > functions which produced lists of paths based on that file. The > following variables can be set to point at such functions: > > * erlang-flymake-get-code-path-dirs-function and > * erlang-flymake-get-include-dirs-function > > The flags used to specify compiler warnings differ as well. > There's another variable that can be used to specify the options > one wants to use: > > * erlang-flymake-extra-opts > > > Code here: > > git fetch git://github.com/klajo/otp.git erlang-flymake > > An all-elisp solution seems like an improvement over the patch I sent. What do you think about providing a default implementation of the include and code path functions that assume the typical directory layouts for otp apps? That way folks who use the standard layout don't have to add anything extra to their configs. dave ________________________________________________________________ erlang-patches (at) erlang.org mailing list. See http://www.erlang.org/faq.html To unsubscribe; mailto:[hidden email] |
|
On Fri, May 28, 2010 at 5:53 AM, Dave Peticolas <[hidden email]> wrote:
> On 05/27/2010 02:44 PM, Klas Johansson wrote: >>>>>> >>>>>> This patch adds (optional) support for flymake mode >>>>>> (on-the-fly syntax checking) on Emacs, for UNIX systems. >>>>>> >>>>>> This work was originally submitted to the Erlware version >>>>>> of the Emacs mode by Mats Cronqvist. >>>>>> >> >> Hi, >> >> I took a different approach, which perhaps is of interest to >> someone. I'll post it here for the record. This patch is a pure >> elisp implementation and seems to work on linux, mac osx and >> windows (provided that erlc is in the path). >> >> ;; Syntax check erlang source code on the fly (integrates with >> flymake). >> ;; >> ;; Start using flymake with erlang by putting the following somewhere >> ;; in your .emacs file: >> ;; >> ;; (require 'erlang-flymake) >> ;; >> ;; Flymake is rather eager and does its syntax checks frequently by >> ;; default and if you are bothered by this, you might want to put the >> ;; following in your .emacs as well: >> ;; >> ;; (erlang-flymake-only-on-save) >> ;; >> ;; There are a couple of variables which control the compilation >> options: >> ;; * erlang-flymake-get-code-path-dirs-function >> ;; * erlang-flymake-get-include-dirs-function >> ;; * erlang-flymake-extra-opts >> ;; >> ;; This code is inspired by >> http://www.emacswiki.org/emacs/FlymakeErlang. >> >> There are a few differences that I've spotted. The previously >> posted version adds include and code paths whereas mine are by >> default empty (any takers? :-) ). They are configurable though. >> I've used this in a setting where include and code paths are >> stated in a special file within the application. I wrote >> functions which produced lists of paths based on that file. The >> following variables can be set to point at such functions: >> >> * erlang-flymake-get-code-path-dirs-function and >> * erlang-flymake-get-include-dirs-function >> >> The flags used to specify compiler warnings differ as well. >> There's another variable that can be used to specify the options >> one wants to use: >> >> * erlang-flymake-extra-opts >> >> >> Code here: >> >> git fetch git://github.com/klajo/otp.git erlang-flymake >> > > An all-elisp solution seems like an improvement over the patch I sent. > > What do you think about providing a default implementation of the include > and code path functions that assume the typical directory layouts for otp > apps? > That way folks who use the standard layout don't have to add anything extra > to their > configs. > > dave Hi again, I've made a couple of additional commits: * Include erlang-flymake.el in Makefile * By default pass <app>/include and <app>/ebin to compiler (note, this covers only the "current" application, not all applications on the same level as in the other version, hopefully this makes the erlang-flymake more useful out-of-the-box) * Make the syntax check command configurable (i.e. now you aren't restricted to erlc, you could for example use a wrapper script instead if you want to) * Document in README Code here: git fetch git://github.com/klajo/otp.git erlang-flymake Cheers, Klas ________________________________________________________________ erlang-patches (at) erlang.org mailing list. See http://www.erlang.org/faq.html To unsubscribe; mailto:[hidden email] |
|
On Sun, May 30, 2010 at 11:05:32PM +0200, Klas Johansson wrote:
> On Fri, May 28, 2010 at 5:53 AM, Dave Peticolas <[hidden email]> wrote: : : > > > > An all-elisp solution seems like an improvement over the patch I sent. > > > > What do you think about providing a default implementation of the include > > and code path functions that assume the typical directory layouts for otp > > apps? > > That way folks who use the standard layout don't have to add anything extra > > to their > > configs. > > > > dave > > Hi again, > > I've made a couple of additional commits: > * Include erlang-flymake.el in Makefile > * By default pass <app>/include and <app>/ebin to compiler > (note, this covers only the "current" application, not all > applications on the same level as in the other version, > hopefully this makes the erlang-flymake more useful > out-of-the-box) > * Make the syntax check command configurable > (i.e. now you aren't restricted to erlc, you could for example > use a wrapper script instead if you want to) > * Document in README > > Code here: > > git fetch git://github.com/klajo/otp.git erlang-flymake Thank you, it will be included in 'pu', replacing Dave Peticolas contribution for now... > > > Cheers, > Klas > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:[hidden email] > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB ________________________________________________________________ erlang-patches (at) erlang.org mailing list. See http://www.erlang.org/faq.html To unsubscribe; mailto:[hidden email] |
|
On 05/31/2010 04:43 AM, Raimo Niskanen wrote:
> On Sun, May 30, 2010 at 11:05:32PM +0200, Klas Johansson wrote: > >> On Fri, May 28, 2010 at 5:53 AM, Dave Peticolas<[hidden email]> wrote: >> > : : > >>> An all-elisp solution seems like an improvement over the patch I sent. >>> >>> What do you think about providing a default implementation of the include >>> and code path functions that assume the typical directory layouts for otp >>> apps? >>> That way folks who use the standard layout don't have to add anything extra >>> to their >>> configs. >>> >>> dave >>> >> Hi again, >> >> I've made a couple of additional commits: >> * Include erlang-flymake.el in Makefile >> * By default pass<app>/include and<app>/ebin to compiler >> (note, this covers only the "current" application, not all >> applications on the same level as in the other version, >> hopefully this makes the erlang-flymake more useful >> out-of-the-box) >> * Make the syntax check command configurable >> (i.e. now you aren't restricted to erlc, you could for example >> use a wrapper script instead if you want to) >> * Document in README >> >> Code here: >> >> git fetch git://github.com/klajo/otp.git erlang-flymake >> > Thank you, it will be included in 'pu', replacing Dave Peticolas > contribution for now... > > I concur, Klas's patch is better. I'll happily withdraw mine. dave ________________________________________________________________ erlang-patches (at) erlang.org mailing list. See http://www.erlang.org/faq.html To unsubscribe; mailto:[hidden email] |
| Powered by Nabble | Edit this page |
