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: Fri, 15 Oct 2021 15:05:15 +0200 Message-ID: <0d5bdd80-4a3c-d038-714f-91d7dad019f5@inventati.org> References: <2b9ae9f3-a253-f4f4-c08c-05e3c8ef1115@yandex.ru> <9995e361-34f1-9aa6-f854-eb197723a8fd@yandex.ru> <792bff0a-7121-2830-f00c-794614e61350@yandex.ru> <3d7d8880-8cfd-51a8-1ccd-52afb04c95e6@inventati.org> <24fbdd11-d6a6-f7e6-0be2-3f7f199686f2@yandex.ru> <2b94e31a-1e20-ac07-e201-525e81b46363@inventati.org> <3abfb5f5-a034-d234-fe6a-de00e01782b9@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="14884"; 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 Fri Oct 15 15:09:39 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 1mbMxu-0003da-Q5 for ged-emacs-devel@m.gmane-mx.org; Fri, 15 Oct 2021 15:09:38 +0200 Original-Received: from localhost ([::1]:41818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mbMxs-0004Ep-MR for ged-emacs-devel@m.gmane-mx.org; Fri, 15 Oct 2021 09:09:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbMty-0002Au-5p for emacs-devel@gnu.org; Fri, 15 Oct 2021 09:05:34 -0400 Original-Received: from confino.investici.org ([2a00:c38:11e:ffff::a020]:41755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbMtv-0002LE-H0 for emacs-devel@gnu.org; Fri, 15 Oct 2021 09:05:33 -0400 Original-Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4HW6254KQKz10xY; Fri, 15 Oct 2021 13:05:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1634303117; bh=x0ssHoxd8WTZThvd3GMpx936HMaC6qxKo/WclU/gwBI=; h=To:References:From:Subject:Date:In-Reply-To:From; b=X72DviaOmyjy5ylpICQBi6LllhA7MgotXx/FSW/4aC9Tm3jMjWZWUBzAGCtIXwN8s pbQ4m8mGjxCqYwcDKf3Bj80ZKw9kRY1Ph6B+WM19gPhrl/UtFqKzgO6vZlQNCGTmEz V9f6N3BTYLEp0r3ID/anF6yrXnVvQWufaAXIh4kY= Original-Received: from [212.103.72.250] (mx1.investici.org [212.103.72.250]) (Authenticated sender: manuel.uberti@inventati.org) by localhost (Postfix) with ESMTPSA id 4HW6251LK6z10sp; Fri, 15 Oct 2021 13:05:16 +0000 (UTC) In-Reply-To: <3abfb5f5-a034-d234-fe6a-de00e01782b9@yandex.ru> Content-Language: en-GB Received-SPF: pass client-ip=2a00:c38:11e:ffff::a020; envelope-from=manuel.uberti@inventati.org; helo=confino.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:277118 Archived-At: On 15/10/21 14:12, Dmitry Gutov wrote: > Both of these are for the default project-files behavior. > > How would we leverage them? Not sure, sorry. I don't know the rationale behind the decision to stop using vc-directory-exclusion-list, and I have to dig deeper in project.el to better understand what project-ignores and a project-vc-ignores do and how they are used at the moment. > Thanks for checking, I've pushed the patch (slightly tweaked). I'll give it a try later and come back if I find any issue with it. > Perhaps ideally, we'd just ignore such directories, leaving it to the user to > figure out why the files are not showing up. But 'find' doesn't make it easy. > First, adding > >   -o -type d -a ! -readable > > kinda works, but it's a GNU extension, not available on e.g, macOS, so it's a > no-go. And even with the '-type d' qualifier it adds some runtime cost, somehow. > > I suppose we could just redirect stderr to null (like vc-git--out-ok does) and > check for success by the presence of \0 chars in the output, but that's both > quite lax and leaves us unable to print the error message when indeed some other > kind of error happens. I guess redirecting stderr to a file is the remaining > option... I am ok with customizing a setting to ignore specific directories, but as you said before it should not slow down find. But parsing \0 chars sound a bit scary to me, so yeah, it's a tricky one. -- Manuel Uberti www.manueluberti.eu