From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs Subject: bug#23871: 25.1.50; Undo unexpectedly leads to blank buffer Date: Wed, 29 Jun 2016 23:47:19 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1467236920 2585 80.91.229.3 (29 Jun 2016 21:48:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Jun 2016 21:48:40 +0000 (UTC) To: 23871@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 29 23:48:29 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 1bINLP-0006Mv-D2 for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Jun 2016 23:48:27 +0200 Original-Received: from localhost ([::1]:45905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bINLO-0006GQ-Ms for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Jun 2016 17:48:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bINL4-000663-9U for bug-gnu-emacs@gnu.org; Wed, 29 Jun 2016 17:48:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bINL0-0006mD-6V for bug-gnu-emacs@gnu.org; Wed, 29 Jun 2016 17:48:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bINL0-0006m9-2J for bug-gnu-emacs@gnu.org; Wed, 29 Jun 2016 17:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bINKz-0007tr-TN for bug-gnu-emacs@gnu.org; Wed, 29 Jun 2016 17:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Jun 2016 21:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23871 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146723685830334 (code B ref -1); Wed, 29 Jun 2016 21:48:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Jun 2016 21:47:38 +0000 Original-Received: from localhost ([127.0.0.1]:60379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bINKb-0007tB-SU for submit@debbugs.gnu.org; Wed, 29 Jun 2016 17:47:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bINKa-0007sz-3r for submit@debbugs.gnu.org; Wed, 29 Jun 2016 17:47:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bINKT-0006c9-M3 for submit@debbugs.gnu.org; Wed, 29 Jun 2016 17:47:30 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bINKT-0006c4-Iv for submit@debbugs.gnu.org; Wed, 29 Jun 2016 17:47:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bINKR-0005bH-W8 for bug-gnu-emacs@gnu.org; Wed, 29 Jun 2016 17:47:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bINKO-0006aC-RJ for bug-gnu-emacs@gnu.org; Wed, 29 Jun 2016 17:47:28 -0400 Original-Received: from metalevel.at ([78.46.218.83]:53430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bINKO-0006a1-KW for bug-gnu-emacs@gnu.org; Wed, 29 Jun 2016 17:47:24 -0400 Original-Received: from dawn.meta (localhost.localdomain [127.0.0.1]) by metalevel.at (Postfix) with ESMTP id 2BC3DA0069 for ; Wed, 29 Jun 2016 23:47:21 +0200 (CEST) Original-Received: by dawn.meta (Postfix, from userid 501) id 5B9C81A8D616; Wed, 29 Jun 2016 23:47:19 +0200 (CEST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:120220 Archived-At: To reproduce this issue, please perform the following steps: 1. Install SWI-Prolog >= 7.2. I am using 7.3.23 in the following. 2. Copy ediprolog.el to the current directory via: $ wget https://www.metalevel.at/ediprolog/ediprolog.el 3. Copy ceiled.pl to the current directory via: $ wget https://www.metalevel.at/ei/ceiled.pl 4. With ediprolog.el and ceiled.pl in the current directory, start Emacs with: $ emacs -Q ceiled.pl -fn "Bitstream Vera Sans Mono 15" \ --eval "(load \"$PWD/ediprolog.el\")" Please see the screenshot for how this looks for me: https://www.metalevel.at/ei/ceil1.png 5. Press: M-x ediprolog-dwim RET This consults the buffer. If everything works as intended, you see "Buffer consulted." in the message area. 6. Press: M-g M-g 15 RET This moves point at the beginning of "%?- time(....)". 7. Press: M-x ediprolog-dwim RET This evaluates the Prolog query at point. It only takes a few milliseconds to produce a very long line that spans several visual lines. Please see the screenshot: https://www.metalevel.at/ei/ceil2.png 8. Press: C-_ This *undoes* the insertion of text that resulted from step (7). 9. As expected, the insertion is undone, but unexpectedly a completely blank buffer remains. Please see the screenshot: https://www.metalevel.at/ei/ceil3.png When I press C-p to move to the previous line, the expected part of the buffer is shown. Please see the screenshot: https://www.metalevel.at/ei/ceil4.png In summary, step 8 leads to 2 problems: (a) a blank buffer is shown (b) point position after the undo is not where point was before the insertion. Please note that #1095 ("Unexpected point position after undo") may be related: Point after undo is sometimes at an unexpected position. Thank you for looking into this! Markus In GNU Emacs 25.1.50.1 (x86_64-apple-darwin15.5.0, X toolkit, Xaw scroll bars) of 2016-05-30 built on mt-imac Repository revision: 190942baeff3f541abf2a937e0fb4d3f9ea104be Windowing system distributor 'The X.Org Foundation', version 11.0.11502000 Configured using: 'configure --without-ns CFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib' Configured features: XPM JPEG TIFF GIF PNG GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix