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: Flymake refactored Date: Fri, 06 Oct 2017 23:03:23 +0100 Message-ID: <87wp48x7bo.fsf@gmail.com> References: <87h8vmj3tr.fsf@lolita> <1507138648.1972.0@smtp.gmail.com> <874lre2von.fsf@gmail.com> <87mv566yjx.fsf@udel.edu> <87shex276r.fsf@gmail.com> <87efqh2sud.fsf@udel.edu> <20171006151753.tmdunffovz7olhey@logos.localdomain> <87efqgz2hs.fsf@gmail.com> <20171006212239.lp6ooj5tk5sau2rv@logos.localdomain> 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 1507327451 10134 195.159.176.226 (6 Oct 2017 22:04:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Oct 2017 22:04:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: emacs-devel@gnu.org, Simen =?utf-8?Q?Heggest=C3=B8yl?= , dgutov@yandex.ru, Steve Purcell , sdl.web@gmail.com, monnier@iro.umontreal.ca To: Mark Oteiza Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 07 00:04:05 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 1e0aix-0001l4-ML for ged-emacs-devel@m.gmane.org; Sat, 07 Oct 2017 00:04:03 +0200 Original-Received: from localhost ([::1]:47295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0aj5-0000xB-7j for ged-emacs-devel@m.gmane.org; Fri, 06 Oct 2017 18:04:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0aiT-0000wv-Iq for emacs-devel@gnu.org; Fri, 06 Oct 2017 18:03:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0aiO-0008Lm-M6 for emacs-devel@gnu.org; Fri, 06 Oct 2017 18:03:33 -0400 Original-Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:53013) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0aiO-0008LM-FN for emacs-devel@gnu.org; Fri, 06 Oct 2017 18:03:28 -0400 Original-Received: by mail-wm0-x22f.google.com with SMTP id k4so10551228wmc.1 for ; Fri, 06 Oct 2017 15:03:28 -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=tcV48hJCw7YzJFf8HnATuiYuG97b2BskTPUwj5rV3FA=; b=cUANN1a22scpFILyvndZq/Xiypw3SVaFysJYf6DAJPCQYPmigblzG4QFySfSuaPOEG 5NDNyXj2ks+u9zQivtH26swqwtj0wmla5HJkTCa1vvrqta/SqJtf3w0m+O8G1ZiQ1GwQ O0SkAPxHu5wzbICA7oM624OiId46oO34JTuHb1BjO4dKX36h9Hdl0qWoy/AZxGMuns08 CI8hYf1NMlXaBifVEpHWLyhK9FdyL1DcC7FyDrCm2+ICpQY6/PdSKQFU1pYrbey+qkjD UNda8uqFCbtYAXPD6drmR3hJzrlh13ktY/SKYP7XRyAy1WNJjA2hHEzD1A2uAAhfhE24 aSeQ== 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=tcV48hJCw7YzJFf8HnATuiYuG97b2BskTPUwj5rV3FA=; b=jf0ib8Sx4F1LisvZMk1rmO50b1RFnwVYVy+OgOk6auoWWqnznva1bYYSvF89WYMr/z au40JlcsSuiiz3iYt7SA6umTA3aISGq9AegpTZpLG0Ip6gEqpqGxOXwRv7Y1qFiysv/3 /2dEVcYJ6sDQKBQj8b2nK2eba2JgxpV6iJnjd/i4/9kdmaffjL2GZN4h9uS4OgUvNhRt DyJFmubUsz0qU6dfgdtKefUSPo1NBrG3CfiQMvnRVTa4lPaRgdJnBYmjQy0QFSe4oDeT ojtbs42d3NWNInyYZpTtG/bdykT14JRznycEHIz4p5eVE9suSo4r0nYcj+MMFnKtGFus 2laQ== X-Gm-Message-State: AMCzsaWUIVj+l7G6xctqQjX6vKyMUZPMYDrMlUeB5m9dXTv4lrGiUyLP UeAbxW0sO2XbS95gWdrL6Mw= X-Google-Smtp-Source: AOwi7QDFjaCBLrIJrRrlFUHxURXkmXop40KsV8DscTla0VYBuBCwwgSbA2jsvLJMVccGgI1eDrc0bA== X-Received: by 10.223.157.205 with SMTP id q13mr3223158wre.102.1507327407294; Fri, 06 Oct 2017 15:03:27 -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 l4sm1019338wrb.74.2017.10.06.15.03.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Oct 2017 15:03:26 -0700 (PDT) In-Reply-To: <20171006212239.lp6ooj5tk5sau2rv@logos.localdomain> (Mark Oteiza's message of "Fri, 6 Oct 2017 17:22:39 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22f 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:219213 Archived-At: Mark Oteiza writes: > but perhaps there is a downside to this beyond possibly needlessly doing > a lot of derived-mode-p checks while running through the hook. Yes, it's repeating what mode hooks are supposed to take care of. Stefan and I discussed it during the initial review. In the end he convinced me, and I removed the derived-mode-p in elisp-mode.el But I can understand the akwardness you are experiencing. It is because you are forced to use hooks inside hooks.=20=20 A global blacklist is less bizarre but still confusing if you just know about flymake-diagnostic-functions. What about taking advantage of the fact that erroring backends disable themselves with this fun hack? (defun blacklist (&rest _args) (error "blacklisted")) =20=20=20=20 (advice-add 'elisp-flymake-checkdoc :around 'blacklist) (advice-remove 'elisp-flymake-checkdoc 'blacklist) ; regret it >> * flymake-no-changes-timeout (set to nil to disable automatic idle-check= ing) >> * flymake-start-syntax-check-on-find-file >>=20 >> The "on save" behaviour isn't very easy to configure yet. The names >> aren't brilliant, they're inherited from old Flymake. > > Oh ok, thanks. I missed the latter two variables. I thought you were going to ask for per-backend values. In that hypothetical case, then I guess these varaibles could also take on functions of a single argument as values. The argument would be the backend and the return value would be used. Kinda tricky (but not impossible) for flymake-no-changes-timeout though (perhaps only nil/non-nil should be allowed for that one.) Jo=C3=A3o