From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: joaotavora@gmail.com (=?utf-8?B?Sm/Do28gVMOhdm9yYQ==?=) Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Flymake support for C/C++ Date: Sat, 14 Oct 2017 17:29:47 +0100 Message-ID: <87d15pk804.fsf@gmail.com> References: <87zi8wmmhw.fsf@gmail.com> <874lr2kr9r.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1507998647 11450 195.159.176.226 (14 Oct 2017 16:30:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 14 Oct 2017 16:30:47 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: Richard Stallman , Noam Postavsky , Reuben Thomas , Sami Kerola , "emacs-devel@gnu.org" , Stefan Monnier , Alan Mackenzie , Eli Zaretskii , "sdl.web@gmail.com" To: guillaume papin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 14 18:30:39 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3PKa-0001VM-U7 for ged-emacs-devel@m.gmane.org; Sat, 14 Oct 2017 18:30:33 +0200 Original-Received: from localhost ([::1]:54564 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3PKi-000110-7F for ged-emacs-devel@m.gmane.org; Sat, 14 Oct 2017 12:30:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3PK3-00010b-Ks for emacs-devel@gnu.org; Sat, 14 Oct 2017 12:30:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3PK2-0007DE-Em for emacs-devel@gnu.org; Sat, 14 Oct 2017 12:29:59 -0400 Original-Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]:53882) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e3PJx-0007AI-Td; Sat, 14 Oct 2017 12:29:54 -0400 Original-Received: by mail-wr0-x22b.google.com with SMTP id y44so2813774wry.10; Sat, 14 Oct 2017 09:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=0rp1jiXfE8WdwY6gh1tQbOxYbu1cHpyY4x2KwqOgKjQ=; b=TROnyoGF5MEc9SkeFU8TjtOnz/ZKRKOTS3U8f0WINQqhnxdqRBLOhNO0A87865bJsc xmqBkoO0csgMSOjQuc5Kf6drhkGRybxGtuENvAg3GNJNoU0M1EqK1TFGcZ6MtxTwGUOM zP5Bq9gIcMBCdWM+ALPbzy7z8cNCbeyEtkAlFwgX8LhhguswXqcVmuR5nJxWOOMiVvIP otft9IcoCJW5gPyQ+MVC3IyA8ScIq6VyKJQ978vWDvumzSvryKRfKYYSuyuj0riY6xEK qE/AsNQ1LziRtGU0Z7ZBtLvMRMwDTajjNxbk6uZAN32UEX+QaxBm4Dv5CR8K9tS0NX9S RsWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=0rp1jiXfE8WdwY6gh1tQbOxYbu1cHpyY4x2KwqOgKjQ=; b=SiheAfgote5iIMX7/rAEyIbZiYxmeAp1kvAlfjD5h8PU8WSs6yOwi0c1xdfG0vFPT9 yMkduX+B1/kwdkKctteT/Xa/FZVfuQfvJL1u4kC84slmloi/lzPrVb9hPMZxCndqkTma DruTk1bmOkgfE8C5JNgrA7hcF/aOETBgnjG2tzO0/f3xvXYlj7B4I+UD9nQ2D7uKxgP8 iO/ElcuzZ0vX++lCXfkplkdH1BtNQuplgLN5HBAlMkejGhgLrbKPRhFPbLHesp/drRSE KI6rAQcM3LlkeYi8j9SlxyAKdWcSXeiuis7J+zXpQ/csPeGTPk9f6fnZz12PyGoT2mgn AWGw== X-Gm-Message-State: AMCzsaX1+bEnt6AWGhjvZyy/9IJvcgad1Ycsf1QOdUwTaTOfqnTpZI1V +BRPuW1vzROMWinr9GjcBgs= X-Google-Smtp-Source: AOwi7QBkNXCbwnt5Pe5BdtkDk9y245vBwIqB6fQvR031gjr+6jvRq2dkXjeXble+PDUUDF7HML6G7Q== X-Received: by 10.223.158.205 with SMTP id b13mr4018426wrf.65.1507998591355; Sat, 14 Oct 2017 09:29:51 -0700 (PDT) Original-Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id x185sm1838495wmx.35.2017.10.14.09.29.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 14 Oct 2017 09:29:50 -0700 (PDT) In-Reply-To: (guillaume papin's message of "Sat, 14 Oct 2017 10:56:10 +0000") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:219523 Archived-At: Hello Guillaume, Reuben, I hope you don't mind that I am replying to you both in the same message. =20=20=20=20=20=20=20=20 Reuben Thomas writes: > On 14 October 2017 at 09:00, Eli Zaretskii wrote: > =E2=80=8BSee > =E2=80=8Bhttp://www.flycheck.org/en/latest/user/flycheck-versus-flymake.h= tml#flycheck-versus-flymake=E2=80=8B That page is now completely outdated. If you have a serious interest in updating it, I can provide you with information about the new Flymake that isn't already in its manual. Otherwise, please don't advertise a misleading comparison. >> don't see why should we object to such an effort, when one of our >> major goals is to provide a modern program development environment. > =E2=80=8BBecause with Flycheck this is already accomplished. I believe it is generally naive to think such a thing. But specifically, I've had a look at flycheck.el and (again, if you are really interested) I am willing to debate why I think parts of its implementation are inferior to my rewrite of Flymake. guillaume papin writes: > flycheck used to invoke Make, at least for checking Makefiles. > However they removed this feature[1], > after user complained about the security implication of invoking Make[2] = [3]. flymake-mode isn't (yet) turned on by default on visiting a file, so I think there aren't these implications yet (I might be overseeing others). > To answer your questions, which weren't addressed to me but I will > share what I know: No problem, this is always welcome. > Out-of-the-box, Flycheck does not seem to infer the flags for GNU Hello. I suppose it's safe to say it doesn't try to infer flags for any project. So here's one (apparently useful) thing that Flymake might do that Flycheck doesn't. My point obviously being that there is no "end of History" for on-the-fly buffer checkers (or for anything by that matter), there are always things to work on. > M-x customize-variable RET flycheck-gcc-args RET can be sufficient, the o= ther options preceded this generic option. > However settings the option per file manually does not really scale > IMHO. In Flymake/Emacs, you would use .dir-locals to set it for the dir. I'd be surprised to learn that doesn't work for Flycheck, too. > Also, many other features would benefit from knowing these That's my idea too. > I'm not sure that the best solution is for flymake to invent it's own > way of getting the compile options. I, on the contrary, am quite sure it is not. But this is precisely the point of Flymake being in Emacs: it means that functionality that begins by being specific to a package can more easily be refactored so it is used by other parts of Emacs. This also works in the reverse direction: Flymake can benefit early from improvements done to other parts of Emacs. Perhaps Flymake will take earlier advantage from improvements to project.el backends (which are, in my opinion, the natural place for such a flag-guessers to live). And Flymake can be the catalyst for improvements to other packages, like checkdoc or Flyspell, to name just two. Finally, being in Emacs also means it gets the care and attention of a very talented group of programmers that share the common goal of improving GNU and Emacs as a whole. Jo=C3=A3o