[Top][All Lists]

[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.


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
     (if current-prefix-arg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]