[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vc-dir default directory: repository root?
From: |
Wolfgang Jenkner |
Subject: |
Re: vc-dir default directory: repository root? |
Date: |
Wed, 21 Jan 2015 20:35:19 +0100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) |
On Wed, Jan 21 2015, Stefan Monnier wrote:
> We can provide the default-directory in M-n or something like that, but
> Daniel's patch is good.
What about the following patch, which would also provide that behaviour
while making it obvious how to work around this regr^H^H^H^H new feature
in a not too inconvenient way and get the current behaviour back, viz.,
by using C-k to kill all trailing "../" components.
Wolfgang
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 8bba79c..b6352e4 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1241,8 +1241,10 @@ These are the commands available for use in the file
status buffer:
;; Otherwise if you do C-x v d -> C-x C-f -> C-c v d
;; you may get a new *vc-dir* buffer, different from the original
(file-truename (read-directory-name "VC status for directory: "
- default-directory default-directory t
- nil))
+ default-directory nil t
+ (when-let ((root (vc-root-dir)))
+ (file-relative-name root
+
default-directory))))
(if current-prefix-arg
(intern
(completing-read
- Re: vc-dir default directory: repository root?, (continued)
- Re: vc-dir default directory: repository root?, João Távora, 2015/01/21
- Re: vc-dir default directory: repository root?, Dmitry Gutov, 2015/01/21
- Re: vc-dir default directory: repository root?, João Távora, 2015/01/21
- Re: vc-dir default directory: repository root?, Dmitry Gutov, 2015/01/21
- Re: vc-dir default directory: repository root?, João Távora, 2015/01/22
- Re: vc-dir default directory: repository root?, Dan Nicolaescu, 2015/01/22
- Re: vc-dir default directory: repository root?,
Wolfgang Jenkner <=
- Re: vc-dir default directory: repository root?, Daniel Colascione, 2015/01/21
- Re: vc-dir default directory: repository root?, Stefan Monnier, 2015/01/21
- Re: vc-dir default directory: repository root?, Daniel Colascione, 2015/01/22
- Re: vc-dir default directory: repository root?, Dmitry Gutov, 2015/01/21
- Re: vc-dir default directory: repository root?, Andreas Schwab, 2015/01/22
- Re: vc-dir default directory: repository root?, Dmitry Gutov, 2015/01/22
- Re: vc-dir default directory: repository root?, Jan D., 2015/01/22
- Re: vc-dir default directory: repository root?, Stefan Monnier, 2015/01/22
- Re: vc-dir default directory: repository root?, Dmitry Gutov, 2015/01/22
- Re: vc-dir default directory: repository root?, Andreas Schwab, 2015/01/22