From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexandru Harsanyi Newsgroups: gmane.emacs.devel Subject: Re: Introducing 'unrecognized and 'ignored Date: Sat, 29 Dec 2007 11:48:58 +0900 Message-ID: <17EA38DF-BCC1-4565-8510-5DD10DD667E3@mac.com> References: <20071228174512.66834830BC9@snark.thyrsus.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1198896554 1729 80.91.229.12 (29 Dec 2007 02:49:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Dec 2007 02:49:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eric S. Raymond Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 29 03:49:27 2007 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 1J8RlN-0005dh-Py for ged-emacs-devel@m.gmane.org; Sat, 29 Dec 2007 03:49:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J8Rl2-0006nl-JG for ged-emacs-devel@m.gmane.org; Fri, 28 Dec 2007 21:49:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J8Rky-0006lD-GB for emacs-devel@gnu.org; Fri, 28 Dec 2007 21:49:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J8Rkx-0006jG-Gk for emacs-devel@gnu.org; Fri, 28 Dec 2007 21:48:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J8Rkw-0006ie-W1 for emacs-devel@gnu.org; Fri, 28 Dec 2007 21:48:59 -0500 Original-Received: from hosted06.westnet.com.au ([203.10.1.221]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J8Rkw-0005XD-9M for emacs-devel@gnu.org; Fri, 28 Dec 2007 21:48:58 -0500 Original-Received: from hosted06.westnet.com.au (hosted06.westnet.com.au [127.0.0.1]) by hosted06.westnet.com.au (Postfix) with SMTP id 721092DFEC0; Sat, 29 Dec 2007 11:48:54 +0900 (WST) Original-Received: from [10.0.1.4] (dsl-58-7-169-97.wa.westnet.com.au [58.7.169.97]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by hosted06.westnet.com.au (Postfix) with ESMTP id EDB4C2DF9F6; Sat, 29 Dec 2007 11:48:52 +0900 (WST) In-Reply-To: <20071228174512.66834830BC9@snark.thyrsus.com> X-Mailer: Apple Mail (2.753) X-PMX-Branch: TNG-Outgoing X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:85582 Archived-At: On 29 Dec 2007, at 2:45 AM, Eric S. Raymond wrote: > I've spent the last couple of hours looking at this issue. > A reminder: the payoff for getting it right would be another > significant speedup in (vc-dired-hook), which would translate to > a faster C-x v d display. > > Remarkably, it looks as if the code does not actually depend > in any significant way on the nil return from (vc-state file) meaning > that FILE is unregistered. Tests that might have used this method > use vc-backend instead. So introducing an 'unregistered state > shouldn't actually break anything. > > Alex Harsanyi: A cvs-ignorable-file-p would actually be useful, if > you're still interested. Under later systems it's faster to get this > by doing a bit of estra parsing of rge status report. > I had a look at the problem last night and wrote the code to load a cvsignore file and produce a regexp to match the ignored files, however the whole mechanism required by `vc-BACKEND-ignorable-file-p' is quite tricky to implement corectly (in a way that both Emacs and the backend agree 100% on what files are ignored). Here are two of the problems I found when I looked at an implementation for CVS: * CVS will ignore a file only if it is unregistered. For example .o files are ignored from a CVS status listing, but if an .o file is registered than that file will show up in the listing. This requires checking whether a file is registered or not, a thing which we try to avoid. * There's a 'per-repository' cvsignore file at $CVSROOT/CVSROOT/ cvsignore which Emacs cannot access directly for remote repositories. With extended vc-state states I don't think there is a need for `vc- ignorable-file-p' at all: `vc-BACKEND-dir-state' should set the state for each registered file and for files it can register. `vc- dired-hook' can than simply look for the vc-state property and if it is missing it can assume that the file is ignored. Best Regards, Alex.