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: insert-file-contents disables undo Date: Thu, 24 Jul 2008 23:34:02 +0200 Message-ID: <4888F54A.1060301@gmx.at> References: 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 1216935338 22498 80.91.229.12 (24 Jul 2008 21:35:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Jul 2008 21:35:38 +0000 (UTC) Cc: Katsumi Yamaoka , emacs-devel@gnu.org, Miles Bader To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 24 23:36:26 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 1KM8Tq-0008G0-Cu for ged-emacs-devel@m.gmane.org; Thu, 24 Jul 2008 23:36:10 +0200 Original-Received: from localhost ([127.0.0.1]:42456 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KM8Sw-0006gT-Hp for ged-emacs-devel@m.gmane.org; Thu, 24 Jul 2008 17:35:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KM8Sr-0006gD-Sq for emacs-devel@gnu.org; Thu, 24 Jul 2008 17:35:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KM8Sp-0006fx-J0 for emacs-devel@gnu.org; Thu, 24 Jul 2008 17:35:08 -0400 Original-Received: from [199.232.76.173] (port=49398 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KM8Sp-0006fu-89 for emacs-devel@gnu.org; Thu, 24 Jul 2008 17:35:07 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:60873) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KM8So-00012o-2F for emacs-devel@gnu.org; Thu, 24 Jul 2008 17:35:06 -0400 Original-Received: (qmail invoked by alias); 24 Jul 2008 21:35:01 -0000 Original-Received: from 62-47-54-235.adsl.highway.telekom.at (EHLO [62.47.54.235]) [62.47.54.235] by mail.gmx.net (mp063) with SMTP; 24 Jul 2008 23:35:01 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18Ykt9v6GoY5jwGlIjosAWQHkjdcIJuQVrg0ZMV9w HGs6Xu2ca8Hq/3 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-FuHaFi: 0.77 X-detected-kernel: 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:101424 Archived-At: >>Thanks for finding that! I don't immediately see the reason for the bug >>in `insert-file-contents'; that function's handling of the undo list is >>a huge festering pile of hair... > > Hmm... but isn't that pile of hair the immediate reason for the bug? The immediate reason is that I forgot that record_insert would collapse the insertion done by `insert-file-contents' with other insertions. AFAICT Andreas fixed that and also the mindless one-armed `if' I wrote. Thanks, Andreas! Anyway, the pile of hair is rooted deep inside `insert-file-contents' which tries to reconcile format decoding, `after-insert-file-functions', keeping the undo-list short and `point' where it was, and whatever have you. `insert-file-contents' presently has about 1200 lines of code, that's clearly too much for my brain. martin