all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Wolfgang Jenkner <wjenkner@inode.at>
To: Daniel Colascione <dancol@dancol.org>
Cc: Dan Nicolaescu <dann@gnu.org>, Dmitry Gutov <dgutov@yandex.ru>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: vc-dir default directory: repository root?
Date: Thu, 22 Jan 2015 17:11:25 +0100	[thread overview]
Message-ID: <85fvb2pz6b.fsf@iznogoud.viz> (raw)
In-Reply-To: 54C0013C.7070601@dancol.org

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




  parent reply	other threads:[~2015-01-22 16:11 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-10  6:52 vc-dir default directory: repository root? Daniel Colascione
2015-01-11  1:26 ` Stefan Monnier
2015-01-11  8:33 ` Andreas Schwab
2015-01-11 15:53 ` Wolfgang Jenkner
2015-01-11 19:02 ` Dan Nicolaescu
2015-01-19  1:40   ` Dmitry Gutov
2015-01-19 15:47     ` Dan Nicolaescu
2015-01-19 23:17       ` Dmitry Gutov
2015-01-20 20:06         ` Dan Nicolaescu
2015-01-21 14:33           ` Stefan Monnier
2015-01-21 16:20             ` Ivan Shmakov
2015-01-21 17:33             ` Dan Nicolaescu
2015-01-21 17:48               ` Dmitry Gutov
2015-01-21 18:22                 ` Ivan Shmakov
2015-01-21 18:43                   ` Dmitry Gutov
2015-01-21 19:22                     ` Ivan Shmakov
2015-01-21 18:47                 ` João Távora
2015-01-21 19:06                   ` Dmitry Gutov
2015-01-21 20:14                     ` João Távora
2015-01-21 20:30                       ` Dmitry Gutov
2015-01-22 12:40                         ` João Távora
2015-01-22 15:19                 ` Dan Nicolaescu
2015-01-21 19:35             ` Wolfgang Jenkner
2015-01-21 19:42               ` Daniel Colascione
2015-01-21 20:16                 ` Stefan Monnier
2015-01-22  9:59                   ` Daniel Colascione
2015-01-22  1:44                 ` Dmitry Gutov
2015-01-22  9:17                   ` Andreas Schwab
2015-01-22 11:14                     ` Dmitry Gutov
2015-01-22 12:04                       ` Jan D.
2015-01-22 14:18                     ` Stefan Monnier
2015-01-22 14:23                       ` Dmitry Gutov
2015-01-22 14:38                         ` Andreas Schwab
2015-01-22 14:46                           ` Dmitry Gutov
2015-01-22 15:30                             ` Drew Adams
2015-01-22 16:16                               ` Dmitry Gutov
2015-01-22 15:40                             ` Andreas Schwab
2015-01-22 14:45                         ` Ivan Shmakov
2015-01-22 14:49                           ` Dmitry Gutov
2015-01-22 15:50                             ` Ivan Shmakov
2015-01-22 16:26                               ` Dmitry Gutov
2015-01-22 16:11                 ` Wolfgang Jenkner [this message]
2015-01-19  1:38 ` Dmitry Gutov
2015-01-19  3:01   ` Stefan Monnier
2015-01-19  4:54     ` Dmitry Gutov
2015-01-19 14:16       ` Stefan Monnier
2015-01-19 14:55         ` Dmitry Gutov
2015-01-19 14:57           ` Daniel Colascione
2015-01-19 22:43             ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85fvb2pz6b.fsf@iznogoud.viz \
    --to=wjenkner@inode.at \
    --cc=dancol@dancol.org \
    --cc=dann@gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.