From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: tabulated-list-revert runs hook before re-printing the table Date: Sun, 14 Sep 2014 18:43:58 -0400 Message-ID: References: <90477E42-EBBE-4EA6-A680-7D90591C12B7@lunaryorn.com> <65EA8A31-5D40-406D-86C1-82390C560E11@lunaryorn.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1410734666 16026 80.91.229.3 (14 Sep 2014 22:44:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Sep 2014 22:44:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sebastian Wiesner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 15 00:44:19 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XTIWo-0008U6-Su for ged-emacs-devel@m.gmane.org; Mon, 15 Sep 2014 00:44:19 +0200 Original-Received: from localhost ([::1]:56418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTIWo-0008Fz-FX for ged-emacs-devel@m.gmane.org; Sun, 14 Sep 2014 18:44:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTIWe-00082k-T0 for emacs-devel@gnu.org; Sun, 14 Sep 2014 18:44:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTIWX-0001g6-D3 for emacs-devel@gnu.org; Sun, 14 Sep 2014 18:44:08 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:7049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTIWX-0001g2-9y for emacs-devel@gnu.org; Sun, 14 Sep 2014 18:44:01 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFpZEG/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCwsOJhIUGA0kiAQItAKeFxeOegeEOASUYpQ3gWqDTCE X-IPAS-Result: ArUGAIDvNVNFpZEG/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCwsOJhIUGA0kiAQItAKeFxeOegeEOASUYpQ3gWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="89680237" Original-Received: from 69-165-145-6.dsl.teksavvy.com (HELO ceviche.home) ([69.165.145.6]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Sep 2014 18:43:59 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id EF2AA660D3; Sun, 14 Sep 2014 18:43:58 -0400 (EDT) In-Reply-To: <65EA8A31-5D40-406D-86C1-82390C560E11@lunaryorn.com> (Sebastian Wiesner's message of "Sun, 14 Sep 2014 22:35:53 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174298 Archived-At: > You mean that a mode derived from `tabulated-list-mode' would add a function > to this hook in order to re-compute `tabulated-list-entries'? That's what it looks like, yes. Try a "grep tabulated-list-revert-hook **/*.el" in Emacs's sources and see for yourself. > Why would a mode do that, rather than just using a function for > `tabulated-list-entries' that directly returns the list of entries? I don't know, but my guess is that it's perceived that tabulated-list-entries would be called too often and would hence be too taxing on CPU resources? > Unrelated to that question, could we have a hook run *after* > `tabulated-list-print' by `tabulated-list-revert'? It would make sense for it to run after-revert-hook, I guess. Stefan