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: Tue, 23 Nov 2004 18:31:36 +0100	[thread overview]
Message-ID: <1B3ACCFD5694A94DBA4E231402B0E9ED57AE59@mucmail1.sdm.de> (raw)

Stefan Monnier wrote:
>> You see, that always the heuristic method of a backend is used
>> [(vc-call state-heuristic file)] - even if a backend offers also
>> a "real" statechecker. E.g. vc-cvs.el offers `vc-cvs-state' and
>> `vc-cvs-state-heuristic'... But current implementation of `vc-state'
>> will never use `vc-cvs-state'! Why??
> 
> Why not?
> 
>> IMHO there should be a way so a user can customize if `vc-state'
>> should use the heuristic approach or the real state-check if a
>> backend offers both of them. What do you think?
> 
> It's the responsability of the backend.
> vc.el uses `state-heuristic' when a heuristic is enough (e.g. in
> vc-state) and uses `state' when it really needs fresh data (in
> `vc-recompute-state'). 

ah, i didn't know the function `vc-recompute-state' - my fault..

> 
> The backend is then free to always use fresh data, or to use a
> heuristic when possible.  Backends usually use a config var such as
> vc-cvs-stay-local to decide which to choose.
> 
> What problem are you trying to solve?

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.
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?

Ciao,
Klaus



> 
> 
>         Stefan

             reply	other threads:[~2004-11-23 17:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-23 17:31 klaus.berndl [this message]
2004-11-23 20:44 ` vc-state always calls heuristic function Stefan Monnier
2004-12-02 19:19   ` Kevin Rodgers
  -- 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-24  8:39 klaus.berndl
2004-11-24 10:55 ` Andre Spiegel
2004-11-24 13:54 ` Stefan Monnier
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=1B3ACCFD5694A94DBA4E231402B0E9ED57AE59@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.