From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: find-file-project Date: Fri, 8 Jan 2016 00:12:26 +0300 Message-ID: <568ED4BA.4030108@yandex.ru> References: <86pp1j4ejm.fsf@stephe-leake.org> <55F899EA.7050700@yandex.ru> <86lhc73wog.fsf@stephe-leake.org> <55F8F2FA.6060902@yandex.ru> <867fnq1oe9.fsf@stephe-leake.org> <55F9A13A.3070101@yandex.ru> <55FB01BD.1070909@yandex.ru> <568C6DE5.8040201@yandex.ru> <86egdt982b.fsf@stephe-leake.org> <568EADC5.2030604@yandex.ru> <86oacx6u1e.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1452201183 13353 80.91.229.3 (7 Jan 2016 21:13:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Jan 2016 21:13:03 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 07 22:12:49 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aHHrM-0003DK-KV for ged-emacs-devel@m.gmane.org; Thu, 07 Jan 2016 22:12:40 +0100 Original-Received: from localhost ([::1]:32836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHHrL-0005YU-Kj for ged-emacs-devel@m.gmane.org; Thu, 07 Jan 2016 16:12:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHHrG-0005Uz-JU for emacs-devel@gnu.org; Thu, 07 Jan 2016 16:12:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHHrC-0003pk-Gt for emacs-devel@gnu.org; Thu, 07 Jan 2016 16:12:34 -0500 Original-Received: from mail-lf0-x234.google.com ([2a00:1450:4010:c07::234]:36850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHHrC-0003pR-9t for emacs-devel@gnu.org; Thu, 07 Jan 2016 16:12:30 -0500 Original-Received: by mail-lf0-x234.google.com with SMTP id z124so335269661lfa.3 for ; Thu, 07 Jan 2016 13:12:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=P459J/xSzgCmP9VhYx7KxWtdyLRpXZj8cMwWsPuAP2M=; b=i7hL4dmdQNTYTKSJQ7gTvTIu8N5T5GgDoRKFXIgf5MzsLHaElNqVRYkRJ6By6NE9dC EJzl1/6YUa9Tgvvw9FF6O22gq28GcYkWX1s4TXOi9aQss4deI5K3m4kjmdCF74Jrl1pf 5Ssa+G4K318MWq7QClIsdIUIvDF4181Dzv35RqrG1U2AUQYw9I0zkOaWCnWh5T7Z54li ARevoF0/yI4DESQ8wCXCHX1BGFVYkLowVdBzFLwPd6Ovo5NJl7lgsHBOrdfp6B0XrPBt jFsvzK+srUSboMJ6ynJsbMyJp3xFtvgcY2Ah3z0mj+hm2nWI0loI82rBYhSqM4G5nfzm FeDg== X-Received: by 10.25.37.137 with SMTP id l131mr39770747lfl.142.1452201148333; Thu, 07 Jan 2016 13:12:28 -0800 (PST) Original-Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id l204sm1316026lfg.49.2016.01.07.13.12.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Jan 2016 13:12:27 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Thunderbird/43.0 In-Reply-To: <86oacx6u1e.fsf@stephe-leake.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:197763 Archived-At: On 01/07/2016 10:58 PM, Stephen Leake wrote: >> Thanks, I'll have to play with it. >> >> Does it handle ignores? > > Yes, in the path iterator object. Tried it, and it did what advertised after I added (find-file ...) to the locate-uniquified-file's definition. Has some issues (type `> How's the performance in the Emacs repository? > > There is a noticeable delay, mostly due to computing the partial > completion (before I added that, there was no noticeable delay). Did you try that using an iterator that visits the whole of Emacs repo, not just load-path? E.g., I can't visit xdisp.c this way. > This is a pure elisp implementation. However, the path iterator object > could provide the directory list to the subprocess find function as > well. Will Emacs then call `find' for each of the "shallow" directories in the list? That seems inefficient. Feel free to prove me wrong here, of course. I've been thinking about how we could deletage file-listing (as well as completion, even) to an external tool, so that Emacs can manage to navigate huge projects. It could be a generic method which returns a value similar to EDE's locate-obj (to support a set of operations we'd dispatch: list files, list directories (both with completion), search through files...). But as a first draft, let's imagine having it simply return a list of files in a directory. Certain backends could implement that to traverse some of their "roots" non-recursively. But I think this will only work okay if the list of roots is not too long (that is, converting recursive dirs into non-recursive, anywhere, doesn't fit this approach).