From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Please try Pmail Date: Tue, 20 Jan 2009 23:11:39 -0500 Message-ID: <873afdti10.fsf@cyd.mit.edu> References: <87r6303c31.fsf@cyd.mit.edu> <87ljt83svc.fsf@cyd.mit.edu> <87eiyyvz2h.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1232511100 27454 80.91.229.12 (21 Jan 2009 04:11:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Jan 2009 04:11:40 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: "Stefan Monnier" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 21 05:12:52 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 1LPUSL-0002CD-Cs for ged-emacs-devel@m.gmane.org; Wed, 21 Jan 2009 05:12:45 +0100 Original-Received: from localhost ([127.0.0.1]:39129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPUR1-0001dU-AJ for ged-emacs-devel@m.gmane.org; Tue, 20 Jan 2009 23:11:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPUQx-0001cp-Bs for emacs-devel@gnu.org; Tue, 20 Jan 2009 23:11:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPUQv-0001b9-OU for emacs-devel@gnu.org; Tue, 20 Jan 2009 23:11:18 -0500 Original-Received: from [199.232.76.173] (port=39139 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPUQv-0001b1-Ke for emacs-devel@gnu.org; Tue, 20 Jan 2009 23:11:17 -0500 Original-Received: from cyd.mit.edu ([18.115.2.24]:55565) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPUQt-0004VV-Qm; Tue, 20 Jan 2009 23:11:15 -0500 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 2504457E21E; Tue, 20 Jan 2009 23:11:39 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Tue, 20 Jan 2009 21:37:49 -0500") 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:108023 Archived-At: "Stefan Monnier" writes: > We should try to find a way to get both cases working right (and even > the case where build_annotations switched buffers more than once, > ideally). > > 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. Maybe this is a good solution, but I'm not sure. 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.