From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: "Symbol's value as variable is void" on vc-diff Date: Tue, 20 Apr 2004 11:08:02 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040420110607.E009.JMBARRANQUERO@wke.es> References: <20040416153410.6A6C.JMBARRANQUERO@wke.es> <1082418799.1142.8.camel@localhost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1082452277 27488 80.91.224.253 (20 Apr 2004 09:11:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 20 Apr 2004 09:11:17 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 20 11:11:06 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BFrHV-0000Gj-00 for ; Tue, 20 Apr 2004 11:11:05 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BFrHV-0004kE-00 for ; Tue, 20 Apr 2004 11:11:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BFrFu-00060z-BE for emacs-devel@quimby.gnus.org; Tue, 20 Apr 2004 05:09:26 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BFrFj-0005zD-JU for emacs-devel@gnu.org; Tue, 20 Apr 2004 05:09:15 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BFrFD-0005jy-D5 for emacs-devel@gnu.org; Tue, 20 Apr 2004 05:09:14 -0400 Original-Received: from [62.22.181.117] (helo=idefix.laley.net) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BFrEZ-0005Z8-Mi; Tue, 20 Apr 2004 05:08:03 -0400 Original-Received: from [172.17.221.23] (jsredondo.wk.org [172.17.221.23]) by idefix.laley.net with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2655.55) id JH25SRMS; Tue, 20 Apr 2004 11:07:59 +0200 Original-To: Andre Spiegel , emacs-devel@gnu.org In-Reply-To: <1082418799.1142.8.camel@localhost> X-Mailer: Becky! ver. 2.08.01 [en] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21934 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21934 On Mon, 19 Apr 2004 19:53:19 -0400 Andre Spiegel wrote: > Sorry, the problem should be fixed by > the patch below. Yeah, it works. Thanks. BTW, shouldn't something like the patch below be installed to vc-svn.el? Juanma --- vc-svn.el.orig 2004-04-16 15:38:21.000000000 +0200 +++ vc-svn.el 2004-04-20 11:00:58.000000000 +0200 @@ -335,8 +335,8 @@ ;;; -(defun vc-svn-print-log (file) +(defun vc-svn-print-log (file &optional buffer) "Get change log associated with FILE." (save-current-buffer - (vc-setup-buffer nil) + (vc-setup-buffer buffer) (let ((inhibit-read-only t)) (goto-char (point-min)) @@ -344,10 +344,11 @@ (insert "Working file: " (file-relative-name file) "\n")) (vc-svn-command - t + buffer (if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0) file "log"))) -(defun vc-svn-diff (file &optional oldvers newvers) +(defun vc-svn-diff (file &optional oldvers newvers buffer) "Get a difference report using SVN between two versions of FILE." + (unless buffer (setq buffer "*vc-diff*")) (if (string= (vc-workfile-version file) "0") ;; This file is added but not yet committed; there is no master file. @@ -357,5 +358,5 @@ ;; Diff it against /dev/null. ;; Note: this is NOT a "svn diff". - (apply 'vc-do-command "*vc-diff*" + (apply 'vc-do-command buffer 1 "diff" file (append (vc-switches nil 'diff) '("/dev/null"))) @@ -366,5 +367,5 @@ (or oldvers newvers) ; Svn diffs those locally. (fboundp 'start-process)))) - (apply 'vc-svn-command "*vc-diff*" + (apply 'vc-svn-command buffer (if async 'async 0) file "diff" @@ -378,5 +379,5 @@ ;; For some reason `svn diff' does not return a useful ;; status w.r.t whether the diff was empty or not. - (buffer-size (get-buffer "*vc-diff*")))))) + (buffer-size (get-buffer buffer)))))) (defun vc-svn-diff-tree (dir &optional rev1 rev2)