From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Three Flymake backends Was Re: Two issues with the new Flymake Date: Mon, 13 Nov 2017 02:23:04 +0200 Message-ID: References: <87k1z7adxi.fsf@metapensiero.it> <87po8zrubl.fsf@gmail.com> <87a800swy5.fsf@gmail.com> <04d1a3b5-9651-c46d-0e3b-7e1c858cda02@yandex.ru> <87zi80rhak.fsf@gmail.com> <829794de-27ca-383e-2b3a-a5bc4405581b@yandex.ru> <87k1z4qvv5.fsf@gmail.com> <8760anrb4t.fsf@gmail.com> <531f8110-5207-0e40-aa24-0ddc1abb8c08@yandex.ru> <871slbr7ft.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1510532609 17695 195.159.176.226 (13 Nov 2017 00:23:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Nov 2017 00:23:29 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 Cc: Mark Oteiza , Lele Gaifax , Stefan Monnier , emacs-devel@gnu.org To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 13 01:23:17 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 1eE2Ww-0003id-87 for ged-emacs-devel@m.gmane.org; Mon, 13 Nov 2017 01:23:14 +0100 Original-Received: from localhost ([::1]:51703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eE2X1-0003DW-Rw for ged-emacs-devel@m.gmane.org; Sun, 12 Nov 2017 19:23:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eE2Wu-0003DF-Jx for emacs-devel@gnu.org; Sun, 12 Nov 2017 19:23:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eE2Wr-0005lo-G5 for emacs-devel@gnu.org; Sun, 12 Nov 2017 19:23:12 -0500 Original-Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:40148) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eE2Wr-0005le-9z for emacs-devel@gnu.org; Sun, 12 Nov 2017 19:23:09 -0500 Original-Received: by mail-wm0-x22c.google.com with SMTP id b189so4963251wmd.5 for ; Sun, 12 Nov 2017 16:23:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3r7JQb1xwQGUbD904wVkSXaCOl98TX7Itq8C+83AM/Q=; b=Zu0TYrZVs5yHrVlJ6XK5XF+qR/5faDN9Az3uybdzgExd/2drJNqgPTmO86mRZ4t8iJ kM/pwtLmha510DcdMlGt7OwAjeJd4l3WxyYmvrJxWfylk/Mm3JXj56Q63vxM/H4Z2tGn rd2+AhXoXG2LMcbPiTT1MiP3pJLhTOkeVGG14o/vR7duWDYqQS5nLBW1e15nWGAMMNjk 6J2q6IvQCX/e6pgLgjDh4+HaIsZ90xqPRYmg/j9I/h6jKa28GMvTw2mKgxYLB4KWWCsK BsNiRUIZjtsP06w+KPqlDpcEfzt4jLzW64eW4Jr6nKBtPlNOfMnv4nDJqDCmGzz1sZ3G /7jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3r7JQb1xwQGUbD904wVkSXaCOl98TX7Itq8C+83AM/Q=; b=l2HEQ6PIuEDfUii+aJPuAecVs6VULRsr2fQHzBvk8H/sMFfL1akWeJsem4HxoSPJOn hVyUBF73tMe7kUB8FAUWNat2TIML30EcXpy2BO7hdV016UN6xnLKJilo5zNacEjMJaeC Ikm+TxPxHCPMGEerhfwt6R5U8wgGd5N/HrlNSgIepR/uSm0s7g1P9J5vaABhLg9nnGAL Xep4ytpo2V88aKfJnoUVqR1ZUwNC4cpnXis/l6oQq1QKJvJEAE1AGloc7uUFDWxCn8vi Rztc0S5PfcklQaQHPdhkBNEfQ2OJBEaKQ6iYE8AXEm+DVgXL5jIHpUvIwuT+v0ib0r2b 6w1g== X-Gm-Message-State: AJaThX59l1o1YMZu2UxwXrVVZdaEC/YbncJd9FlAVJBFNJnsf2Gt/BAG FHLrmyVHjp2+jwaJeSamfFfwT37v X-Google-Smtp-Source: AGs4zMZ0E7bjl/fUM7OhVR1xDn2wr49THbTN+E5mDwc6TIKQ614es0/gsnKcyJsEXEOQSz2WI2y0XA== X-Received: by 10.28.12.193 with SMTP id 184mr5759736wmm.70.1510532588048; Sun, 12 Nov 2017 16:23:08 -0800 (PST) Original-Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id x142sm5922347wme.34.2017.11.12.16.23.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Nov 2017 16:23:07 -0800 (PST) In-Reply-To: <871slbr7ft.fsf@gmail.com> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22c 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:220120 Archived-At: On 11/6/17 1:08 PM, João Távora wrote: > Then probably a good idea to do what flycheck does because gremlins. Sure. >>> Hey I didn't spend more than 5 minutes with it :-) >> >> However long, I'm glad you did. Now, the version I've sent is pretty >> much working. >> >> Will you push it to emacs-26? > > I think you should test it a tiny bit more and then you push it :-) It seems to be working well, but I'm getting bogged down by minor details. Do we add defcustoms for the program name and the config file name? Do we really need the ruby-flymake-command defcustom? I doubt there is an alternative program that gives the same output as 'ruby -wc'. >> Where will it live? > > ruby-mode.el so it at least locally shares some code with ruby-flymake. OK, code sharing will be step two. >> How/when will Flymake choose between rubocop-flymake and ruby-flymake? > > Flymake can use both at the same time. Just > > (add-hook 'flymake-diagnostic-functions 'ruby-flymake nil t) > (add-hook 'flymake-diagnostic-functions 'rubocop-flymake nil t) > > The user can remove-hook if he wants to. > > If rubocop does everything "ruby -w" does and more, It does. > then maybe a single > backend. One that uses a ruby-flymake-use-rubocop-if-available > defcustom, and then checks for (executable-find "rubocop"). Do we check for (executable-find "rubocop") once inside the major mode function, or every time the checker is called? In the latter case we'll have a function ruby-flymake-auto calling one or the other.