From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Date: Sun, 21 Jun 2020 03:12:22 +0300 Message-ID: References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="81906"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 Cc: 41821@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 21 02:13:10 2020 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 1jmnbh-000LBy-SH for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Jun 2020 02:13:09 +0200 Original-Received: from localhost ([::1]:42800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmnbg-0004dN-Us for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Jun 2020 20:13:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmnba-0004dD-Pz for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2020 20:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jmnba-0003Kw-Hi for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2020 20:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jmnba-0002dK-Cf for bug-gnu-emacs@gnu.org; Sat, 20 Jun 2020 20:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Jun 2020 00:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41821 X-GNU-PR-Package: emacs Original-Received: via spool by 41821-submit@debbugs.gnu.org id=B41821.159269835610089 (code B ref 41821); Sun, 21 Jun 2020 00:13:02 +0000 Original-Received: (at 41821) by debbugs.gnu.org; 21 Jun 2020 00:12:36 +0000 Original-Received: from localhost ([127.0.0.1]:58960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmnbA-0002cf-0t for submit@debbugs.gnu.org; Sat, 20 Jun 2020 20:12:36 -0400 Original-Received: from mail-wm1-f46.google.com ([209.85.128.46]:54127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmnb4-0002cO-KB for 41821@debbugs.gnu.org; Sat, 20 Jun 2020 20:12:34 -0400 Original-Received: by mail-wm1-f46.google.com with SMTP id l26so11731364wme.3 for <41821@debbugs.gnu.org>; Sat, 20 Jun 2020 17:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=xGr3JIhr4VOBqfKdCGyU+M5sInLYiAwz9FxlfqXzosU=; b=l5/WXCQwqa0n5EYoxr3YJcHI/HBN8mw1SuZ+pGk6EGBh/osMInfpDF55fs/BnPomnl pwc4Ot/9PB50uKhN/+sThiV+gW84ZUTKRLvTg4Z+wHi3jfpZ9zs9JRhQ2HXiEh9+uUye 0B61hChuVwoZeP2d2qE1dNP1D2gavYyRqb6u3b966+NcV7Ej9E9AKP7mGXN0KgMS5wTw RGmL+FAxWdB063FBdBaAQpft5zzOn4g9hUkrVeBjDj3GWdebmqdj7KUF8t+I1XQgVkAE 1qAoLQxNHzOqvmfPfeOk5sdGd8Kb7qCNyrXODr/3N93nH5EEqCBaoTkljA/Dij2HeQCc DmiQ== 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:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xGr3JIhr4VOBqfKdCGyU+M5sInLYiAwz9FxlfqXzosU=; b=aRuJtYVpva361oD14XkUrIUzIoPTcxzYO1/70SwcBAWgfq0l3c6IsipGrzoRwra7hd hW/N1S3Pb5xFFxySJxBmKW73hxHdTCc6AquNASueMtjpRx3ESWRAsyX4FGl9Kq/F2Lou 5B3ryH8Zg9nBmx2iSb+QMKebrb+ybypC6z45cIwT+Xbbc/sklcs/ND6v7LmQ6COxIwVD 20AKBkuTZln64chwnQHBG7YoUQXw5XQ/XkV18tq0nRrMPljffW/GEe6vaGEky3McXEFe YklIyVcb+LSekWjYs9Ib2NmVKaLji0tH3YKZR0zLrwzaQtY/sa7xIZ8cXnH+ijqbNRDJ Kp5Q== X-Gm-Message-State: AOAM530ERbzT32BisMokwa/WQ2a5SDyUmBzPKJCYMynGuvidgiAOduI7 TkwB1SSFnyQVr6sYWzZfYlFZSlDf X-Google-Smtp-Source: ABdhPJwB8a+Cj+Hw+eRB49V+kiXMRfxf+DcEQLxZSyHiAE4LUdWiBNhEx3YkKuHHgj0hIzj5OaE8Ag== X-Received: by 2002:a1c:f616:: with SMTP id w22mr2787358wmc.155.1592698344671; Sat, 20 Jun 2020 17:12:24 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id a12sm1981424wrv.41.2020.06.20.17.12.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 Jun 2020 17:12:24 -0700 (PDT) In-Reply-To: <87y2oh8fdv.fsf@mail.linkov.net> Content-Language: en-US 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:182226 Archived-At: On 21.06.2020 02:51, Juri Linkov wrote: >>> Maybe something like: >> >> Not too bad. >> >> Though I'd rather not extend the public contract of project.el with >> a function that special-cases VC projects. >> >> So maybe something like this instead: >> >> +;; Or use project-try-vc after all. But this should be faster in the >> +;; event when there actually are non-VC based projects in the list. >> +(defun vc--known-vc-roots () >> + (require 'project) >> + (defvar project--list) >> + (project--ensure-read-project-list) > > Calling internal project.el functions from vc.el? Really? The alternative would be to create a function like that in project.el. But I hesitate to make it public, sorry. >> Personally, though, when I want behavior like this, I would probably just >> type 'C-x p v'. > > 'C-x p v' is not a replacement for 'C-x v L'. 'C-x p v L', then? >> The directory name reading with completion performed by >> project-prompt-project-dir is more quick and handy (though I'll confess >> to using Ivy as the completion UI for this and one other function; vertical >> completion fits these long string values best). > > 'M-n' works fine without Ivy to select a recent project dir. Just saying what works better for me. >> It also puts the selected project on the top of the list, which >> vc--known-vc-roots (or your function) don't do. > > I don't understand what is the selected project. The current project? When you select a project to use, the prompting subroutine (project-prompt-project-dir) re-sorts the saved list of project. It is somewhat of an argument to only go through this UI when one needs to select a project to use. > Then neither 'C-x p v', nor 'C-x v L' should ask for a project directory > when called from default-directory of the current project. Not sure what you mean. I think they don't? When called inside a project.