all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: jan.synacek@posteo.org
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 55632@debbugs.gnu.org, DG <raaahh@gmail.com>
Subject: bug#55632: [PATCH] Add new user option project-vc-find-tracked-only
Date: Mon, 30 May 2022 10:08:52 +0000	[thread overview]
Message-ID: <dec620e6b37272e42aa892b322203a5e@posteo.de> (raw)
In-Reply-To: <9e283838-aaa1-345e-bce8-21ee863dbc31@yandex.ru>

On 27.05.2022 15:55, Dmitry Gutov wrote:
> On 25.05.2022 12:08, Jan Synáček wrote:
>> Currently, `project-find-file' always includes untracked files, which 
>> 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 
>> set
>> to nil, which means the behavior is not changed.
> 
> Sure, thanks. I'll review this soon-ish.
> 
> 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 
add anything to ignore.

Long answer:
This mostly applies to the git and mercurial Emacs backends where the 
untracked files are
used by default now. I think that presenting a "project" as pretty much 
everything in a
folder (unless selectively ignored by using project-vc-ignores, for 
example) only makes
sense if there is no underlying VCS, otherwise it's pretty much 
backwards. Because if
there's already a repo that tracks files, the project should be, in my 
opinion, just the
files in that repo that the underlying VCS sees as tracked. That is the 
default behavior
in git and mercurial as far as I know (I don't use mercurial much, but 
use git a lot). The
VCS also has a mechanism for including untracked files in case the user 
wants to see them
in some operations, and ignoring additional files so that they don't 
count towards those
untracked files. These two options should map 1 to 1 to Emacs custom 
variables, in my
opinion.
So, in summary, I would suggest to change the VC backends that support 
this to behave by
default as the underlying VCS would behave and use custom variables to 
add additional
tweaks for non-default stuff. Of course, that is out of scope for this 
patch.





  parent reply	other threads:[~2022-05-30 10:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25  9:08 bug#55632: [PATCH] Add new user option project-vc-find-tracked-only Jan Synáček
2022-05-27 11:01 ` Lars Ingebrigtsen
2022-05-27 13:55 ` Dmitry Gutov
2022-05-29 21:41   ` Dmitry Gutov
2022-05-30 11:00     ` jan.synacek
2022-05-31 22:49       ` Dmitry Gutov
2022-06-02 19:01         ` jan.synacek
2022-06-02 19:19           ` Eli Zaretskii
2022-06-02 23:45             ` Dmitry Gutov
2022-06-03  5:44               ` Eli Zaretskii
2022-06-04  0:37                 ` Dmitry Gutov
2022-06-04  6:29                   ` Eli Zaretskii
2022-06-04  9:40                     ` Dmitry Gutov
2022-05-30 10:08   ` jan.synacek [this message]
2022-05-31 22:57     ` Dmitry Gutov
2022-06-01 15:21       ` jan.synacek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dec620e6b37272e42aa892b322203a5e@posteo.de \
    --to=jan.synacek@posteo.org \
    --cc=55632@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=raaahh@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.