bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12492: Acknowledgement (24.2.50; Open vc-dir buffer easier and faste


From: Dmitry Gutov
Subject: bug#12492: Acknowledgement (24.2.50; Open vc-dir buffer easier and faster)
Date: Mon, 1 Jul 2019 15:56:42 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1

On 01.07.2019 11:02, Andreas Schwab wrote:
On Sep 23 2012, Dmitry Gutov <address@hidden> 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)))))





reply via email to

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