From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: delayed-warnings-hook versus deferred-action-function Date: Wed, 8 Feb 2012 05:28:35 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1328675384 26966 80.91.229.3 (8 Feb 2012 04:29:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Feb 2012 04:29:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 08 05:29:44 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RuzA6-0002S9-UX for ged-emacs-devel@m.gmane.org; Wed, 08 Feb 2012 05:29:43 +0100 Original-Received: from localhost ([::1]:55735 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuzA6-0006ez-8N for ged-emacs-devel@m.gmane.org; Tue, 07 Feb 2012 23:29:42 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:34635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuzA0-0006eJ-Sk for emacs-devel@gnu.org; Tue, 07 Feb 2012 23:29:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ruz9t-0008WI-AX for emacs-devel@gnu.org; Tue, 07 Feb 2012 23:29:36 -0500 Original-Received: from mail-pw0-f41.google.com ([209.85.160.41]:46395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ruz9g-0008RJ-81; Tue, 07 Feb 2012 23:29:16 -0500 Original-Received: by pbcwz17 with SMTP id wz17so234508pbc.0 for ; Tue, 07 Feb 2012 20:29:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=HPkHFjZgFBDWllIYLX9L81hNQC7P6IeYwDvfJ3GcGic=; b=PwAXTsCzaEl6pj3E2vli1ePW/fayf90LMSHJ4R6opNxlhoUiO6HI1Eo237kWfiuTBF fcjaU6oxA72GmGf3Yx0X4orMfzS40YC8vLLWUYr8HTKmPh6+iDkndlVC0YDBHbimPmy/ A3ZnrGq/ZfgqQIvQOWf3DpsrBq3FMJC1ivIuE= Original-Received: by 10.68.199.38 with SMTP id jh6mr64165199pbc.77.1328675355204; Tue, 07 Feb 2012 20:29:15 -0800 (PST) Original-Received: by 10.143.37.9 with HTTP; Tue, 7 Feb 2012 20:28:35 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.41 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:148349 Archived-At: > Trying to document this, I'm confused as to what this functionality is > for. It only seems to be used for warning about a _emacs file on MS > Windows? And also for the case that HOME is being defaulted to C:\ (because there's a .emacs in C:\) but not set explicitly. That was, in fact, the original use, because at that point elisp code can not yet run. > Is it supposed to be used by external Lisp libraries for > something (if so, what?), or is it fully internal to Emacs (in which it > may not need documenting anywhere)? I'd say it is more for internal use. I'd like to see some warnings that currently are generated through l?warn and display-warning turned into delayed warnings, for two reasons: eventually it will allow the user to filter them out or otherwise customize them, and it allows more control in some cases. For example, in bug#10578 I proposed it as a way to display errors from the redisplay and image library code in a relatively unobtrusive way (using an idle timer). Anway, if we supply a trivial macro (defmacro delay-warning (&rest args) "... \n(fn type message &optional level buffer-name)" `(push args delayed-warnings-list)) there's no reason it could not be used from external libraries. =C2=A0 =C2=A0 Juanma