GNU bug report logs - #6870
Make vc-root-diff work in more modes

Previous Next

Package: emacs;

Reported by: rogers-emacs <at> rgrjr.dyndns.org

Date: Tue, 17 Aug 2010 01:55:02 UTC

Severity: minor

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 6870 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: rogers-emacs <at> rgrjr.dyndns.org, 6870 <at> debbugs.gnu.org
Subject: Re: bug#6870: Make vc-root-diff work in more modes
Date: Mon, 04 Jul 2011 14:13:42 -0400
>> (cond ((derived-mode-p 'vc-dir-mode)  vc-dir-backend)
>> -		 ((derived-mode-p 'dired-mode) (vc-responsible-backend default-directory))
>> -		 (vc-mode (vc-backend buffer-file-name))))
>> +		 (vc-mode (vc-backend buffer-file-name))
>> +		 (t (vc-responsible-backend default-directory))))
>> rootdir working-revision)
>> (unless backend
>> (error "Buffer is not version controlled"))

> This looks very reasonable to me, but I'm not all that familiar with
> vc.el internals.  Does anybody else have any opinions on this?

It's only reasonable in buffers where default-directory is really
meaningful.  E.g. in *Help* or *info* it's likely not going to do you
much good.
So feel free to add more major modes (rather than just `dired'), but
I don't think using (vc-responsible-backend default-directory)
everywhere is a good idea.


        Stefan




This bug report was last modified 4 years and 268 days ago.

Previous Next


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