From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6870: Make vc-root-diff work in more modes Date: Mon, 04 Jul 2011 14:13:42 -0400 Message-ID: References: <19561.60443.364109.899857@rgr.rgrjr.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309804070 674 80.91.229.12 (4 Jul 2011 18:27:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2011 18:27:50 +0000 (UTC) Cc: rogers-emacs@rgrjr.dyndns.org, 6870@debbugs.gnu.org To: Lars Magne Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 04 20:27:46 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qdns1-0005dg-1d for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Jul 2011 20:27:45 +0200 Original-Received: from localhost ([::1]:57868 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdns0-0005jb-0N for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Jul 2011 14:27:44 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:60804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdnen-000254-T4 for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2011 14:14:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qdnel-0002eE-V4 for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2011 14:14:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdnel-0002e6-EX for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2011 14:14:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qdnek-00028R-UC; Mon, 04 Jul 2011 14:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Jul 2011 18:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6870 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6870-submit@debbugs.gnu.org id=B6870.13098032308178 (code B ref 6870); Mon, 04 Jul 2011 18:14:02 +0000 Original-Received: (at 6870) by debbugs.gnu.org; 4 Jul 2011 18:13:50 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QdneY-00027r-7T for submit@debbugs.gnu.org; Mon, 04 Jul 2011 14:13:50 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QdneW-00027f-Aj for 6870@debbugs.gnu.org; Mon, 04 Jul 2011 14:13:49 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EABMCEk5FxIxr/2dsb2JhbABTp3t4iHrBE4Y2BJ5chCw X-IronPort-AV: E=Sophos;i="4.65,474,1304308800"; d="scan'208";a="120402010" Original-Received: from 69-196-140-107.dsl.teksavvy.com (HELO pastel.home) ([69.196.140.107]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 04 Jul 2011 14:13:42 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 556B658DBA; Mon, 4 Jul 2011 14:13:42 -0400 (EDT) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Mon, 04 Jul 2011 17:18:36 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 04 Jul 2011 14:14:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:47978 Archived-At: >> (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