From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Uberti Newsgroups: gmane.emacs.devel Subject: Re: project-find-file: switch to include non-tracked files Date: Wed, 6 Oct 2021 07:18:12 +0200 Message-ID: References: <2b9ae9f3-a253-f4f4-c08c-05e3c8ef1115@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4660"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 To: Dmitry Gutov , emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 06 07:22:15 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXzNf-0000yD-73 for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Oct 2021 07:22:15 +0200 Original-Received: from localhost ([::1]:50796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXzNb-0000Xk-2s for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Oct 2021 01:22:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXzK0-00087P-M0 for emacs-devel@gnu.org; Wed, 06 Oct 2021 01:18:28 -0400 Original-Received: from latitanza.investici.org ([2001:888:2000:56::19]:45477) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXzJx-0002S4-PT for emacs-devel@gnu.org; Wed, 06 Oct 2021 01:18:28 -0400 Original-Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4HPN5K3f9jzGp48; Wed, 6 Oct 2021 05:18:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1633497493; bh=Bvr07hbjA4vRUoGwDn8vHLGLY2kYKBLy04OUOIvF6H4=; h=To:References:From:Subject:Date:In-Reply-To:From; b=hsedl1SMfvRANzNiMswoJ4xZgKmIwCkCc/dyEFq3Bkse+RavaU39fI8pakQHoufwf iqzo2Ke3B2Hao5uEJfmbFkmP1t2urjyrNtBchOGsLgXw+p9qamMkMnRerNZ7eR6rr0 RFptdnLGzvruUv5d3a3IPYHynwioKIrmDEKbL68Y= Original-Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: manuel.uberti@inventati.org) by localhost (Postfix) with ESMTPSA id 4HPN5K2jfkzGp44; Wed, 6 Oct 2021 05:18:13 +0000 (UTC) In-Reply-To: <2b9ae9f3-a253-f4f4-c08c-05e3c8ef1115@yandex.ru> Content-Language: en-GB Received-SPF: pass client-ip=2001:888:2000:56::19; envelope-from=manuel.uberti@inventati.org; helo=latitanza.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:276405 Archived-At: On 05/10/21 21:47, Dmitry Gutov wrote: > It kind of got lost among other issues, sorry. That's doubly easy to do with > emacs-devel threads, so if you could use Debbugs for feature requests in the > future, that would be great. Do you want me to move the discussion on Debbugs? > Now, I've whipped up a small POC. See the attachment, try it out. > Since 'find' without ignore instructions is as fast as 'git ls-files' (even > faster, in my testing, on my machine), it didn't require any changes in the API > so far. Thank you. I gave it a try and it works as expected. > But is that the behavior we want? > > Currently it lists _all_ files in the directory, including, say, all contents of > .git/ (of which there can be a lot, depending on the project, whether it uses > 'git flow', etc). > > Should we add the common ignores from vc-directory-exclusion-list? To simply > filter those dirs out? > > Maybe something else too? Like grep-find-ignored-files (it lists common > compiled/object files which one usually doesn't want to search, or even visit)? > > Combining the vars above would bring the file listing to the default > 'project-ignores' behavior. Which the 'transient' backend uses, for example. I think ignoring directories such as .git would be good to speed up the command and make the candidate list cleaner. > But in the previous iteration of this thread you also referred to Helm's 'C-c i' > behavior. Does it only list the ignored files? 'C-c i' in helm-ls-git toggles the '-o' switch for git ls-files, so it does not include the listing of the .git directory in its result. > In any case, we could make 'C-u project-find-file' have this behavior: listing > only ignored files instead. And maybe not all of them: skipping the contents of > .git/, .bzr/, etc, still sounds useful. The upside is possibly having a lot > fewer files to choose from. I agree with you. -- Manuel Uberti www.manueluberti.eu