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: [Emacs-diffs] master 934a72c: User can specify files never subject to flymake. Date: Fri, 03 Nov 2017 18:50:27 +0000 Message-ID: <878tfntcwc.fsf@gmail.com> References: <20171101134009.18554.21992@vcs0.savannah.gnu.org> <20171101134010.1A70A209B1@vcs0.savannah.gnu.org> 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 1509735049 26922 195.159.176.226 (3 Nov 2017 18:50:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 3 Nov 2017 18:50:49 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: emacs-devel@gnu.org To: Sam Steingold Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 03 19:50:45 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 1eAh3B-0006Jp-Lw for ged-emacs-devel@m.gmane.org; Fri, 03 Nov 2017 19:50:41 +0100 Original-Received: from localhost ([::1]:38052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAh3I-0001ir-Ih for ged-emacs-devel@m.gmane.org; Fri, 03 Nov 2017 14:50:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAh34-0001gA-Pt for emacs-devel@gnu.org; Fri, 03 Nov 2017 14:50:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAh31-0000FH-O4 for emacs-devel@gnu.org; Fri, 03 Nov 2017 14:50:34 -0400 Original-Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:53069) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eAh31-0000EV-BG; Fri, 03 Nov 2017 14:50:31 -0400 Original-Received: by mail-wm0-x231.google.com with SMTP id t139so3475225wmt.1; Fri, 03 Nov 2017 11:50:31 -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=9nvGGvRR/t78JKZtj1xfgdjsyIh0CmLAszuS7AcNpao=; b=GPkdNrNBJiopK5tb0o70e9kflyFb2Yfikq2zdaPSlHmccJVwjk4/DvNQ5H20D7MOZs h4Iqg1ZOJGddmHjmA8WOzv3EC+PFKn9/f3DeB9Fai1pixl+9gG70ADAnd6Fo7mdWwffI mhQydcJcJkgl7ig5d08Z8QhDJa83XNmM4JTj7gZAI6lvaG0UoHP2Mpx574dAW25BYcTk M/AvkhIvDnC6Rt9OBYsDhzKztzDCr+BJSln2KOpdkqHgZmSyNan8HJ+UwuJc5G3t2QU/ oKAj/ELxK+XsbvQcAT+KWu0xr4JI54Xnh6tPFhd37kYSVWSZkuQHQpLqS+n/GPDW81xv c41w== 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=9nvGGvRR/t78JKZtj1xfgdjsyIh0CmLAszuS7AcNpao=; b=sKofT00DxHB9FDkgqdf8vP2l4nWJ7PuamSeksxfH4qxFl7X2eLI9B1iI5A49cFg6f2 1aivg7sEZUfQ2tuSe2QrIEHSoOAzsJbEe0tPrKjM7VMG3RwI53cBkSjEoIdc9/yBOvzd AJPXS1Z1JBhtweM4VfAqAeEh82vOlt1PwRVYe3rbeOkX0pBv3S6PHIKawzQuwhzrhwtV Jksb4itpMEIoICl79lH146kussdJuot/ARLKyZ9Z9MjsHEoKDdFnOl0+uIL/KvAjOHnx YWKsJzksdajVCUFg8Ndd7Hu1M8G0h5j2G23zagM+BNNsRgOZo+PWUxLv+kqIjP7kEdJC IwtA== X-Gm-Message-State: AMCzsaWRH6cuaeQcqEpcqdc+Fvn7OxhBH/Wy7IqlVVigcxfIDsD5bkvu qncAojtbWONUqkFzOhz9VX2j77FMkVg= X-Google-Smtp-Source: ABhQp+Rid5CCnTPKDrFHrWk9rLm7rOg22VJhZ57G2nCvcWbWcqlaHW0z9JCk/mAJaiFUV3k3xs8u1w== X-Received: by 10.80.166.3 with SMTP id d3mr10131952edc.96.1509735029810; Fri, 03 Nov 2017 11:50:29 -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 v32sm6355264edm.76.2017.11.03.11.50.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Nov 2017 11:50:29 -0700 (PDT) In-Reply-To: (Sam Steingold's message of "Fri, 03 Nov 2017 11:50:54 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::231 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:219897 Archived-At: Sam Steingold writes: >> * Stefan Monnier [2017-11-02 16:59:23 -0400]: >> >>>>> * lisp/progmodes/flymake-proc.el (flymake-proc-ignored-file-name-rege= xps): >>>>> Add user customization option. >>>> Shouldn't this be in flymake.el and apply to all flymake backends >>>> rather than only those using flymake-proc? >>> You might be right, but I don't see any place in flymake.el where file >>> names are processed. >> >> Hmm... indeed. I guess the right thing depends on what's the use-case. >> Could you describe the kind of situation in which you need >> flymake-proc-ignored-file-name-regexps? > > I have files scratch.py which are somewhat like a poor man's notebook, > with random snippets of code which persist from session to session. > flymake using pylint will flag most lines in such files. > > So I have this in my .emacs: > > (eval-when-compile (defvar flymake-proc-ignored-file-name-regexps)) > (eval-after-load "flymake" > '(add-to-list 'flymake-proc-ignored-file-name-regexps '"/scratch")) [Curious, why do you the defvar? Is the FORM of eval-after-load byte-compiled?] Such a facility to disable flymake could be in flymake.el, but perhaps it is better if it was already elsewhere in Emacs. A file-local or dir-local variable seems most logical, and setting flymake-diagnostic-functions to nil appears to work (minus the fact that it complains to be risky even for nil values, which could I think be changed). Personally, I would set this variable in my mini-python-scratchpads. But if you must do this by filename matching, I wonder if dir-local variables allows that, or if even if we could conjure up some type of regexp-local variables. Jo=C3=A3o