From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: The *Warnings* buffer and undo Date: Thu, 29 Mar 2007 20:35:19 +0200 Message-ID: <85y7lfsxso.fsf@lola.goethe.zz> References: <460583AD.7010002@gmail.com> <85abxxw46j.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1175193352 31391 80.91.229.12 (29 Mar 2007 18:35:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Mar 2007 18:35:52 +0000 (UTC) Cc: rgm@gnu.org, lennart.borgman@gmail.com, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 29 20:35:42 2007 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 1HWzTJ-0000LK-FN for ged-emacs-devel@m.gmane.org; Thu, 29 Mar 2007 20:35:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HWzVu-0003db-TB for ged-emacs-devel@m.gmane.org; Thu, 29 Mar 2007 13:38:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HWzVq-0003VM-Be for emacs-devel@gnu.org; Thu, 29 Mar 2007 14:38:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HWzVm-0003Iy-PJ for emacs-devel@gnu.org; Thu, 29 Mar 2007 14:38:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HWzVm-0003If-Hp for emacs-devel@gnu.org; Thu, 29 Mar 2007 13:38:14 -0500 Original-Received: from mail-in-06.arcor-online.net ([151.189.21.46]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HWzT6-0005S3-2I; Thu, 29 Mar 2007 14:35:28 -0400 Original-Received: from mail-in-03-z2.arcor-online.net (mail-in-03-z2.arcor-online.net [151.189.8.15]) by mail-in-06.arcor-online.net (Postfix) with ESMTP id 6794531E70C; Thu, 29 Mar 2007 20:35:26 +0200 (CEST) Original-Received: from mail-in-05.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45]) by mail-in-03-z2.arcor-online.net (Postfix) with ESMTP id 4EF0C2D3AE3; Thu, 29 Mar 2007 20:35:26 +0200 (CEST) Original-Received: from lola.goethe.zz (dslb-084-061-061-253.pools.arcor-ip.net [84.61.61.253]) by mail-in-05.arcor-online.net (Postfix) with ESMTP id 24D3A12ECA7; Thu, 29 Mar 2007 20:35:26 +0200 (CEST) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 6D7AA1C460AC; Thu, 29 Mar 2007 20:35:19 +0200 (CEST) In-Reply-To: (Richard Stallman's message of "Thu\, 29 Mar 2007 13\:59\:40 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 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:68759 Archived-At: Richard Stallman writes: > I don't think it is a good idea to let-bind buffer-undo-list here: > instead it should generally be set to t in the buffer. > > Otherwise undo information will be recorded sparsely (for example, for > user input), leading to inconsistent results. > > That was my first reaction, but then it occurred to me that recording > undo info only for user editing might be just the right thing. But the undo info will then not be able to _undo_ older changes, but will rather damage the buffer in unpredictable ways if you try using it. Unrecorded changes turn the existing undo history useless. While it could conceivably be nice if user changes could be undone, this won't work out. The best that a program could do in this regard is set buffer-undo-list to t before doing its changes, and to nil afterwards. That way the user will be able to undo his changes as long as no new output appears. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum