From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: undo bug? Date: Wed, 02 Apr 2008 19:01:46 +0200 Message-ID: <47F3BBFA.1000109@gmx.at> References: <47F21FEB.401@gmx.at> <47F28479.3030605@gmx.at> <47F2A0C7.7030402@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1207156307 30475 80.91.229.12 (2 Apr 2008 17:11:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Apr 2008 17:11:47 +0000 (UTC) Cc: Katsumi Yamaoka , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 02 19:12:18 2008 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 1Jh6VT-0006Zu-I7 for ged-emacs-devel@m.gmane.org; Wed, 02 Apr 2008 19:12:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jh6Ur-0007Su-5v for ged-emacs-devel@m.gmane.org; Wed, 02 Apr 2008 13:11:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jh6Of-0006rr-Py for emacs-devel@gnu.org; Wed, 02 Apr 2008 13:05:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jh6Oe-0006pM-3z for emacs-devel@gnu.org; Wed, 02 Apr 2008 13:05:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jh6Od-0006p2-PL for emacs-devel@gnu.org; Wed, 02 Apr 2008 13:05:11 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Jh6Od-0000le-4S for emacs-devel@gnu.org; Wed, 02 Apr 2008 13:05:11 -0400 Original-Received: (qmail invoked by alias); 02 Apr 2008 17:05:09 -0000 Original-Received: from 88-117-43-76.adsl.highway.telekom.at (EHLO [88.117.43.76]) [88.117.43.76] by mail.gmx.net (mp006) with SMTP; 02 Apr 2008 19:05:09 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18qNZQ6KEsqMXhvZ2B0rTu2zPkpqubTPTTCCY2HE+ QcQTqIjZWL5iFY User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:94210 Archived-At: > Yes, that's indeed what I had understood from your earlier message and > what I was responding to. You're remove the undo boundaries (i.e. the > nil entries) and replace them by point-record entries. That would work > fine, except that there are packages out there that look for the > nil entries. Too bad, indeed. Are they looking out just for entries they created themselves? >>Sometimes. For example I use the patch below to handle the (pretty >>annoying) problem that when I redo an earlier insertion `point' ends up >>_before_ the inserted text (my `undo' binds `undo-is-redo' to `equiv' >>when calling `undo-more'). > > Have you tried to analyze the source of the problem? Maybe there are > cases where we incorrectly decide not to put a point-record even tho it > is needed. I think we should enclose every undoable character-modifiying buffer change by a `record-point' before and a `record-point' after it. An `undo' would reestablish the position recorded before, a `redo' the position recorded after the change. This way we would handle all flavors of inserting text before/after `point' as well as undoing and redoing.