From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: RE: vc-state always calls heuristic function Date: Wed, 24 Nov 2004 09:39:48 +0100 Message-ID: <1B3ACCFD5694A94DBA4E231402B0E9ED57AE5B@mucmail1.sdm.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1101285874 5841 80.91.229.6 (24 Nov 2004 08:44:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 Nov 2004 08:44:34 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 24 09:44:23 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CWslC-0007ec-00 for ; Wed, 24 Nov 2004 09:44:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWsuK-00064v-T1 for ged-emacs-devel@m.gmane.org; Wed, 24 Nov 2004 03:53:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWsqN-0005Kk-3h for emacs-devel@gnu.org; Wed, 24 Nov 2004 03:49:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWsqK-0005K2-JC for emacs-devel@gnu.org; Wed, 24 Nov 2004 03:49:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWsqK-0005Jx-EC for emacs-devel@gnu.org; Wed, 24 Nov 2004 03:49:40 -0500 Original-Received: from [192.76.162.229] (helo=world1.sdm.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWsgs-0004Zq-Ek for emacs-devel@gnu.org; Wed, 24 Nov 2004 03:39:55 -0500 Original-Received: from localhost ([127.0.0.1] helo=world1.sdm.de) by world1.sdm.de (MTA) via esmtp id 1CWsgr-00076C-9M; Wed, 24 Nov 2004 09:39:53 +0100 Original-Received: from mucns1.muc.sdm.de ([193.102.180.22]) by world1.sdm.de (MTA) via esmtp id 1CWsgn-000760-49; Wed, 24 Nov 2004 09:39:49 +0100 Original-Received: by mucns1.muc.sdm.de (MTA) via esmtp from localhost ([127.0.0.1] helo=sdmmail1.sdm.de) id 1CWsgn-0006rI-2U; Wed, 24 Nov 2004 09:39:49 +0100 Original-Received: from mucmail1.sdm.de ([193.102.180.175]) by sdmmail1.sdm.de with Microsoft SMTPSVC(6.0.3790.0); Wed, 24 Nov 2004 09:39:48 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: vc-state always calls heuristic function Thread-Index: AcTRnUs1Aipqd+7MSk+w6SEbMmfWSAAYTgTg Original-To: X-OriginalArrivalTime: 24 Nov 2004 08:39:48.0437 (UTC) FILETIME=[2831D050:01C4D201] 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: main.gmane.org gmane.emacs.devel:30307 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30307 Stefan Monnier wrote: >> The next version of ECB (Emacs Code browser) will display the >> VC-state=20 >> of sourcefiles with image-icons in its special browsable >> tree-windows.=20 >> For this a function is needed to compute the VC-state of a file. >> Whic one=20 >> 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=20 >> 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.=20 >=20 > 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? >=20 >> 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.... >=20 >> understandable? >=20 > 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 >=20 >=20 > Stefan