all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <klaus.berndl@sdm.de>
Cc: emacs-devel@gnu.org
Subject: RE: vc-state always calls heuristic function
Date: Wed, 24 Nov 2004 09:39:48 +0100	[thread overview]
Message-ID: <1B3ACCFD5694A94DBA4E231402B0E9ED57AE5B@mucmail1.sdm.de> (raw)

Stefan Monnier wrote:
>> The next version of ECB (Emacs Code browser) will display the
>> VC-state 
>> of sourcefiles with image-icons in its special browsable
>> tree-windows. 
>> For this a function is needed to compute the VC-state of a file.
>> Whic one 
>> is used is customizable in an option of ECB - and currently
>> `vc-state' is used per default for the backend CVS, RCS and SCCS...
>> and i have wondered 
>> if there is a function available which performs real checks not only
>> heuristic - now i know such a function - thanks Stefan!
>> I think i will not use vc-recompute-state per default because
>> especially with remote repositories this can be very expensive -
>> even the state-check is performed stealthy and interruptable in the
>> background as with ECB. 
> 
> It's only interruptible with C-g, right?  I don't call that very
> "stealth" if it forces me to hit C-g (or to wait for tens of seconds).

I agree - this i wouldn't call interruptable and stealth too ;-) But in fact the
stealth-mechanism of ECB allows running arbitrary tasks when Emacs is
idle (customizable delay) and all are interruptable by any keypress or
mouse-action...

I do this via (simplified):

            (while (and (not (input-pending-p))

means a stealthy task (e.g. checking the VC-state for a set of currently
displayed files in the file-browser of ECB) process this set in a while-loop
and between each pass of the loop it is interruptable..well, but of course there
remains the problem - how to interrupt if one pass takes long time...
here i have currently no real good idea how to interrupt that (unless using
C-g)...of course a potential expensive task line the VC-check could be implementes
via asynchron cvs-calls (start-process etc...) but then i can not use the VC-code
and moreover it would be qute compilcated to implement this... So if you have a
good idea..... ;-)

Do you call this stealth?

> 
>> But i want to mentionin the docstring of that ECB-option that there
>> is another function `vc-recompute-state' a user can use if he works
>> in a fast LAN and with a CVS-server in that LAN for example....
> 
>> understandable?
> 
> Yes.
> Please don't.  `vc-recompute-state' is an internal function, don't
> touch it, don't use it.
> There's vc-cvs-stay-local, it's customizable, it does what you want.
> Don't use vc-cvs-stay-local (of course): just tell your users that if
> they want fresh-but-slow state, they can tweak that variable.

Hmm, now i'm confused... ECB needs a function how to get the VC-state. Well,
the user can customize which function ECB should use. But if he should
not use `vc-recompute-state' how he should get fresh-but-slow state??
If only vc-state is used then tweaking vc-cvs-stay-local wil never take
effect but vc-state always call the heursitic backend-function (and
vc-cvs-state-heuristic also never uses vc-cvs-stay-local)... Would it better
to use the backend function itself - so vc-cvs-state when a user wants fresh
state (ECB allows to specify different "get-state"-functions for different
backends...)??

Klaus

> 
> 
>         Stefan

             reply	other threads:[~2004-11-24  8:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-24  8:39 klaus.berndl [this message]
2004-11-24 10:55 ` vc-state always calls heuristic function Andre Spiegel
2004-11-24 13:54 ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2004-12-03  7:32 klaus.berndl
2004-11-24 14:44 klaus.berndl
2004-11-24 12:11 klaus.berndl
2004-11-24 11:08 klaus.berndl
2004-11-24 11:04 klaus.berndl
2004-11-24 12:00 ` Andre Spiegel
2004-11-23 17:31 klaus.berndl
2004-11-23 20:44 ` Stefan Monnier
2004-12-02 19:19   ` Kevin Rodgers
2004-11-23 16:57 klaus.berndl
2004-11-23 17:21 ` Stefan Monnier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1B3ACCFD5694A94DBA4E231402B0E9ED57AE5B@mucmail1.sdm.de \
    --to=klaus.berndl@sdm.de \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.