From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: jan.synacek@posteo.org Newsgroups: gmane.emacs.bugs Subject: bug#55632: [PATCH] Add new user option project-vc-find-tracked-only Date: Mon, 30 May 2022 10:08:52 +0000 Message-ID: References: <87leuqkmhl.fsf@posteo.org> <9e283838-aaa1-345e-bce8-21ee863dbc31@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15838"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55632@debbugs.gnu.org, DG To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 30 12:09:23 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1nvcKx-0003tn-54 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 May 2022 12:09:23 +0200 Original-Received: from localhost ([::1]:60458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvcKw-0001QP-4G for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 May 2022 06:09:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvcKd-0001DF-Cg for bug-gnu-emacs@gnu.org; Mon, 30 May 2022 06:09:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvcKd-00010n-3Z for bug-gnu-emacs@gnu.org; Mon, 30 May 2022 06:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nvcKc-0007Ud-Uy for bug-gnu-emacs@gnu.org; Mon, 30 May 2022 06:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: jan.synacek@posteo.org Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 May 2022 10:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55632 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 55632-submit@debbugs.gnu.org id=B55632.165390534228785 (code B ref 55632); Mon, 30 May 2022 10:09:02 +0000 Original-Received: (at 55632) by debbugs.gnu.org; 30 May 2022 10:09:02 +0000 Original-Received: from localhost ([127.0.0.1]:42822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nvcKb-0007U9-S9 for submit@debbugs.gnu.org; Mon, 30 May 2022 06:09:02 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:53933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nvcKa-0007Th-7q for 55632@debbugs.gnu.org; Mon, 30 May 2022 06:09:01 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 4207E240108 for <55632@debbugs.gnu.org>; Mon, 30 May 2022 12:08:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.org; s=2017; t=1653905334; bh=JZzH+Ea1vJmEdsDvBhNHw9o1VUm5G1awWEw9xC0dtww=; h=Date:From:To:Cc:Subject:From; b=lBpcTqRcWgAuL6UB6KQM0zEBIchxEPnkxWdc3RgPwOSwyC8m4BKelCVBelsDIthjJ B4x0HUtrSjgnCh3yZV7oYkEXlCSq9nhE6KwXBNBT8Iqj/COslFvf3pPOU85c3iHoiA a09Ff5cTi0Q2C9LrcTq1OPpWo8aGyNjtYs6RzX3lNpBoYKiQ/Aq0JArc2bfzCkKNUe 35kgG0tngndka4dzDJnvnqUTgQP+WqnE0PkWcgB3h/cSCajopY8qv9BsHr2Ze6KIEc p/7eypijsZCy3NZyshaOmO9+uRFUtQks17x+dZ2aAeb7B+nZzlr1aXpEv/6JIF6a8s DHds5/R20ecNA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LBWMn0z4dz6tmQ; Mon, 30 May 2022 12:08:53 +0200 (CEST) In-Reply-To: <9e283838-aaa1-345e-bce8-21ee863dbc31@yandex.ru> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:233363 Archived-At: On 27.05.2022 15:55, Dmitry Gutov wrote: > On 25.05.2022 12:08, Jan Syn=C3=A1=C4=8Dek wrote: >> Currently, `project-find-file' always includes untracked files, which=20 >> is >> not always the desired behavior. This patch adds a new user option to >> make only find the actual project files. By default, the variable is=20 >> set >> to nil, which means the behavior is not changed. >=20 > Sure, thanks. I'll review this soon-ish. >=20 > As long as you are aware of the user option project-vc-ignores (which > can be set directory-locally), and are certain that it doesn't satisfy > your needs. Short answer: Yes, I'm aware, but that option is something different. I don't want to=20 add anything to ignore. Long answer: This mostly applies to the git and mercurial Emacs backends where the=20 untracked files are used by default now. I think that presenting a "project" as pretty much=20 everything in a folder (unless selectively ignored by using project-vc-ignores, for=20 example) only makes sense if there is no underlying VCS, otherwise it's pretty much=20 backwards. Because if there's already a repo that tracks files, the project should be, in my=20 opinion, just the files in that repo that the underlying VCS sees as tracked. That is the=20 default behavior in git and mercurial as far as I know (I don't use mercurial much, but=20 use git a lot). The VCS also has a mechanism for including untracked files in case the user=20 wants to see them in some operations, and ignoring additional files so that they don't=20 count towards those untracked files. These two options should map 1 to 1 to Emacs custom=20 variables, in my opinion. So, in summary, I would suggest to change the VC backends that support=20 this to behave by default as the underlying VCS would behave and use custom variables to=20 add additional tweaks for non-default stuff. Of course, that is out of scope for this=20 patch.