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: Please try Pmail Date: Tue, 20 Jan 2009 23:18:10 -0500 Message-ID: References: <87r6303c31.fsf@cyd.mit.edu> <87ljt83svc.fsf@cyd.mit.edu> <87eiyyvz2h.fsf@cyd.mit.edu> <873afdti10.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1232511521 28173 80.91.229.12 (21 Jan 2009 04:18:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Jan 2009 04:18:41 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: "Chong Yidong" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 21 05:19:53 2009 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 1LPUZC-0003aG-PB for ged-emacs-devel@m.gmane.org; Wed, 21 Jan 2009 05:19:51 +0100 Original-Received: from localhost ([127.0.0.1]:42903 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPUXv-0004j5-1L for ged-emacs-devel@m.gmane.org; Tue, 20 Jan 2009 23:18:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPUXq-0004iB-Cs for emacs-devel@gnu.org; Tue, 20 Jan 2009 23:18:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPUXn-0004h3-FO for emacs-devel@gnu.org; Tue, 20 Jan 2009 23:18:25 -0500 Original-Received: from [199.232.76.173] (port=34440 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPUXn-0004gr-8r for emacs-devel@gnu.org; Tue, 20 Jan 2009 23:18:23 -0500 Original-Received: from mail.g-wis.com ([204.250.154.18]:4628) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPUXj-0004zb-6h; Tue, 20 Jan 2009 23:18:19 -0500 thread-index: Acl7f0kg/kT9DcoAQ0iB30qM5k+vaw== X-Received-From-Address: 69.38.23.210 X-Envelope-From: monnier@iro.umontreal.ca X-Envelope-To: emacs-devel@gnu.org, rms@gnu.org, cyd@stupidchicken.com, monnier@iro.umontreal.ca Original-Received: from ceviche.home ([69.38.23.210]) by mail.g-wis.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 20 Jan 2009 20:18:16 -0800 Original-Received: by ceviche.home (Postfix, from userid 20848) id BD4C0B400C; Tue, 20 Jan 2009 23:18:10 -0500 (EST) Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325 In-Reply-To: <873afdti10.fsf@cyd.mit.edu> (Chong Yidong's message of "Tue, 20Jan 2009 23:11:39 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-OriginalArrivalTime: 21 Jan 2009 04:18:16.0764 (UTC) FILETIME=[48B4C7C0:01C97B7F] X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ 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:108024 Archived-At: >> The cleanest solution is to let build_annotations_unwind run some >> buffer-local hook function (e.g. write-region-post-annotate-function), >> which can either run kill-buffer, and/or re-narrow the buffer, and/or >> kill previous buffers. The current code already allows it via >> kill-buffer-hook, but using that is ugly and will lead to >> other surprises. > The annotation functions would need to add functions to that hook when > they are run. Not really. When they switch to another buffer, they may need to adjust that hook in that buffer. The default value could be `kill-buffer', so as to preserve current behavior. > Another idea: allow a new type of return value for annotation functions, > and use this to keep track of buffers to be killed. For example, allow > annotation functions to return (FUN1 . FUN2), where FUN1 and FUN2 are > lambda functions. Then FUN1 is called during annotation, and FUN2 is > called after other annotations have taken place. Since they return a buffer already, we may as well store the FUN2 inside that buffer (as a buffer-local var). Stefan