From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Strange use of (run-with-timer 0 nil #'foo args) in do-after-load-evaluation Date: Sat, 26 Oct 2019 08:41:27 -0400 Message-ID: References: <20191026101407.GA17424@ACM> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="29876"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 26 14:42:12 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iOLOU-0007dv-I5 for ged-emacs-devel@m.gmane.org; Sat, 26 Oct 2019 14:42:10 +0200 Original-Received: from localhost ([::1]:39974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOLOT-0003MO-Da for ged-emacs-devel@m.gmane.org; Sat, 26 Oct 2019 08:42:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40397) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOLNu-0003Ii-BS for emacs-devel@gnu.org; Sat, 26 Oct 2019 08:41:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOLNs-000270-6N for emacs-devel@gnu.org; Sat, 26 Oct 2019 08:41:33 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19729) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOLNs-00026Z-06 for emacs-devel@gnu.org; Sat, 26 Oct 2019 08:41:32 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 85559449435; Sat, 26 Oct 2019 08:41:30 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6FCEC449430; Sat, 26 Oct 2019 08:41:29 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1572093689; bh=k0Itx8hn7T38YnYamQnJyGI83wKkly495XeZP8Ut2R8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=P7PyhesaoJdPOvSUTaRoROvu4trmVX6nERKlFwH0OFlaH5afOu9Kk+EdisIj3oiZc WXubfDUXQjZABCdL0XEp66hJX424O36yZuoC/dTnaJ9njgO2ENLrdj4y4LJX79xho7 54raGwwPC3C1zKY0Eyeq3/jqbi1JO3TvoVrJa78Z6yCUf1W/rIJh/ODfcWvzov+MCk JIpHViu/IzBliduMJIlvGo0v/ZqGwdq//ZQEiNOYujDWWogOajeGl4m5DcseM7SYaS E9C3XDjak0z8TGbfKqEMPTRt7UytaA3jVx23LeT7YJMZn+fTB/9bwI2/orvPSF1EDx AkBB4Da4QGEDw== Original-Received: from pastel (unknown [216.154.30.71]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3331B1202A4; Sat, 26 Oct 2019 08:41:29 -0400 (EDT) In-Reply-To: <20191026101407.GA17424@ACM> (Alan Mackenzie's message of "Sat, 26 Oct 2019 10:14:07 +0000") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:241448 Archived-At: > (run-with-timer 0 nil > (lambda (msg) > (message "%s" msg)) > msg) > > run-with-timer is being used to run message once, immediately. > Why not just call message? Good question. It's been that way since commit 5766c380eec20a19844253cbb511922b6c70fc0b Author: Stefan Monnier Date: Sat Sep 12 03:35:40 2009 +0000 * lread.c (Fload): Don't output a message after loading an obsolete package any more (done in Lisp now). * subr.el (do-after-load-evaluation): Warn the user after loading an obsolete package. but I can't see any trace of an explanation nor can I find it in my memory. > What is going on, here? Is the run-with-timer mechanism being used > deliberately to make the "deprecated" message prevail over other > messages? That's my best guess, yes. > The current situation seems unsatisfactory; the prompt from > hack-local-variables is more important than the deprecation message, > and shouldn't be obscured by it. It's a kind of general problem with messages, indeed. Stefan