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: Sat, 9 Jan 2016 02:49:13 +0300 Message-ID: <56904AF9.3050906@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> <568ED4BA.4030108@yandex.ru> <86a8of7up3.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 1452296969 16507 80.91.229.3 (8 Jan 2016 23:49:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Jan 2016 23:49:29 +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 Sat Jan 09 00:49:24 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 1aHgmZ-0004my-9R for ged-emacs-devel@m.gmane.org; Sat, 09 Jan 2016 00:49:23 +0100 Original-Received: from localhost ([::1]:38469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHgmY-0006ht-OM for ged-emacs-devel@m.gmane.org; Fri, 08 Jan 2016 18:49:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHgmV-0006hl-Kr for emacs-devel@gnu.org; Fri, 08 Jan 2016 18:49:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHgmS-0006Jt-9U for emacs-devel@gnu.org; Fri, 08 Jan 2016 18:49:19 -0500 Original-Received: from mail-lf0-x234.google.com ([2a00:1450:4010:c07::234]:34228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHgmR-0006Il-TS for emacs-devel@gnu.org; Fri, 08 Jan 2016 18:49:16 -0500 Original-Received: by mail-lf0-x234.google.com with SMTP id d17so19022239lfb.1 for ; Fri, 08 Jan 2016 15:49:15 -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=R3VN7ckz4BQRmETNdLj431WPAnTGySYs84qE/c90v0M=; b=xsWBByfKcgia4szuy//HSNi01ASbHQDgfUiGYRNIg/i5xXJRasE72NtIVucurPMGE4 vqUBlBvfNOZfgHRSvBYL4BkoScZn5AzSPDIUpsGsjRqXeunWtHWSTYe8Om0vyAgBRlkY kwNO8rKnBFH1lxKx4OXZP/+fg9Ehxiz1nrzLYVPerfH5Ol1AYM5R/fEKIjR5gyKBgKym mB7fVfJRjlD4nyThXZ/7zAyW3gJSEfdm1nD1RmSlyUHZVYF5AYa0DLJCSkY0TJV6tGMT RpZuivVOO+aSakXYZbsoAPqyUhg4uzwmimtn48OSpdCEj+z2GSqYJhmgdAhueoqtHfBg 1itg== X-Received: by 10.25.137.194 with SMTP id l185mr24141522lfd.41.1452296954638; Fri, 08 Jan 2016 15:49:14 -0800 (PST) Original-Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id i194sm19256778lfg.20.2016.01.08.15.49.13 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jan 2016 15:49:13 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Thunderbird/43.0 In-Reply-To: <86a8of7up3.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:197857 Archived-At: On 01/08/2016 10:11 PM, Stephen Leake wrote: > Hmm? the doc string of `locate-uniquified-file' says "return an > absolute-filename", not "visit a file". Sorry, I got confused. I looked for an interactive function to showcase the logic, and there were only two of them. And only the first one actually worked interactively. >> As written, though, it only lists files at the top-level of load-path, >> without recursing. > > Yes, that's consistent with `locate-file', and all other uses of > `load-path'. I suppose so. It's not how I'd imagine a `project-find-file' command to work. > To add all directories that contain elisp files, you need to build the > path iterator directly: I would hesitate to ask that of every user. > But once you get used to it, you'll find that you simply don't care > about the directory; you really only need it to disambiguate colliding > names. So the suffix style makes sense. One drawback of your method is that I don't know what to type, in advance. The necessary entry might have duplicates (and thus, a disambiguating prefix/suffix), or it might not. So it's hard to navigate to a file based on muscle memory alone. The current project-find-file completion is not ideal, but it already makes that less of an issue. >>>> 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. > > Yes; I use a variant of the above path-iterator constructor that adds > the C directories. But that also requires the project code to know about > multiple languages, so it's part of a multi-language project package. Do you have any performance numbers?