From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Pierre Neidhardt Newsgroups: gmane.emacs.bugs Subject: bug#27502: 25.2; auto-revert adds lambda to find-file-hook Date: Mon, 26 Jun 2017 20:53:19 +0100 Message-ID: <20170626195319.GA868@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1498506868 27275 195.159.176.226 (26 Jun 2017 19:54:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Jun 2017 19:54:28 +0000 (UTC) User-Agent: Mutt/1.8.3 (2017-05-23) To: 27502@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 26 21:54:23 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 1dPa5U-0006e8-FD for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Jun 2017 21:54:20 +0200 Original-Received: from localhost ([::1]:48272 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPa5Z-0005M4-Im for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Jun 2017 15:54:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPa5F-0005Dn-6f for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 15:54:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPa5C-0004Xm-6t for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 15:54:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36816) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dPa5C-0004Xd-37 for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 15:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dPa5B-0000R3-TR for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 15:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Jun 2017 19:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27502 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: GNU Emacs bug Tracking System Original-Received: via spool by submit@debbugs.gnu.org id=B.14985068161633 (code B ref -1); Mon, 26 Jun 2017 19:54:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Jun 2017 19:53:36 +0000 Original-Received: from localhost ([127.0.0.1]:39492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPa4m-0000QH-2d for submit@debbugs.gnu.org; Mon, 26 Jun 2017 15:53:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPa4l-0000Q5-5G for submit@debbugs.gnu.org; Mon, 26 Jun 2017 15:53:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPa4e-0004G9-TN for submit@debbugs.gnu.org; Mon, 26 Jun 2017 15:53:29 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58712) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dPa4e-0004G1-Pg for submit@debbugs.gnu.org; Mon, 26 Jun 2017 15:53:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPa4d-0005CB-FM for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 15:53:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPa4a-00049a-F8 for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 15:53:27 -0400 Original-Received: from mail-wr0-x233.google.com ([2a00:1450:400c:c0c::233]:36307) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dPa4a-00048y-8D for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 15:53:24 -0400 Original-Received: by mail-wr0-x233.google.com with SMTP id c11so149539776wrc.3 for ; Mon, 26 Jun 2017 12:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=qTWoUf/RfAa+EAB+fBm8cZdxkJ2fpKQF9ivb4hrjVUc=; b=nAnGjyhFsWw4ph9Js9GvMW88uD5GcDT2tQfR+Oms9pKFpTKSidJ3v3PYfHiLa2tpk7 BKMmgSBdeXwZvwTW2QF2eJKcxa2D5Snfi7S2iQJnZjKWQsHtlm09iPh2lUA3lKOpgMHK iCnISzcFA4kQS+ngKFwg1IJSmBeu4foxywtdOX0zd2CECBLOYVxz8YEXAl3t94RA1u1I i0uwXVv9IdlGviFmc44E9yScm0rUFcjNmwaJ9c/qChtdQ91dhx1iml3ra0P9l/vTm4Fn mrD6i9jYcazw9YrktZUoVvuAa1J5/MyjXZ4z6nLEU6RpIBpCI3wByg+iikvyMDwXj25X xKWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=qTWoUf/RfAa+EAB+fBm8cZdxkJ2fpKQF9ivb4hrjVUc=; b=qGdwhO1vRmwA6caoYRvTytl3jpNL3R1n+nZRUwl45y9My6rq1CoPlFxJqMCQkikv0l l+rCVq8YnFL2u6TrT/M379QybZ2+IxIwgegVFMmw3KBrMQrAFhyPdaI7itpqxnIFMHAJ yrtfMpmTRAMtho4NZer2ZDTIyI6uugjMwV0GRfi2GYrta7HFHw3sCOWECjmyrq8/llJo KjSmolTd37KYSElJHGx+vYI9cm271domOU2xsYdDbZTEwY9zWHASrGqwuWraZJh8rcar r109DEB0QmVVHCP7HTghxDeLpjrb3XBSVbR1hMGkDBEanswCfxWYkNpLmILx5afIqHaK dTNw== X-Gm-Message-State: AKS2vOz2KnSAU3IwgAbVun8B8MJS+aWA0VKWRjoREnFsYnmIND8co8d9 IliiMEOt5Ubzc1Ef X-Received: by 10.223.153.114 with SMTP id x105mr15585647wrb.18.1498506801241; Mon, 26 Jun 2017 12:53:21 -0700 (PDT) Original-Received: from gmail.com ([196.203.31.130]) by smtp.gmail.com with ESMTPSA id t136sm430354wmt.12.2017.06.26.12.53.20 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jun 2017 12:53:20 -0700 (PDT) Content-Disposition: inline X-Info: Simplicity is the ultimate sophistication. X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:133935 Archived-At: 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. In GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.10) of 2017-04-22 built on juergen Windowing system distributor 'The X.Org Foundation', version 11.0.11903000 System Description: Arch Linux