From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#27502: 25.2; auto-revert adds lambda to find-file-hook Date: Sun, 02 Jul 2017 11:45:17 +0200 Message-ID: <87tw2vw4sy.fsf@detlef> References: <20170626195319.GA868@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1498988782 13971 195.159.176.226 (2 Jul 2017 09:46:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 2 Jul 2017 09:46:22 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27502-done@debbugs.gnu.org To: Pierre Neidhardt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 02 11:46:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1dRbSA-0002wT-MS for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Jul 2017 11:46:06 +0200 Original-Received: from localhost ([::1]:57345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRbSG-0004fX-2m for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Jul 2017 05:46:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRbS9-0004e5-NX for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2017 05:46:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dRbS6-0003E1-M3 for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2017 05:46:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45488) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dRbS6-0003DY-IZ for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2017 05:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dRbS6-0004Io-8w for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2017 05:46:02 -0400 Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Jul 2017 09:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 27502 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 27502@debbugs.gnu.org, michael.albinus@gmx.de, ambrevar@gmail.com Original-Received: via spool by 27502-done@debbugs.gnu.org id=D27502.149898872716491 (code D ref 27502); Sun, 02 Jul 2017 09:46:02 +0000 Original-Received: (at 27502-done) by debbugs.gnu.org; 2 Jul 2017 09:45:27 +0000 Original-Received: from localhost ([127.0.0.1]:48165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRbRX-0004Hv-Ey for submit@debbugs.gnu.org; Sun, 02 Jul 2017 05:45:27 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:54864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRbRV-0004Hh-E6 for 27502-done@debbugs.gnu.org; Sun, 02 Jul 2017 05:45:25 -0400 Original-Received: from detlef.gmx.de ([79.140.123.253]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MUI8w-1dJJz21Q02-00R14h; Sun, 02 Jul 2017 11:45:18 +0200 In-Reply-To: <20170626195319.GA868@gmail.com> (Pierre Neidhardt's message of "Mon, 26 Jun 2017 20:53:19 +0100") X-Provags-ID: V03:K0:ATChNbL49Py30Ln6SFJfcPMGO3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+HEIijs X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134089 Archived-At: Version: 26.1 Pierre Neidhardt writes: Hi Pierre, > It seems that autorevert.el:316 adds a lambda to `find-file-hook': > > (add-hook 'find-file-hook > (lambda () > (setq-local auto-revert-tail-pos > (nth 7 (file-attributes buffer-file-name))))) > > It's bad practice to add lambdas to hooks as it makes it harder to remove them. > We should use a named function instead. I've fixed this (and a similar problem with `kill-buffer-hook') in the trunk. Best regards, Michael.