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: Three Flymake backends Was Re: Two issues with the new Flymake Date: Sun, 05 Nov 2017 13:22:59 +0000 Message-ID: <87zi80rhak.fsf@gmail.com> References: <87k1z7adxi.fsf@metapensiero.it> <87po8zrubl.fsf@gmail.com> <87a800swy5.fsf@gmail.com> <04d1a3b5-9651-c46d-0e3b-7e1c858cda02@yandex.ru> 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 1509888199 32194 195.159.176.226 (5 Nov 2017 13:23:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 5 Nov 2017 13:23:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: Mark Oteiza , Lele Gaifax , Stefan Monnier , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 05 14:23:15 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 1eBKtN-0007wW-Ds for ged-emacs-devel@m.gmane.org; Sun, 05 Nov 2017 14:23:13 +0100 Original-Received: from localhost ([::1]:44280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBKtT-0002M3-3B for ged-emacs-devel@m.gmane.org; Sun, 05 Nov 2017 08:23:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBKtJ-0002Lu-Ob for emacs-devel@gnu.org; Sun, 05 Nov 2017 08:23:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBKtE-0007gv-R5 for emacs-devel@gnu.org; Sun, 05 Nov 2017 08:23:09 -0500 Original-Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:53295) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eBKtE-0007gT-KE for emacs-devel@gnu.org; Sun, 05 Nov 2017 08:23:04 -0500 Original-Received: by mail-wm0-x22e.google.com with SMTP id r196so9340587wmf.2 for ; Sun, 05 Nov 2017 05:23:04 -0800 (PST) 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=8j8Ou6maVwaWsJ+O5s0VnQEFNFqsogeYkI+p1pOB5rQ=; b=rU1sCc7RBqI2iXUYnb1Gohsn4PoaTfh/vlhZgo2OOkh+UFwnxtpH2p7F4uNpi46skC RQgEnPeFkxUthQJC6WGGAyPa5j6G/mM7+1DRPzCEn82grRFZW9tmdJ9x9msfNQcmzyK+ xhHIRa1klyUFmS8Q+PX//iL6xX8+TVBSNRUNemxGj+YQwFYR73Nqt2lsWNAAjqpwFLgs DDhG56l1WkjzYeW94lB9ET5yV/nn6R63pJKqZJBdHfSPISBSNx3lWtKZjvyPuumYsU09 1EDJdHmwFDWUUNGJr3C2u2rZWhPzrRJCIyLS0L6ZsASYWYSVxKFhCA47QNupESHIst2D gfSw== 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=8j8Ou6maVwaWsJ+O5s0VnQEFNFqsogeYkI+p1pOB5rQ=; b=CPt+eNnLkkjYf5wxk0OCzsNC9ScYeaQM307U99KwL+LjrhLZLft07Ym+aSfs1J8uQF sHNTkI/Zu80cu0MJw0DBSVWWi37PID/khX8oJN+gBjMq9wglZe1WB7/pTk3erDmwdCFn a77yFpVHqRDq2gnDJ+7yWWxARuYkYPn1ApUgScMVswsNxE4ZrP8Nw/54XrZgdohPPU8/ pPX/kU09klSaKeOCFXlCXGDPCY181lTSjr8rWufoL2YjkE8gsXTIa7AVWCckxJ0rK2xl gueA2nJRuig9DgeDecFVLwkGLYXAHyngNz++yjGaYSEJD3q9Ouw3fVBSO0dPbfeeHIlB kjhQ== X-Gm-Message-State: AMCzsaUAxWTpsjgUy4yvKnxVzeLkUcOrmAvDvCerGkqEPrlCmINa8uXQ KWQk5wbRFoauKPqQ0/d8PG/gwP+f X-Google-Smtp-Source: ABhQp+S3MJC9zEdYALCuRbOk+J5Qe4+mnuYi2JALs669pVfDtoUArHKQ3FFlW8fkjCyfDxypnNEKpw== X-Received: by 10.80.206.13 with SMTP id y13mr16301618edi.64.1509888183368; Sun, 05 Nov 2017 05:23:03 -0800 (PST) Original-Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id c34sm11053165ede.84.2017.11.05.05.23.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2017 05:23:02 -0800 (PST) In-Reply-To: <04d1a3b5-9651-c46d-0e3b-7e1c858cda02@yandex.ru> (Dmitry Gutov's message of "Sun, 5 Nov 2017 15:04:49 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22e 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:223436 Dmitry Gutov writes: > On 11/5/17 2:59 PM, Jo=C3=A3o T=C3=A1vora wrote: > >> Oops. But I've just pushed the correct set emacs-26 if you want to have >> a look now. > > Thanks! Now we have a backend for 'ruby -w', that's great, but Rubocop > has become a pretty essential tool in Ruby world. For our team, at > least. > > So sooner or later we'll need a backend for it too, for parity with > Flycheck. I think the doors are still open for the "sooner" case :-) I don't have rubucop, but defining new backends of the "feed-to-stdin-then-parse-with-regexp" type is really easy (and of really verbose, but we're trying to fix that) >>>> So I'm thinking that, for master (_not_ emacs-26) we could use a >>>> declarative flymake-define-simple-backend macro. >>> Why not make it a function? From what I can see, the usage will just >>> have to quote the first two arguments. >> >> Because the macro defines a new function. > > Ah, yes. It would have to use 'eval' in that case. > > Although the other option, I think, is for the said function to return > a lambda. The return value could be used with `defalias' or with > `add-hook' directly. All of this is more verbose than the relatively standard way of using "define" macros. And add-hook for lambda's is not very nice imo because there isn't a easy way to remove-hook afterwards. In the future, remove-hook with a cl-like KEY arg and a working pair of function-get/function-put could change that though...