From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.bugs Subject: bug#23871: 25.1.50; Undo unexpectedly leads to blank buffer Date: Thu, 30 Jun 2016 22:45:00 +0100 Message-ID: <87vb0qqrkz.fsf@russet.org.uk> References: <83h9cavdgj.fsf@gnu.org> <87poqyy2tc.fsf@metalevel.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1467323191 1367 80.91.229.3 (30 Jun 2016 21:46:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2016 21:46:31 +0000 (UTC) Cc: 23871@debbugs.gnu.org To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 30 23:46:19 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 1bIjmp-0002WO-8D for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Jun 2016 23:46:15 +0200 Original-Received: from localhost ([::1]:52746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIjmo-00007M-9z for geb-bug-gnu-emacs@m.gmane.org; Thu, 30 Jun 2016 17:46:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIjmi-00006u-7u for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 17:46:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIjmc-0004CK-8q for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 17:46:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIjmc-0004CE-5F for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 17:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bIjmb-0002xH-UA for bug-gnu-emacs@gnu.org; Thu, 30 Jun 2016 17:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Jun 2016 21:46:01 +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.146732310811291 (code B ref 23871); Thu, 30 Jun 2016 21:46:01 +0000 Original-Received: (at 23871) by debbugs.gnu.org; 30 Jun 2016 21:45:08 +0000 Original-Received: from localhost ([127.0.0.1]:32860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIjlk-0002w3-KI for submit@debbugs.gnu.org; Thu, 30 Jun 2016 17:45:08 -0400 Original-Received: from cloud103.planethippo.com ([31.216.48.48]:46970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIjlj-0002vS-5F for 23871@debbugs.gnu.org; Thu, 30 Jun 2016 17:45:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=8rhLEF69JlkNfBy2HmrPtJwy9hCzMeH4aOgE2zlonXs=; b=GQbUC4nJy1tX+nHR0yhFQZdXHY rI4m+hsP0HXQhnt33/gD7S5bgRGjQunHbEyRtDyTh05+h9A/qeANqtCw/6/4NC5G7oq6Ls17jGE5f HX/ErxWkRUJQHfh+LdnlLapKVE88sTICj8x9PKgsPFScRy3JZ4sJrqeCqaPos5ByhX0w6cwmek8nW SjYJZ+YQK0rU2mxGQNSd+mH9lZgStes9kKL5nLysv8JHWjwXCNoslgQUVmaFULT3mvwlP3nWgxRJB pSQ8HRInf08AMgs+AIq3anm2lH+mTXVCfVooIL/2HCGplg9ottIpxh9rN04plw/WKWe9RwY3vTmaa SAsmY+sA==; Original-Received: from cpc1-benw10-2-0-cust373.gate.cable.virginm.net ([77.98.219.118]:36958 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1bIjlc-001OuW-Up; Thu, 30 Jun 2016 22:45:01 +0100 In-Reply-To: <87poqyy2tc.fsf@metalevel.at> (Markus Triska's message of "Thu, 30 Jun 2016 20:00:31 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk 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:120239 Archived-At: --=-=-= Content-Type: text/plain Markus Triska writes: > Please see #21722. It shows that point position after undo is different > from what it was before, just as in this case. I constructed the case > shown in #21722 due to the issues with undo after process output, and I > suspect these issues are related. Redisplay may also be involved. > > >> Also, how important is it to have exactly the font you mention and >> exactly that size? (I tried that font and that size, as well as a few >> others, but that didn't help in my case.) > > The font and even window size definitely have an impact on this > issue. Please try a different window size, and I hope you can then > reproduce the issue, or at least #21722. I believe the following patch fixes #21722. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-missing-point-information-in-undo.patch >From 6687d6162941b7d5a5d7e41c3a7e1b1a1527538f Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Thu, 30 Jun 2016 22:06:00 +0100 Subject: [PATCH] Fix missing point information in undo * src/undo.c (record_insert): Use record_point instead of prepare_record. Addresses Bug# 21722 --- src/undo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/undo.c b/src/undo.c index be5b270..cafe351 100644 --- a/src/undo.c +++ b/src/undo.c @@ -83,7 +83,7 @@ record_insert (ptrdiff_t beg, ptrdiff_t length) if (EQ (BVAR (current_buffer, undo_list), Qt)) return; - prepare_record (); + record_point (beg); /* If this is following another insertion and consecutive with it in the buffer, combine the two. */ -- 2.9.0 --=-=-=--