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#2652: 23.0.91; wacky behavior of "v" command in *vc-dir* buffer Date: Mon, 23 Mar 2009 13:34:11 -0400 Message-ID: References: <87iqmemgyi.fsf@catnip.gol.com> <200903130038.n2D0cuTj018433@godzilla.ics.uci.edu> <200903130134.n2D1YCFF018782@godzilla.ics.uci.edu> <200903130727.n2D7RHBI020896@godzilla.ics.uci.edu> <200903131622.n2DGMAZG024224@godzilla.ics.uci.edu> <200903141603.n2EG327C002787@godzilla.ics.uci.edu> <200903231637.n2NGbmvo010899@godzilla.ics.uci.edu> Reply-To: Stefan Monnier , 2652@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1237830276 4416 80.91.229.12 (23 Mar 2009 17:44:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Mar 2009 17:44:36 +0000 (UTC) Cc: 2652@emacsbugs.donarmstrong.com, Miles Bader To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 23 18:45:53 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LloDX-0004X9-A9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Mar 2009 18:45:43 +0100 Original-Received: from localhost ([127.0.0.1]:38791 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LloCA-00067v-JQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Mar 2009 13:44:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LloBl-0005te-F1 for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2009 13:43:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LloBg-0005qN-Ci for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2009 13:43:52 -0400 Original-Received: from [199.232.76.173] (port=38721 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LloBg-0005q8-3d for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2009 13:43:48 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:43766) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LloBf-0002jv-9F for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2009 13:43:47 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2NHhiOo025273; Mon, 23 Mar 2009 10:43:45 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n2NHe5lm024183; Mon, 23 Mar 2009 10:40:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , owner@emacsbugs.donarmstrong.com Resent-Date: Mon, 23 Mar 2009 17:40:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2652 X-Emacs-PR-Package: emacs,vc X-Emacs-PR-Keywords: Original-Received: via spool by 2652-submit@emacsbugs.donarmstrong.com id=B2652.123782965622673 (code B ref 2652); Mon, 23 Mar 2009 17:40:05 +0000 Original-Received: (at 2652) by emacsbugs.donarmstrong.com; 23 Mar 2009 17:34:16 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from pruche.dit.umontreal.ca (pruche.dit.umontreal.ca [132.204.246.22]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2NHYCxB022661 for <2652@emacsbugs.donarmstrong.com>; Mon, 23 Mar 2009 10:34:13 -0700 Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n2NHYBtG004172; Mon, 23 Mar 2009 13:34:11 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 3FD8380B49; Mon, 23 Mar 2009 13:34:11 -0400 (EDT) In-Reply-To: <200903231637.n2NGbmvo010899@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Mon, 23 Mar 2009 09:37:48 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3237=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 23 Mar 2009 13:43:52 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:26578 Archived-At: >> > But I don't really want to check it in at this point without an explicit >> > request from Stefan. >> Removing calls to determine the backend (and replace them with backend >> info propagated from elsewhere) is generally a good thing. > How about this one? Doesn't look too bad, tho "backend-arg" rings pretty poorly. I think this hints at the need to just use a single `backend' var (moved out of the let into the arg) which is then defaulted via (unless backend (setq backend (vc-backend file))). > It removes an extra vc-backend call for each VC managed file. Good. Note that the issue is not performance but semantics: in most/all of those cases, the behavior would be at best odd if the recomputed backend were different from the caller's idea. > And another one could be eliminated, but I am not 100% sure what this > comment means: > ;; Let the backend setup any buffer-local things he needs. > (vc-call-backend (vc-backend buffer-file-name) 'find-file-hook)) The comment just means "run a hook so the backend can set things up". Grep for "vc-.*-find-file-hook" to see for what it is currently used. So yes, this should just use `backend' (which I'd prefer over `bk'). Stefan