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: Mon, 22 Jun 2020 03:08:36 +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> <87366ohw5z.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="6559"; 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 Mon Jun 22 02:09: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 1jnA1O-0001cT-75 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Jun 2020 02:09:10 +0200 Original-Received: from localhost ([::1]:49788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jnA1M-0001Cf-Qw for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Jun 2020 20:09:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jnA1G-0001CX-2O for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2020 20:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jnA1F-0004st-PW for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2020 20:09:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jnA1F-0007fS-K8 for bug-gnu-emacs@gnu.org; Sun, 21 Jun 2020 20:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Jun 2020 00:09:01 +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.159278452729450 (code B ref 41821); Mon, 22 Jun 2020 00:09:01 +0000 Original-Received: (at 41821) by debbugs.gnu.org; 22 Jun 2020 00:08:47 +0000 Original-Received: from localhost ([127.0.0.1]:32869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnA10-0007ew-MM for submit@debbugs.gnu.org; Sun, 21 Jun 2020 20:08:46 -0400 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:36052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnA0z-0007ed-2i for 41821@debbugs.gnu.org; Sun, 21 Jun 2020 20:08:46 -0400 Original-Received: by mail-wr1-f52.google.com with SMTP id k6so2421198wrn.3 for <41821@debbugs.gnu.org>; Sun, 21 Jun 2020 17:08:45 -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=B+E4uhfrnpOmWxBH+1fxYBJ/nzMYMAcNF9XRXeTx9cs=; b=Uu3mdl0aW3jGoTnS+VE2jo6W2Kx8l9JKECKTRhw5pVbk/zryRsKN9plcXolqz4ddnR +Jpzwysd4BsjZYRB/tEJG/ExCDur1cyRSVPVvHpCQj0Uo53PQtMvqKuPanyp1Nr+r7BB iEU7NQZQKHHylMjrGS+Izq3ncLvwTcq1HZ8nPD2IGwWxQcUY5p9yL180/8al1z1Uk5r5 KNvKlEYRocKdBmMA3OkpqmcDDjWVSuj3SmBr31o5VUT0lAu8qiTxDMqENnsLMXgJFM45 dg/PYV2/feagO8WQWj9G/3TS6LF5jOO5sko6FNVbzh/CUTb3HbGeeyC+gAEK9KIHiMnm Xb8Q== 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=B+E4uhfrnpOmWxBH+1fxYBJ/nzMYMAcNF9XRXeTx9cs=; b=WOKWDOfBtFJDeetuznBklIHJ5ZO6jb4OhMr4QVd0lVNraO+vLh/STmuHL87ZvT7RTN IYXkBsx/zgGADn2cyoEMsAKfvmeHjbF4frSrUmcD4761jYcMZWICFAghSFPJOIyFiV6z 7l2kD3JkiIA/CGW53XA18wwUZLolRK2WW01wEmTFtslT/cD61MWUzOMbsrTKaaYEEJ5M +1Oe0KJk5EonKV61vnq0SF2ISwixHMvvQgU8BwrdebZT9ARVCTtHlisvbPTy+QFZjJ1S k/K0OrA7sx1GztaU2/HxJytit2nPyNRz9am7KN5wZ7OeFl0Rv9C/eCYKLQy9LwUuVOLE uZzw== X-Gm-Message-State: AOAM530+rFdF92lWXfIW8olXy4zd2Q3wmUmO1NMRdmpAtb1JQPwA8HgX Ayx5AWsSwNiPYTUTlQmtp1fKZIv+ X-Google-Smtp-Source: ABdhPJwm/hR1wL4F6tIX71SXkeI1CYTRscrqeT5C7ppS1iVHE4+Jn79I8cJqEQZ+8rWPAoK6IJ9IAw== X-Received: by 2002:a5d:4244:: with SMTP id s4mr13793846wrr.5.1592784518806; Sun, 21 Jun 2020 17:08:38 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id d28sm16557260wrc.50.2020.06.21.17.08.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Jun 2020 17:08:38 -0700 (PDT) In-Reply-To: <87366ohw5z.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:182268 Archived-At: On 22.06.2020 01:49, Juri Linkov wrote: >>>> +;; 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. > > Why not? Because I'd rather not have external code depend on what exact kind of project backend is in use. > We have to decide which of them should be dependent. It would be fine > either way: project.el to use vc.el public functions, or vice versa. There are other private functions shared between project.el and xref.el. So I this is fine, kind of. But you have noted an alternative option below: >>>> 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? > > 'C-x v L' needs to provide a list of recently used repositories. If you like. > Actually, this feature doesn't depend on project.el, so recently > used repositories could be recorded independently without project.el. This is the alternative option. It would create a yet another file in the user's dir, though. > But it would be nice to share these directories between project.el and vc.el. Perhaps there could be a public function in project.el called project-known-roots.