From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#19868: 25.0.50; Compilation eats buffers Date: Sat, 14 Feb 2015 19:30:45 +0000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1423942283 18344 80.91.229.3 (14 Feb 2015 19:31:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Feb 2015 19:31:23 +0000 (UTC) To: 19868@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 14 20:31:14 2015 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 1YMiQq-0006Nx-P8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Feb 2015 20:31:13 +0100 Original-Received: from localhost ([::1]:60943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMiQq-0004KO-1H for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Feb 2015 14:31:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMiQl-0004J5-Rx for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 14:31:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMiQh-0007v1-0j for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 14:31:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMiQg-0007uw-TF for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 14:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YMiQg-0007Qe-OG for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 14:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Feb 2015 19:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19868 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.142394226128548 (code B ref -1); Sat, 14 Feb 2015 19:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Feb 2015 19:31:01 +0000 Original-Received: from localhost ([127.0.0.1]:44185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YMiQf-0007QN-2U for submit@debbugs.gnu.org; Sat, 14 Feb 2015 14:31:01 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35100) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YMiQd-0007QC-JH for submit@debbugs.gnu.org; Sat, 14 Feb 2015 14:30:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMiQV-0007pU-KV for submit@debbugs.gnu.org; Sat, 14 Feb 2015 14:30:54 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:50030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMiQV-0007pO-Hq for submit@debbugs.gnu.org; Sat, 14 Feb 2015 14:30:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMiQT-0004HJ-Lf for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 14:30:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMiQQ-0007ky-Sb for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 14:30:49 -0500 Original-Received: from mail-yk0-x229.google.com ([2607:f8b0:4002:c07::229]:38744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMiQQ-0007ki-OL for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 14:30:46 -0500 Original-Received: by mail-yk0-f169.google.com with SMTP id 79so10377176ykr.0 for ; Sat, 14 Feb 2015 11:30:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=JafEGS2DUJ02CpEJ/v6yIZ+jpu66tVznLbRsRDne0so=; b=e7MDGSAQZ/tgYJymFCZ1spX+SEqXuDw3ek4oIZxaET9PllRCJAPSrd0s0qMuafELY/ OOlhkRtZu4Sf0uXytaF9eDQHpYo1fjs+3RFWxSqbZndH0Xq9Mg0iAV7ZG1jtuDJK4aUd GP+1O73IMNpQIo2H5z4TPMzr12PLbxHYTWCv88955Qgc7holAeMA1syKPK+Hv5OFMJwh AGwa+XElidwwjMspS80dOF4plML5YPLtdkw4jC8RqN3gcpsbKx+cBYEH+bdWxVNEXnIN qbO2CjZ6AievUBs4auzs9pGPbfDOrLWZmCrlaEH8kl9KB4lxanvrBwOfjE05UaqZYfYH Tmvw== X-Received: by 10.236.38.66 with SMTP id z42mr12219054yha.151.1423942245981; Sat, 14 Feb 2015 11:30:45 -0800 (PST) Original-Received: by 10.170.63.135 with HTTP; Sat, 14 Feb 2015 11:30:45 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99413 Archived-At: On Windows, with MinGW gcc.exe installed and on the path, save a file "c:\temp\bug.c" containing these two lines: #include int main () { Sleep (5000); } Compile with "M-x compile RET", supplying this compile-command: gcc -mwindows -o bug.exe bug.c && bug.exe Within 5 seconds, execute "M-x compile" again and answer "yes" to kill the existing process. The process doesn't respond to the signal, and Emacs hangs inside the call to `delete-process' in `compilation-start'. When the process does eventually die and the `delete-process' call returns, the current buffer has changed from *compilation* to the buffer from which the compilation was launched (which will often be a source code buffer). `compilation-start' then proceeds to erase the buffer and discard its undo history. This is potentially very bad news for the user's source code. I'm not sure where the buffer gets changed (presumably in a sentinel, but `compilation-sentinel' looks OK to me). Wrapping the `delete-process' call inside a `save-excursion' fixes (or hides?) the problem. In GNU Emacs 25.0.50.1 (x86_64-w64-mingw32) of 2015-02-09 on MACHINE Repository revision: 21d1f8b85eec8fc1f87bb30398e449f6b20b6ecc Windowing system distributor `Microsoft Corp.', version 6.3.9600 Configured using: `configure --prefix /c/emacs/emacs-20150209-192633 --disable-dependency-tracking --enable-locallisppath=%emacs_dir%/../site-lisp --with-wide-int --build=x86_64-w64-mingw32 'CPPFLAGS=-I G:/usr/include -I C:/GnuWin32/include' 'LDFLAGS=-L G:/usr/lib -L C:/GnuWin32/lib'' Configured features: XPM JPEG TIFF GIF PNG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB