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 20:11:01 +0300 Message-ID: <56913F25.7090907@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> <56904AF9.3050906@yandex.ru> <86d1tb54kj.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 1452359488 7539 80.91.229.3 (9 Jan 2016 17:11:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Jan 2016 17:11:28 +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 18:11:23 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 1aHx2w-0003ju-Nk for ged-emacs-devel@m.gmane.org; Sat, 09 Jan 2016 18:11:22 +0100 Original-Received: from localhost ([::1]:41561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHx2v-0007EY-UJ for ged-emacs-devel@m.gmane.org; Sat, 09 Jan 2016 12:11:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHx2j-0007EH-FD for emacs-devel@gnu.org; Sat, 09 Jan 2016 12:11:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHx2e-0000kE-Fv for emacs-devel@gnu.org; Sat, 09 Jan 2016 12:11:09 -0500 Original-Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]:35041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHx2e-0000jI-8t for emacs-devel@gnu.org; Sat, 09 Jan 2016 12:11:04 -0500 Original-Received: by mail-lf0-x22f.google.com with SMTP id c192so193553948lfe.2 for ; Sat, 09 Jan 2016 09:11:04 -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=7vXCQ8pD6W6LrIwAAIl8Wej7X6U4ZlBy4Ac11FKOXUY=; b=oAPXuukq59vZCM2gXQwagqKWJGEQKMI9ogdLwMDVNybttHV1jSura29W46p5Mkc9Q4 9Pc5zy6yCTuczwLfz03svDdpJHzS61p6FxPWWuW+itez11auFWnorUakUsIP5pdsBSiL FkIhdaaBALsWwBg47Ws35JreJ2MM4Agq5DPaXZgaBD88Jcxx0L31zUOBI435TiZL8aQ3 5UiImMnpzEbyIzQ+XOdTGN57RRF+ReAL+jEU4NS1tb1biMZ9lgdV7CwPvWSx/5yRQoLy PmlSMNkkv8LEdQtrX811ZG3z0xQ0ib+ekEynNFglcRN8ipi50bkWb2DVpDQreztd9+/h 1lvw== X-Received: by 10.25.142.84 with SMTP id q81mr35191092lfd.77.1452359463598; Sat, 09 Jan 2016 09:11:03 -0800 (PST) Original-Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id l204sm2759881lfg.49.2016.01.09.09.11.01 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 09 Jan 2016 09:11:02 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Thunderbird/43.0 In-Reply-To: <86d1tb54kj.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::22f 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:197910 Archived-At: On 01/09/2016 03:18 PM, Stephen Leake wrote: > What is the alternative? > > Only the user knows which directories in load-path should be treated > recursively. I don't see the harm in treating all of them recursively. > That assumes only CEDET is handled recursively; if I add another project > that has recursive dirs, I'll have to add that to this function. This is unnecessarily complex, I think. > If "locate.el" has duplicates, but I don't know that, then I start by > typing "loc", and the completion shows both completions, with > disambiguating suffix. And here's the problem: the user is obliged to refer to your list of disambiguated entries, to pick the right one. It's harder to guess, in advance, what I can type. Which makes the process slower than it has to be. > If the first one is the one I want, I hit . otherwise I hit > . ? Are you using ido-mode? I was discussing how it looks with the default completion mechanism. If you're using icomplete-mode, or ivy-mode, you can also M-x project-find-file now, type locate.el, and pick either of the two matches quickly, using C-./C-, or C-n/C-p (respectively) followed by RET. > That's the same pattern needed to distinguish "filter.el" from > "filters.el", except the disambiguation in the first case happens to > include directories. Right, and in any case, I can admit that for files with unique base names your approach yields fewer false positives than fuzzy matching across full relative names. On the other hand, I find being able to see the relative names rather useful. E.g. I may remember the actual base file name incorrectly; looking at the directory the file with the given name is in, can help me avoid the wrong choice and recall the right name. > If we used prefix directories, there might be a problem; depends on the > details. IME, this approach works fairly well. > On the other hand, with your implementation, I'm required to type > "ede/locate.el" vs "locate.el" to find these two files. So I have a > problem; I don't want to have to memorize all the files in ede, srecode, > and semantic! One ends up memorizing directory names anyway, in the course of working on a project. But no, you don't have to memorize them: you type 'locate.el', press TAB (or RET), and see the directory names in the completions list.