From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23871: 25.1.50; Undo unexpectedly leads to blank buffer Date: Sat, 02 Jul 2016 10:35:31 +0300 Message-ID: <83bn2gtruk.fsf@gnu.org> References: <83h9cavdgj.fsf@gnu.org> <87poqyy2tc.fsf@metalevel.at> <87vb0qqrkz.fsf@russet.org.uk> <87h9c9zx75.fsf@metalevel.at> <834m89vmyv.fsf@gnu.org> <878txlsbdb.fsf@russet.org.uk> <87furtccdv.fsf@metalevel.at> <877fd5q9te.fsf@russet.org.uk> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1467444986 4313 80.91.229.3 (2 Jul 2016 07:36:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Jul 2016 07:36:26 +0000 (UTC) Cc: 23871@debbugs.gnu.org, triska@metalevel.at To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 02 09:36:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bJFTI-0003Ze-1q for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Jul 2016 09:36:12 +0200 Original-Received: from localhost ([::1]:37274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJFTG-00081u-Vj for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Jul 2016 03:36:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJFTA-0007mF-Qi for bug-gnu-emacs@gnu.org; Sat, 02 Jul 2016 03:36:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJFT8-0002yj-DO for bug-gnu-emacs@gnu.org; Sat, 02 Jul 2016 03:36:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJFT8-0002yf-AB for bug-gnu-emacs@gnu.org; Sat, 02 Jul 2016 03:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bJFT8-00064C-5o for bug-gnu-emacs@gnu.org; Sat, 02 Jul 2016 03:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Jul 2016 07:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23871 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23871-submit@debbugs.gnu.org id=B23871.146744496023312 (code B ref 23871); Sat, 02 Jul 2016 07:36:02 +0000 Original-Received: (at 23871) by debbugs.gnu.org; 2 Jul 2016 07:36:00 +0000 Original-Received: from localhost ([127.0.0.1]:34324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJFT6-00063v-0a for submit@debbugs.gnu.org; Sat, 02 Jul 2016 03:36:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56681) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJFT3-00063i-G8 for 23871@debbugs.gnu.org; Sat, 02 Jul 2016 03:35:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJFSv-0002y8-0U for 23871@debbugs.gnu.org; Sat, 02 Jul 2016 03:35:52 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJFSu-0002xz-T9; Sat, 02 Jul 2016 03:35:48 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2447 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bJFSs-0006tv-PY; Sat, 02 Jul 2016 03:35:47 -0400 In-reply-to: <877fd5q9te.fsf@russet.org.uk> (phillip.lord@russet.org.uk) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120276 Archived-At: > From: phillip.lord@russet.org.uk (Phillip Lord) > Cc: Eli Zaretskii , 23871@debbugs.gnu.org > Date: Fri, 01 Jul 2016 23:21:01 +0100 > > (let ((p (start-process "bc" (current-buffer) "bc"))) > (process-send-string p "2^10\n") > (goto-char (point-max))) > > The strange thing here is that it's not specifically an undo problem. > Point doesn't move after eval-defun. The problem, AFAIU, is in point movements _during_ eval-defun: they seem to not be recorded in buffer-undo-list. The undo list I get after C-M-x is this: (nil (117 . 122) (t 22391 27551 0 0)) The only information about point there is position 117, which is where undo leaves point after C-/. The information about point position at buffer position 1 was lost. IOW, this fragment of elisp--eval-defun: ;; Read the form from the buffer, and record where it ends. (save-excursion (end-of-defun) (beginning-of-defun) (setq beg (point)) (setq form (read (current-buffer))) (setq end (point))) somehow does not reflected point movements in buffer's undo list. By contrast, in Emacs 24.5, buffer-undo-list after C-M-x is this: (nil (117 . 122) 1 (t 22391 27551 0 0)) Note position 1 in it.