[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: |
Thu, 22 Jan 2015 17:11:25 +0100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) |
On Wed, Jan 21 2015, Daniel Colascione wrote:
> On 01/21/2015 11:35 AM, Wolfgang Jenkner wrote:
>> 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.
>
> That seems like it'd confuse users.
That's because it's more natural to do things the other way around,
IMHO, keeping the current default but making it as convenient as
possible to get rid of the file name components after the repo root.
That's quite similar to the way GTK widgets for selecting things work,
so it won't confuse people too much, I think.
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 8bba79c..d7c6e97 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1240,9 +1240,12 @@ These are the commands available for use in the file
status buffer:
;; therefore it makes sense to always do that.
;; 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))
+ (file-truename (let ((root (vc-root-dir)))
+ (read-directory-name "VC status for directory: "
+ root nil t
+ (when root
+ (file-relative-name
default-directory
+ root)))))
(if current-prefix-arg
(intern
(completing-read
- Re: vc-dir default directory: repository root?, (continued)
- Re: vc-dir default directory: repository root?, Dmitry Gutov, 2015/01/22
- 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?, Drew Adams, 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
- Re: vc-dir default directory: repository root?, Ivan Shmakov, 2015/01/22
- Re: vc-dir default directory: repository root?, Dmitry Gutov, 2015/01/22
- Re: vc-dir default directory: repository root?, Ivan Shmakov, 2015/01/22
- Re: vc-dir default directory: repository root?, Dmitry Gutov, 2015/01/22
- Re: vc-dir default directory: repository root?,
Wolfgang Jenkner <=
Re: vc-dir default directory: repository root?, Dmitry Gutov, 2015/01/18
- Re: vc-dir default directory: repository root?, Stefan Monnier, 2015/01/18
- Re: vc-dir default directory: repository root?, Dmitry Gutov, 2015/01/18
- Re: vc-dir default directory: repository root?, Stefan Monnier, 2015/01/19
- Re: vc-dir default directory: repository root?, Dmitry Gutov, 2015/01/19
- Re: vc-dir default directory: repository root?, Daniel Colascione, 2015/01/19
- Re: vc-dir default directory: repository root?, Dmitry Gutov, 2015/01/19