From: Dan Nicolaescu <dann@ics.uci.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Tom Tromey <tromey@redhat.com>,
esr@thyrsus.com, harsanyi@mac.com, rms@gnu.org,
emacs-devel@gnu.org
Subject: Re: Introducing 'unrecognized and 'ignored
Date: Sun, 20 Jan 2008 09:08:51 -0800 [thread overview]
Message-ID: <200801201708.m0KH8utF020932@sallyv1.ics.uci.edu> (raw)
In-Reply-To: <jwv1w8d7gp2.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 19 Jan 2008 14:40:20 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> 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!
next prev parent reply other threads:[~2008-01-20 17:08 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-28 17:45 Introducing 'unrecognized and 'ignored Eric S. Raymond
2007-12-28 23:01 ` Dan Nicolaescu
2007-12-29 2:48 ` Alexandru Harsanyi
2007-12-29 11:45 ` Eric S. Raymond
2008-01-02 2:02 ` Stefan Monnier
2008-01-02 2:19 ` Eric S. Raymond
2008-01-02 4:16 ` Stefan Monnier
2008-01-02 4:45 ` Dan Nicolaescu
2008-01-02 11:50 ` Eric S. Raymond
2008-01-02 17:31 ` Dan Nicolaescu
2008-01-03 9:50 ` Richard Stallman
2008-01-03 18:05 ` Dan Nicolaescu
2008-01-03 18:19 ` Eric S. Raymond
2008-01-05 5:54 ` Richard Stallman
2008-01-05 9:01 ` Dan Nicolaescu
2008-01-05 14:34 ` Eric S. Raymond
2008-01-05 22:25 ` Stefan Monnier
2008-01-06 10:37 ` Dan Nicolaescu
2008-01-06 15:57 ` Eric S. Raymond
2008-01-18 23:31 ` Dan Nicolaescu
2008-01-06 20:00 ` Tom Tromey
2008-01-06 21:03 ` Stefan Monnier
2008-01-07 2:59 ` Dan Nicolaescu
2008-01-07 3:26 ` Eric S. Raymond
2008-01-07 3:36 ` Dan Nicolaescu
2008-01-07 3:59 ` Stefan Monnier
2008-01-07 12:56 ` Eric S. Raymond
2008-01-07 15:31 ` Stefan Monnier
2008-01-07 11:30 ` Richard Stallman
2008-01-07 12:54 ` Eric S. Raymond
2008-01-07 15:32 ` Stefan Monnier
2008-01-08 19:06 ` Richard Stallman
2008-01-08 19:34 ` Miles Bader
2008-01-07 3:22 ` Dan Nicolaescu
2008-01-07 3:03 ` Tom Tromey
2008-01-07 4:01 ` Stefan Monnier
2008-01-07 21:15 ` PCL-CVS buffers (was: Introducing 'unrecognized and 'ignored) Reiner Steib
2008-01-08 2:33 ` PCL-CVS buffers Stefan Monnier
2008-01-18 23:46 ` Introducing 'unrecognized and 'ignored Dan Nicolaescu
2008-01-19 0:10 ` Tom Tromey
2008-01-19 1:20 ` Dan Nicolaescu
2008-01-19 6:00 ` Tom Tromey
2008-01-19 17:05 ` Dan Nicolaescu
2008-01-19 19:40 ` Stefan Monnier
2008-01-19 21:01 ` Thien-Thi Nguyen
2008-01-20 17:18 ` Dan Nicolaescu
2008-01-20 20:24 ` Thien-Thi Nguyen
2008-01-20 17:08 ` Dan Nicolaescu [this message]
2008-01-20 19:08 ` Tom Tromey
2008-01-20 20:14 ` Stefan Monnier
2008-01-20 19:45 ` Tom Tromey
2008-01-22 1:35 ` Dan Nicolaescu
2008-01-19 20:03 ` Thien-Thi Nguyen
2008-01-20 19:24 ` Stefan Monnier
2008-01-20 20:30 ` Thien-Thi Nguyen
2008-01-21 15:18 ` Stefan Monnier
2008-01-21 15:30 ` Dan Nicolaescu
2008-01-21 15:56 ` Stefan Monnier
2008-01-21 15:34 ` Thien-Thi Nguyen
2008-01-06 8:09 ` Richard Stallman
2008-01-02 11:46 ` Eric S. Raymond
2008-01-02 20:38 ` Stefan Monnier
2008-01-02 22:11 ` Eric S. Raymond
2008-01-02 23:06 ` Stefan Monnier
2008-01-02 23:29 ` Eric S. Raymond
2008-01-03 14:30 ` Stefan Monnier
2008-01-03 17:41 ` Eric S. Raymond
2008-01-05 5:54 ` Richard Stallman
2008-01-02 23:13 ` Dan Nicolaescu
2008-01-02 23:33 ` Eric S. Raymond
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200801201708.m0KH8utF020932@sallyv1.ics.uci.edu \
--to=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
--cc=esr@thyrsus.com \
--cc=harsanyi@mac.com \
--cc=monnier@iro.umontreal.ca \
--cc=rms@gnu.org \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).