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: Dmitry Gutov <dgutov <at> yandex.ru>
To: Andreas Schwab <schwab <at> suse.de>
Cc: 12492 <at> debbugs.gnu.org
Subject: bug#12492: Acknowledgement (24.2.50; Open vc-dir buffer easier and faster)
Date: Mon, 1 Jul 2019 15:56:42 +0300
On 01.07.2019 11:02, Andreas Schwab wrote:
> On Sep 23 2012, Dmitry Gutov <dgutov <at> yandex.ru> wrote:
> 
>> +(defun vc-root-dir ()
> 
> This is already defined in vc.el.

True. The patch predated the introduction of that function.

Here's the code that I have been using for the last few years:

(defun vc-dir-quick ()
  (interactive)
  (require 'vc-dir)
  (let* ((file (or buffer-file-name default-directory))
         (backend (vc-responsible-backend file))
         (dir (vc-call-backend backend 'root file)))
    (let (pop-up-windows)
      (pop-to-buffer (vc-dir-prepare-status-buffer "*vc-dir*" dir 
backend)))
    (unless (derived-mode-p 'vc-dir-mode)
      (let ((use-vc-backend backend))
        (vc-dir-mode)))))




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.