GNU bug report logs - #12492
24.2.50; Open vc-dir buffer easier and faster

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Sat, 22 Sep 2012 23:06:01 UTC

Severity: wishlist

Tags: patch

Found in version 24.2.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 12492 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: bug#12492: Acknowledgement (24.2.50; Open vc-dir buffer easier and faster)
Date: Tue, 03 Mar 2020 00:57:14 +0200
>> Given all the discussed constraints (no change in default behavior of
>> `C-x v d' is allowed, etc.), I see one way to close this bug report -
>> to add a customizable variable:
>
> Why not a new command, like I suggested before? Either way the user would
> have to customize something (a keybinding, in that case).

You can implement a new command in addition to defcustom.
These options are not mutually exclusive.
And the command even could use the new defcustom
in the implementation, e.g.

(defun vc-root-dir ()
  (interactive)
  (let ((vc-dir-default-directory t))
    (call-interactively 'vc-dir) ...

But the command has more unsolved issues:

1. command name - the most natural name would be vc-root-dir,
   but this name is already taken by a non-interactive function.

2. keybinding - there are many contradicting proposals,
   and leaving it unbound is not the best solution.

>> +(defcustom vc-dir-default-directory nil
>> +  "Default directory name for the command `vc-dir'.
>
> Both of these lines look wrong.
>
> VC-Dir already uses the correct directory as the default. What you're
> looking for is to avoid prompting the user.

These details are explained further down in the docstring:

+When nil, `vc-dir' reads a directory name using the minibuffer.
+When non-nil and the current directory is under version control,
+`vc-dir' doesn't ask for a directory name and uses the VC root directory.
+When a string and `vc-dir' is invoked in a directory outside of
+version control, then this string is used as a default directory name.




This bug report was last modified 5 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.