From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: maintain flymake.el Date: Mon, 16 Dec 2013 19:30:39 +0100 Message-ID: References: <87a9gdzx63.fsf@flea.lifelogs.com> <8738lsq32g.fsf@flea.lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1387218655 23236 80.91.229.3 (16 Dec 2013 18:30:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Dec 2013 18:30:55 +0000 (UTC) Cc: emacs-devel To: Sebastian Wiesner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 16 19:31:02 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VscwU-0003GU-Hv for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2013 19:30:58 +0100 Original-Received: from localhost ([::1]:57651 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VscwU-0001V8-4x for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2013 13:30:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VscwM-0001PJ-Gt for emacs-devel@gnu.org; Mon, 16 Dec 2013 13:30:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VscwH-0004Xp-3e for emacs-devel@gnu.org; Mon, 16 Dec 2013 13:30:50 -0500 Original-Received: from mailfe01.swip.net ([212.247.154.1]:56840 helo=swip.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VscwG-0004XX-LO for emacs-devel@gnu.org; Mon, 16 Dec 2013 13:30:44 -0500 X-T2-Spam-Status: No, hits=0.0 required=5.0 Original-Received: from hosdjarv.se (account mj138573@tele2.se [46.59.42.57] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 464556301; Mon, 16 Dec 2013 19:30:41 +0100 In-Reply-To: X-Mailer: Apple Mail (2.1822) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 212.247.154.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:166498 Archived-At: Hello. 16 dec 2013 kl. 17:48 skrev Sebastian Wiesner : > 2013/12/16 Jan Dj=E4rv : >> Hello. >>=20 >> 16 dec 2013 kl. 15:32 skrev Ted Zlatanov : >>=20 >>> On Sun, 15 Dec 2013 19:31:46 +0100 Sebastian Wiesner = wrote: >>>=20 >>> SW> 2013/12/14 Sebastian Wiesner : >>>>> I hope to finish the document by tomorrow evening, and will come = back >>>>> if it's done. >>>=20 >>> SW> I have completed the document now. The final version is to be = found >>> SW> at = https://github.com/flycheck/flycheck/wiki/Flycheck-versus-Flymake. >>> SW> It's a thorough write-up of the differences and similarities = between >>> SW> Flycheck and Flymake, and probably also a comprehensive summary = of the >>> SW> current issues and weaknesses in Flymake. >>>=20 >>> SW> Again, it's probably unfairly biased towards Flycheck. I tried = my >>> SW> best to be neutral, but I consider Flycheck superior and think = that >>> SW> the design and implementation of Flymake are somewhat broken, so = I may >>> SW> have failed to properly account for Flymake's features and = strengths. >>> SW> Please excuse this, and feel free to correct any mistakes I may = have >>> SW> made. >>>=20 >>> SW> Please also suggest improvements, such as additional aspects = which >>> SW> should be covered, or report issues, such as missing details in = the >>> SW> comparsion. >>=20 >>=20 >> You are missing the big think that separates flymake and flycheck. = Flymake uses makefiles, flycheck does not. This means to be able to use = flycheck on a large C/C++ project you have to maintain includes and = defined in both makefiles and as lisp variables for flycheck. Flymake = does not have that problem, you just add one rule for it in the = makefiles, re-using all definitions and include paths. >>=20 >> This is really a showstopper for flycheck, even if it has some nicer = GUI stuff. It is really only usable for small projects. >=20 > You can easily define your own syntax checker: >=20 > (flycheck-define-checker 'c-makefile-checker > :command ("make" "CC=3Dclang" "build") > :error-patterns > ((info line-start (file-name) ":" line ":" column > ": note: " (message) line-end) > (warning line-start (file-name) ":" line ":" column > ": warning: " (message) line-end) > (error line-start (file-name) ":" line ":" column > ": " (or "fatal error" "error") ": " (message) line-end)) > :modes (c-mode) > :predicate (lambda () (not (buffer-modified-p))) >=20 "Easy" is in the eye of the beholder. =20 > The error patterns are for Clang. Adapt the accordingly, if you are > using a different compiler. The predicate makes sure that Flycheck > only uses this syntax checker after the buffer was saved, because > calling out to the build system after every change is probably not a > good idea. >=20 > Then just register the new syntax checker, and disable the built-in > Clang checker to avoid conflicting error messages: >=20 > (add-to-list 'flycheck-checkers 'c-make-file-checker) > (setq-default flycheck-disabled-checkers '(c/c++-clang)) >=20 > Feel free to copy this to your "init.el". >=20 > Flycheck does not include this syntax checker for two reasons: >=20 > - No one contributed it :) > - It's hard, if not impossible, to get this right in a generic way. Yet that is what compile mode tries to do. So use those. >=20 > There is simply no standard for Makefiles and compiler messages, so > Flycheck has no chance to call a Makefile in a portable way, that > works identically across all build systems, from CMake and Autotools, > to custom ad-hoc Makefiles, which don't even use generic rules, to the > strangest and most exotic compiler flags, especially if it does not > want to conduct a full build (which could take minutes, if not ours), > but only a syntax check of the file being edited. >=20 > But again, you know your projects, and nothing stops you from > definining your own syntax checker just for these projects. Try it. > Really. It's easy. I won't bother as you stated that Flycheck won't be part of Emacs. Jan D.