From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: project-find-file: switch to include non-tracked files Date: Tue, 4 May 2021 19:43:14 +0300 Message-ID: <8ea3d26b-e50a-b19f-7aaf-7e6478ac22ed@yandex.ru> References: <9d620142-6009-d1bf-813f-17d091511c58@yandex.ru> <28f1e636-0b95-fa03-5d3a-78c27d24ee48@inventati.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23106"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 To: Manuel Uberti , emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 04 19:01:42 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 1ldyQY-0005nw-4v for ged-emacs-devel@m.gmane-mx.org; Tue, 04 May 2021 19:01:42 +0200 Original-Received: from localhost ([::1]:55160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldyQW-0008H5-UT for ged-emacs-devel@m.gmane-mx.org; Tue, 04 May 2021 13:01:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldy8p-0006TJ-MF for emacs-devel@gnu.org; Tue, 04 May 2021 12:43:24 -0400 Original-Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:35478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldy8n-0001Fu-Of for emacs-devel@gnu.org; Tue, 04 May 2021 12:43:23 -0400 Original-Received: by mail-wm1-x32e.google.com with SMTP id j3-20020a05600c4843b02901484662c4ebso1720625wmo.0 for ; Tue, 04 May 2021 09:43:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HEMl/TmyTGJrXXRHssIC8mb3TEtwTAhwJfhm4YL04H8=; b=RlZxQBJ7i8nP3cckM9RipHMuccJGJsk046jgcNhUCpBTt2JP+Utap1n249x0kvKFKX YN1VogYzoPLUNa2fyLsEwwKHH/HMRFJZSvPhvQk/fdxX+vAKxy3QbE4hih8mkMguNjT2 r3MiyBOSdNBl4/nbxEj/RBWPqQEnlfUFo9X8iaNaFmKsMevwk5jkiKhd08kOvi9SkEKj /EwMXUcouIkYKGxVZrpG7xIWV9CJXRt0yOaLzSH71VGNdQVO7xkn2myqy18+N1LISYy5 hdE2LjCLxSjDUXmEX4CQIP2/p3BmAm/IxoOvl7i9xzo8d5GFYKZj7Dp29AAhw8P4FmC6 bNSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HEMl/TmyTGJrXXRHssIC8mb3TEtwTAhwJfhm4YL04H8=; b=GqWLnbaJlPrQN1ceX/LCKdU+4uSooKY4zurfUMdP9R08gO6yuM/RNLfk+Wuv8CjOvH hufqVEHGfU957ia+iSoXXkajlYWa/3dt5EldU0zR3TH2AS74m70tz/Fhi/5A3YMYpbDm jvqwbLAekzJXLo3mZNe33M67ZNNWgB0efyxpu/Zsyl7aGQxG4Zu9NGFrCLqZnjl/1WSD KTgrRGIwx0Vm8ldLYrTr2re083IyyzAckiD9AfpxXNrLkrztGEfRhrLUAGqqPD6btG0g VQ8dACiBYGyQ0KcE8kehZUNvUbrlsTet6Lt//fgR0hmI0tW/riMzkhyIY4Mj0rWQ8ApG lWRQ== X-Gm-Message-State: AOAM531Qw7FWtWcEEn87lCK/xijCPDc/GRWkhwrOjPSAUNFpoEg7jw3/ bofQcklK73+f34/Q4D1SBAYqAyYpu5A= X-Google-Smtp-Source: ABdhPJwct1xGzIbcvaHhTld8WuJN5Vk8FKRYHd/Dno1pcES0w8fLLEmdWKYtmk5j46iJnhJdbzLwtA== X-Received: by 2002:a7b:cf38:: with SMTP id m24mr28463480wmg.174.1620146596787; Tue, 04 May 2021 09:43:16 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id m11sm16753005wri.44.2021.05.04.09.43.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 May 2021 09:43:16 -0700 (PDT) In-Reply-To: <28f1e636-0b95-fa03-5d3a-78c27d24ee48@inventati.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:268885 Archived-At: 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.