[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41821: 28.0.50; read-directory-name in vc commands should provide de
From: |
Dmitry Gutov |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
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.
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Juri Linkov, 2020/06/11
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Dmitry Gutov, 2020/06/12
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Juri Linkov, 2020/06/18
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Dmitry Gutov, 2020/06/19
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Juri Linkov, 2020/06/20
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects,
Dmitry Gutov <=
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Juri Linkov, 2020/06/21
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Dmitry Gutov, 2020/06/21
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Juri Linkov, 2020/06/22
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Dmitry Gutov, 2020/06/22
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Juri Linkov, 2020/06/23
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Eli Zaretskii, 2020/06/24
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Basil L. Contovounesios, 2020/06/24
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Eli Zaretskii, 2020/06/24
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Dmitry Gutov, 2020/06/24
- bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects, Eli Zaretskii, 2020/06/24