From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#21969: VC opens new window to display minimal messages Date: Sun, 22 Nov 2015 02:04:06 +0200 Message-ID: <56510676.2010305@yandex.ru> References: <906518FC-CA8A-408D-88CC-A44553EB66C6@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1448150723 13734 80.91.229.3 (22 Nov 2015 00:05:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Nov 2015 00:05:23 +0000 (UTC) To: David Reitter , 21969@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 22 01:05:11 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 1a0I9V-00087h-Ql for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Nov 2015 01:05:09 +0100 Original-Received: from localhost ([::1]:54208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0I9V-0003bQ-IS for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Nov 2015 19:05:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0I9S-0003ZU-HI for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 19:05:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0I9P-00014k-B9 for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 19:05:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0I9P-00014g-7R for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 19:05:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a0I9O-0000H7-LZ for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 19:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Nov 2015 00:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21969 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21969-submit@debbugs.gnu.org id=B21969.14481506701006 (code B ref 21969); Sun, 22 Nov 2015 00:05:02 +0000 Original-Received: (at 21969) by debbugs.gnu.org; 22 Nov 2015 00:04:30 +0000 Original-Received: from localhost ([127.0.0.1]:47453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0I8r-0000GA-Mm for submit@debbugs.gnu.org; Sat, 21 Nov 2015 19:04:29 -0500 Original-Received: from mail-wm0-f53.google.com ([74.125.82.53]:33075) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0I8Y-0000Fh-1t for 21969@debbugs.gnu.org; Sat, 21 Nov 2015 19:04:28 -0500 Original-Received: by wmec201 with SMTP id c201so116611349wme.0 for <21969@debbugs.gnu.org>; Sat, 21 Nov 2015 16:04:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=ed0jNF8IV6++MvT+gtV47Td9WeUiRUaWq74iu1Qgxo0=; b=SJUSQbHPLQwxp6PboforFbaHAeXh47GgpgbefRGB6666lwTqRvcOnVWhUt0umab3Le ++8oyOXFw2BAHh7+/J9papey0hrYs9pPv4vtGL2jxgGdlS/bcUOD9lsvjRh3yxtqnN8z hbjZoosuqBQPB/dpWCNGwg/slYpLIWwQ7FLReyyHs19TP06wOJktEmWjhlR4LUhR9Shz FZEw9wUGFAQBjJ381fRj+5k76XZX8fgktBoqXJoY0m2KuX3Hh3htS8LMeF1wIOFLm8Ga tfjz641D2OUU7uA1j2v4oYxzg+ocD1ic7ab5Vx2+HfvhbJJNhwzj2m2oLofwYcQbF+m2 AqIw== X-Received: by 10.194.184.81 with SMTP id es17mr25386207wjc.10.1448150649341; Sat, 21 Nov 2015 16:04:09 -0800 (PST) Original-Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id w67sm6186080wmw.17.2015.11.21.16.04.07 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 21 Nov 2015 16:04:08 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0 In-Reply-To: <906518FC-CA8A-408D-88CC-A44553EB66C6@gmail.com> 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: 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109038 Archived-At: On 11/21/2015 03:55 PM, David Reitter wrote: > At some point on the way to Emacs 25, VC has begun creating new windows to display messages that would more appropriately fit into the echo area. > > For example, you do C-x =, it’ll display a “no revisions between working revision and work file” message. But that is shown in the echo area AND a newly created window. Looking at the code, the main reason for this is that the ' diff' command is called asynchronously. Before Emacs 25, we made exceptions for certain backends (Git, Hg, RCS); not sure why, maybe because they're faster that the rest? They're treated the same now, since ed6ce56e2. vc-diff-internal calls the 'diff' backend command, then checks if the process in its buffer has finished working and there's no output (which might be the case if the command was called *synchronously*), pops a window and sets up the code to be executed when the process finishes. All of which seems reasonable: we can't really pop the window only after the process finishes, because if might take some time in certain cases, and the user would be still be waiting for anything to happen until then. So, I'm not sure what's the best course of action here: - Call 'git diff' synchronously, and leave all other backends with this problem. - Call all 'diff' commands synchronously, and disregard the backends that might respond slowly to this command; the user will wait. - Invent some other solutions, like introduce a timeout which we might wait for the backend to respond before popping the window, and abort (?) if the user interacts with Emacs during that time. Suggestions welcome.