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: deferred-action Date: Mon, 21 Mar 2011 15:56:21 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1300719443 22967 80.91.229.12 (21 Mar 2011 14:57:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2011 14:57:23 +0000 (UTC) Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 21 15:57:19 2011 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.69) (envelope-from ) id 1Q1gXj-0002uR-Hd for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2011 15:57:15 +0100 Original-Received: from localhost ([127.0.0.1]:34836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1gXi-0005wZ-LM for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2011 10:57:14 -0400 Original-Received: from [140.186.70.92] (port=60929 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1gXc-0005uT-Ej for emacs-devel@gnu.org; Mon, 21 Mar 2011 10:57:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q1gXa-0007Am-BU for emacs-devel@gnu.org; Mon, 21 Mar 2011 10:57:07 -0400 Original-Received: from mail-yw0-f41.google.com ([209.85.213.41]:51757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q1gXa-0007A7-8y for emacs-devel@gnu.org; Mon, 21 Mar 2011 10:57:06 -0400 Original-Received: by yws5 with SMTP id 5so3071495yws.0 for ; Mon, 21 Mar 2011 07:57:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=T5a5vfe5H5BIS0bcdXEwi1bzqGN/mCuog+k8uC/IGsY=; b=eXHC8R5avjXNlraD6pKUIXblQrZPHiyJCQlfusB3aKa1FUuZib6L0QMiT50+gAc6jD V6VBxMqj1+stV/QGObSLYawiAOrecyAQrjzG/oHiConSz+wC/TFyMTdOuSXHKmXNti4I ql6BzcRIvuxrUHiaUXMpbvxBdnxrQMbTKlAhk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=LP7cGPYZfPQbNKGykD5q6mH1BQqokYNRgsZLB+oNKyYU28mWtT86z3M9Vm0JVTcY9C zg+vMo9knJ/IySL30dU4yEc3v7gJpPtTPwGiSswamM3E++BbNKYpRdvEMG2QqVO7uoCg vkeLo1E3Rw8unbUr+U5AUq7ON4enOHxz9Myas= Original-Received: by 10.146.192.5 with SMTP id p5mr3793001yaf.39.1300719421269; Mon, 21 Mar 2011 07:57:01 -0700 (PDT) Original-Received: by 10.147.34.11 with HTTP; Mon, 21 Mar 2011 07:56:21 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.41 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:137479 Archived-At: On Mon, Mar 21, 2011 at 15:01, Stefan Monnier wr= ote: > The docstrings seem to hold enough info for someone like me, at least. > They say explicitly that the action-list's format is completely up (it > is only tested for non-nil content before running the action-function) > to the action-function. I understand that. And no, I don't think it's enough, because each piece of code using them is quite free to do it as it pleases (some could use deferred-action-list as a flag, other as a list of items to treat, a third as a list of functions to run, etc.), but on the other hand, deferred-action-function is intended to contain just a function, so there's nowhere explained HOW would several packages coordinate their different uses. Perhaps some kind of chaining where everyone which uses them wraps the previous deferred-action-function and calls it at the end... but it is far from clear and well-defined. > They're run right after post-command-hook, so I think that whenever > they're used we can use post-command-hook for it instead. Yes, when I looked at anything.el's code I didn't understand why the author chose to use deferred-action-* instead of just using post-command-hook. > Let's deprecate them. Thanks. =C2=A0 =C2=A0 Juanma