unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Manuel Uberti <manuel.uberti@inventati.org>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: project-find-file: switch to include non-tracked files
Date: Tue, 4 May 2021 19:43:14 +0300	[thread overview]
Message-ID: <8ea3d26b-e50a-b19f-7aaf-7e6478ac22ed@yandex.ru> (raw)
In-Reply-To: <28f1e636-0b95-fa03-5d3a-78c27d24ee48@inventati.org>

On 04.05.2021 17:55, Manuel Uberti wrote:
> On 04/05/21 16:16, Dmitry Gutov wrote:
>> The current behavior is to include the untracked files (unless they are in
>> .gitignore). And you can specify additional ignores through the
>> project-vc-ignores variable.
>>
>> If that is not enough, please outline your usage scenario(s).
> 
> Sure, I'll try to explain myself better. I have Git-versioned projects where I
> usually track an .envrc.sample file for everyone to use as a starting point on
> their own machines. Developers are instructed to copy that file to a local
> (i.e., untracked) .envrc file. Since there could (and usually will) be
> information we don't want to be tracked on Git (e.g., one's own system-related
> customizations), .envrc is listed in .gitignore.
> 
> Every now and then, I need to open that .envrc file and add something, but
> because it is listed in .gitignore, the file doesn't show up in project-find-file.

Aha! So you want to open an _ignored_ file (which is also untracked, of 
course).

There are two ways to solve this:

- Add "whitelisting" syntax to project-vc-ignores and the 
project-ignores method. Then you edit the value of this variable, 
whitelisting .envrc in the given project (or globally), and 
project-find-file will always include it.

- We add an arg like NO-PROJECT-IGNORES to the project-files method. 
Then project-find-file could use it in (some?) circumstances.

> What helm-ls-git offers is the possibility to hit C-c i and showing the
> untracked files.

Patches or even plain suggestions welcome for the GUI side of this, at 
least. I'm not sure how to add a behavior like this on 'C-c i' to the 
default completing-read interface, which is what project-find-file 
ultimately calls (and can dispatch to alternative UIs like Ivy)

We can add this behavior when a prefix argument is used (like
C-u C-x p f'), but that's no dynamic switching.



  reply	other threads:[~2021-05-04 16:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 13:39 project-find-file: switch to include non-tracked files Manuel Uberti
2021-05-04 14:04 ` Stefan Kangas
2021-05-04 14:16 ` Dmitry Gutov
2021-05-04 14:55   ` Manuel Uberti
2021-05-04 16:43     ` Dmitry Gutov [this message]
2021-05-04 16:57       ` Manuel Uberti
  -- strict thread matches above, loose matches on Subject: below --
2021-10-04  8:33 Manuel Uberti
2021-10-04 11:24 ` Philip Kaludercic
2021-10-04 13:44   ` Stefan Kangas
2021-10-04 13:50     ` Manuel Uberti
2021-10-04 14:06       ` Stefan Kangas
2021-10-05 19:28         ` Dmitry Gutov
2021-10-05 19:47 ` Dmitry Gutov
2021-10-06  5:18   ` Manuel Uberti
2021-10-06  6:05     ` Dmitry Gutov
2021-10-06  6:12       ` Manuel Uberti
2021-10-14  0:47         ` Dmitry Gutov
2021-10-14  6:37           ` Manuel Uberti
2021-10-14 12:01             ` Dmitry Gutov
2021-10-14 12:06               ` Manuel Uberti
2021-10-14 21:55                 ` Dmitry Gutov
2021-10-15  5:24                   ` Manuel Uberti
2021-10-15 12:12                     ` Dmitry Gutov
2021-10-15 13:05                       ` Manuel Uberti
2021-10-15 13:25                         ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=8ea3d26b-e50a-b19f-7aaf-7e6478ac22ed@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=manuel.uberti@inventati.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).