From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Patch to make VC annotate async Date: Sun, 24 Jun 2007 15:32:00 -0600 Message-ID: References: Reply-To: tromey@redhat.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1182721888 27234 80.91.229.12 (24 Jun 2007 21:51:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 24 Jun 2007 21:51:28 +0000 (UTC) Cc: Emacs Hackers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 24 23:51:27 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I2ZzS-0007SD-D8 for ged-emacs-devel@m.gmane.org; Sun, 24 Jun 2007 23:51:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I2ZzR-00053M-Tz for ged-emacs-devel@m.gmane.org; Sun, 24 Jun 2007 17:51:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I2ZzO-00053E-SS for emacs-devel@gnu.org; Sun, 24 Jun 2007 17:51:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I2ZzN-00052e-Hh for emacs-devel@gnu.org; Sun, 24 Jun 2007 17:51:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I2ZzN-00052b-BD for emacs-devel@gnu.org; Sun, 24 Jun 2007 17:51:21 -0400 Original-Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I2ZzM-0001Z8-RK for emacs-devel@gnu.org; Sun, 24 Jun 2007 17:51:20 -0400 Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l5OLpJiN003828; Sun, 24 Jun 2007 17:51:19 -0400 Original-Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l5OLpJh1014161; Sun, 24 Jun 2007 17:51:19 -0400 Original-Received: from opsy.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l5OLpI3D018331; Sun, 24 Jun 2007 17:51:18 -0400 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 0242F378285; Sun, 24 Jun 2007 15:32:00 -0600 (MDT) X-Attribution: Tom In-Reply-To: (Stefan Monnier's message of "Sun\, 24 Jun 2007 15\:33\:51 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:73773 Archived-At: >>>>> "Stefan" == Stefan Monnier writes: >> * vc.el (vc-annotate-display-select): Don't pop to buffer if one >> is specified. >> (vc-annotate): Run vc-annotate-display-select via vc-exec-after. Stefan> Oh, so you don't even add the coloring until after the whole data Stefan> was received. Hmmm... Yes. This seemed like the simplest change, and after trying it a bit I felt that it didn't make the user interface unacceptably odd. The weirdest bit is when point moves, but that is nice once you adjust to it. I also experimented a bit with how the buffer is displayed. In particular I tried making it so that the buffer is displayed only after the contents are fontified. I didn't like this since it means the buffer is hidden while I do other tasks; popping it immediately is less intrusive -- when the buffer is initially hidden I found that I could sometimes context switch and forget that I had asked for the annotation. Also, in my various tests, I find that the buffer contents actually show up reasonably quickly. The slowdown with svn seems to come while computing the text to send; once sent it seems to arrive quickly enough that I don't notice the contents not being fontified. >> * vc-cvs.el (vc-cvs-annotate-output): New variable. >> (vc-cvs-annotate-process-filter): New function. >> (vc-cvs-annotate-command): Run command async. Use >> vc-cvs-annotate-process-filter. Stefan> I don't understand the prupose of Stefan> vc-cvs-annotate-process-filter. In my implementation I Stefan> haven't needed any change to vc-cvs.el other than passing the Stefan> `async' flag to vc-do-command. The CVS annotator strips some text from the front of the buffer. I chose this approach since it means the user will not see the text being stripped. But, since the text does show up so quickly, and since the code would be simpler, I could change this to a simple vc-exec-after if you like. Tom