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: Silent autoloading Date: Sun, 09 Nov 2008 20:51:06 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226281897 25757 80.91.229.12 (10 Nov 2008 01:51:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Nov 2008 01:51:37 +0000 (UTC) Cc: rgm@gnu.org, michael.albinus@gmx.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 10 02:52:39 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KzLx8-0003p3-0k for ged-emacs-devel@m.gmane.org; Mon, 10 Nov 2008 02:52:32 +0100 Original-Received: from localhost ([127.0.0.1]:38099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzLvz-0002iU-Ed for ged-emacs-devel@m.gmane.org; Sun, 09 Nov 2008 20:51:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzLvw-0002iO-9y for emacs-devel@gnu.org; Sun, 09 Nov 2008 20:51:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzLvv-0002iC-0g for emacs-devel@gnu.org; Sun, 09 Nov 2008 20:51:15 -0500 Original-Received: from [199.232.76.173] (port=51659 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzLvu-0002i9-Ol for emacs-devel@gnu.org; Sun, 09 Nov 2008 20:51:14 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:62666 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KzLvp-0007yN-K0; Sun, 09 Nov 2008 20:51:09 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArMEANshF0lFxLQU/2dsb2JhbACBdsYfg1iBEQ X-IronPort-AV: E=Sophos;i="4.33,571,1220241600"; d="scan'208";a="29598203" Original-Received: from 69-196-180-20.dsl.teksavvy.com (HELO ceviche.home) ([69.196.180.20]) by ironport2-out.teksavvy.com with ESMTP; 09 Nov 2008 20:51:06 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 1BEADB44C3; Sun, 9 Nov 2008 20:51:06 -0500 (EST) In-Reply-To: (Eli Zaretskii's message of "Sun, 09 Nov 2008 20:54:44 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:105519 Archived-At: >> > Maybe Tramp is a large package, but then "C-x C-f" is a very >> > frequently used command. >> Ah, yes, I see that for Tramp indeed. >> How 'bout making Tramp output something before loading itself? > I don't mind, but are we going to hunt down every slow-loading package > and add a message to them as well? > Why not the other way around: re-enable the "Loading..." messages by > default and introduce a variable to suppress it? Then Lisp code that > needed this to be turned off (something with timers, IIUC) could > simply bind that variable to an appropriate value when doing > its thing. No Lisp code needs it to be turned off. It's just off because there's no clear reason to have it turned on in most cases, and in some cases those messages are annoying. You're complaining about Emacs freezing for a little while without giving any clue to the user about what's going on. That's indeed a problem. But this rarely happens for autoloading, and in many cases it happens independently from autoloading. Maybe the right solution is to link this to the hourglass-mouse-cursor: have a global variable busy-message, and when the hourglass timer expires, not only we should change the mouse-cursor to an hourglass, but we should also output the message currently stored in `busy-message'. This way, loading a file could set this var to "Loading ..." and if the loading takes a while (and only in this case), you'd get the relevant message. This would happen to work for autoloading as well as for `require' and any other way to load a file. And it could be used in other situations (e.g. "Building completion table..."). Stefan