From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: Introducing 'unrecognized and 'ignored Date: Sun, 20 Jan 2008 09:08:51 -0800 Message-ID: <200801201708.m0KH8utF020932@sallyv1.ics.uci.edu> References: <17EA38DF-BCC1-4565-8510-5DD10DD667E3@mac.com> <20071229114551.GD9794@thyrsus.com> <20080102021907.GA15494@thyrsus.com> <200801020445.m024jWU2008538@oogie-boogie.ics.uci.edu> <200801031805.m03I5SBf022748@oogie-boogie.ics.uci.edu> <200801050901.m0591mQj011970@oogie-boogie.ics.uci.edu> <20080105143415.GG30869@thyrsus.com> <200801061037.m06AbIRD004966@oogie-boogie.ics.uci.edu> <200801182346.m0INkiEg022130@sallyv1.ics.uci.edu> <200801191705.m0JH5WOU026943@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1200849189 24231 80.91.229.12 (20 Jan 2008 17:13:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Jan 2008 17:13:09 +0000 (UTC) Cc: Tom Tromey , esr@thyrsus.com, harsanyi@mac.com, rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 20 18:13:27 2008 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 1JGdjY-0003aj-3L for ged-emacs-devel@m.gmane.org; Sun, 20 Jan 2008 18:13:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JGdj8-0006l9-L8 for ged-emacs-devel@m.gmane.org; Sun, 20 Jan 2008 12:12:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JGdiL-0006B2-Ez for emacs-devel@gnu.org; Sun, 20 Jan 2008 12:12:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JGdiK-0006AN-Un for emacs-devel@gnu.org; Sun, 20 Jan 2008 12:12:09 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JGdiK-0006AJ-J3 for emacs-devel@gnu.org; Sun, 20 Jan 2008 12:12:08 -0500 Original-Received: from sallyv1.ics.uci.edu ([128.195.1.109]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1JGdiG-0007Iw-6g; Sun, 20 Jan 2008 12:12:04 -0500 X-ICS-MailScanner-Watermark: 1201453740.16631@hfkIWjzWyHzGGk9sg3wStg Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv1.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m0KH8utF020932; Sun, 20 Jan 2008 09:08:56 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Sat, 19 Jan 2008 14:40:20 -0500") Original-Lines: 49 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) 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:87107 Archived-At: Stefan Monnier writes: > > log, diff and annotate could all use this functionality. > > Indeed, they could use `mode-line-process'. > > As for on-the-fly updating rather than updating in the end. It's been > on my todo list for PCL-CVS, but I never got to it. It'd probably be > a good idea to add this from the beginning because it substantially > changes the way things work: you have to use a process filter rather than > a sentinel, you have to check whether the partial output you have is > enough to parse it reliably or whether we need to way for more output, > and you have to be able to update the display incrementally. For doing incremental updates the needed changes for vc.el changes are quite small. Just pass to the `dir-status' backend function another function that is called when the asynchronous process finishes. AFAICT vc-update-vc-status-buffer can work incrementally, the backend just needs to call it with partial results when they are available. Like this: --- vc.el.~1.516.~ Fri Jan 18 15:05:37 2008 +++ vc.el Sun Jan 20 08:52:48 2008 @@ -2627,6 +2627,11 @@ (vc-status-create-fileinfo (cdr entry) (car entry)))) (ewoc-goto-node vc-status (ewoc-nth vc-status 0)))) +(defun vc-status-command-finished (successp buffer) + ;; This is called when dir-status finished processing the + ;; asynchronous output from the status command. + ) + (defun vc-status-refresh () "Refresh the contents of the VC status buffer." (interactive) @@ -2639,7 +2644,8 @@ ;; the results. (vc-call-backend backend 'dir-status default-directory - #'vc-update-vc-status-buffer (current-buffer)))) + #'vc-update-vc-status-buffer #'vc-status-command-finished + (current-buffer)))) (defun vc-status-next-line (arg) "Go to the next line. The backend changes to use a process filter are probably a bit more complex, patches showing how to do that would be most welcome!