all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* "Symbol's value as variable is void" on vc-diff
@ 2004-04-16 10:07 Juanma Barranquero
  2004-04-16 10:27 ` Andre Spiegel
  0 siblings, 1 reply; 8+ messages in thread
From: Juanma Barranquero @ 2004-04-16 10:07 UTC (permalink / raw)


After some recent changes related to VC, C-x v = (vc-diff) fails with:

  vc-default-workfile-unchanged-p: Symbol's value as variable is void: wrong-number-of-arguments

on SVN-controlled buffers.

                                                                Juanma

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Symbol's value as variable is void" on vc-diff
  2004-04-16 10:07 "Symbol's value as variable is void" on vc-diff Juanma Barranquero
@ 2004-04-16 10:27 ` Andre Spiegel
  2004-04-16 13:41   ` Juanma Barranquero
  0 siblings, 1 reply; 8+ messages in thread
From: Andre Spiegel @ 2004-04-16 10:27 UTC (permalink / raw)
  Cc: emacs-devel

On Fri, 2004-04-16 at 12:07, Juanma Barranquero wrote:

> After some recent changes related to VC, C-x v = (vc-diff) fails with:
> 
>   vc-default-workfile-unchanged-p: Symbol's value as variable is void: wrong-number-of-arguments
> 
> on SVN-controlled buffers.

There was a missing quote in vc-hooks.el (and a similar one in vc.el). 
I've just fixed it.  But it looks like this will uncover another bug in
vc-svn.el, which I cannot check easily.  Let us know what happens when
you update to the most recent vc-hooks.el.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Symbol's value as variable is void" on vc-diff
  2004-04-16 10:27 ` Andre Spiegel
@ 2004-04-16 13:41   ` Juanma Barranquero
  2004-04-19 23:53     ` Andre Spiegel
  0 siblings, 1 reply; 8+ messages in thread
From: Juanma Barranquero @ 2004-04-16 13:41 UTC (permalink / raw)



On Fri, 16 Apr 2004 12:27:33 +0200
Andre Spiegel <spiegel@gnu.org> wrote:

> But it looks like this will uncover another bug in
> vc-svn.el, which I cannot check easily.  Let us know what happens when
> you update to the most recent vc-hooks.el.

Were you waiting for that

Debugger entered--Lisp error: (wrong-number-of-arguments wrong-number-of-arguments #[(file &optional oldvers newvers) "..." [file oldvers newvers switches async vc-workfile-version "0" error "No revisions of %s exist" apply vc-do-command "*vc-diff*" 1 "diff" append vc-switches nil diff ("/dev/null") SVN vc-stay-local-p fboundp start-process vc-svn-command "*vc-diff*" 0 "diff" "-x" mapconcat identity " " "-r" ":" buffer-size get-buffer "*vc-diff*"] 12 ("c:/bin/emacs/HEAD/lisp/vc-svn.elc" . 9467)] 4)
  signal(wrong-number-of-arguments (wrong-number-of-arguments #[(file &optional oldvers newvers) "..." [file oldvers newvers switches async vc-workfile-version "0" error "No revisions of %s exist" apply vc-do-command "*vc-diff*" 1 "diff" append vc-switches nil diff ... SVN vc-stay-local-p fboundp start-process vc-svn-command "*vc-diff*" 0 "diff" "-x" mapconcat identity " " "-r" ":" buffer-size get-buffer "*vc-diff*"] 12 ("c:/bin/emacs/HEAD/lisp/vc-svn.elc" . 9467)] 4))
  (if (or (not ...) (not ...)) (signal 'wrong-number-of-arguments err) (vc-call diff file))
  (condition-case err (vc-call diff file nil nil "*vc*") (wrong-number-of-arguments (if ... ... ...)))
  (zerop (condition-case err (vc-call diff file nil nil "*vc*") (wrong-number-of-arguments ...)))
  vc-default-workfile-unchanged-p(SVN "d:/usr/home/.emacs.el")
  apply(vc-default-workfile-unchanged-p SVN "d:/usr/home/.emacs.el")
  vc-call-backend(SVN workfile-unchanged-p "d:/usr/home/.emacs.el")
  vc-workfile-unchanged-p("d:/usr/home/.emacs.el")
  vc-diff(nil t)
* call-interactively(vc-diff)

perhaps?

                                                        Juanma

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Symbol's value as variable is void" on vc-diff
  2004-04-16 13:41   ` Juanma Barranquero
@ 2004-04-19 23:53     ` Andre Spiegel
  2004-04-20  9:08       ` Juanma Barranquero
  0 siblings, 1 reply; 8+ messages in thread
From: Andre Spiegel @ 2004-04-19 23:53 UTC (permalink / raw)
  Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 251 bytes --]

On Fri, 2004-04-16 at 09:41, Juanma Barranquero wrote:

> Were you waiting for that

Ah, now I see what I did wrong.  Sorry, the problem should be fixed by
the patch below.  (I can't install it right now because somehow I can't
get savannah access.)


[-- Attachment #2: vc.patch --]
[-- Type: text/x-patch, Size: 1104 bytes --]

--- vc-hooks.el.~1.167.~	2004-04-16 06:21:51.000000000 -0400
+++ vc-hooks.el	2004-04-19 19:44:49.000000000 -0400
@@ -474,8 +474,8 @@
                              (indirect-function
                               (vc-find-backend-function (vc-backend file)
                                                         'diff))))
-                    (not (eq (caddr err) 5)))
-                (signal 'wrong-number-of-arguments err)
+                    (not (eq (caddr err) 4)))
+                (signal (car err) (cadr err))
               (vc-call diff file))))))
 
 (defun vc-workfile-version (file)
--- vc.el.~1.376.~	2004-04-16 06:21:24.000000000 -0400
+++ vc.el	2004-04-19 19:41:07.000000000 -0400
@@ -2361,7 +2361,7 @@
                          (vc-find-backend-function (vc-backend file) 
                                                    'print-log))))
                (not (eq (caddr err) 2)))
-           (signal 'wrong-number-of-arguments err)
+           (signal (car err) (cadr err))
          ;; for backward compatibility
          (vc-call print-log file)
          (set-buffer "*vc*"))))

[-- Attachment #3: Type: text/plain, Size: 141 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Symbol's value as variable is void" on vc-diff
  2004-04-19 23:53     ` Andre Spiegel
@ 2004-04-20  9:08       ` Juanma Barranquero
  2004-04-20 10:55         ` Andre Spiegel
  0 siblings, 1 reply; 8+ messages in thread
From: Juanma Barranquero @ 2004-04-20  9:08 UTC (permalink / raw)



On Mon, 19 Apr 2004 19:53:19 -0400
Andre Spiegel <spiegel@gnu.org> 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)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Symbol's value as variable is void" on vc-diff
  2004-04-20  9:08       ` Juanma Barranquero
@ 2004-04-20 10:55         ` Andre Spiegel
  2004-04-20 11:14           ` Juanma Barranquero
  0 siblings, 1 reply; 8+ messages in thread
From: Andre Spiegel @ 2004-04-20 10:55 UTC (permalink / raw)
  Cc: Stefan Monnier, emacs-devel

On Tue, 2004-04-20 at 05:08, Juanma Barranquero wrote:

> BTW, shouldn't something like the patch below be installed to vc-svn.el?

Yes, I just wanted to leave it to Stefan to decide this, since he is
maintaining vc-svn.el.  As the generic code can handle it either way,
there is no immediate need for it.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Symbol's value as variable is void" on vc-diff
  2004-04-20 10:55         ` Andre Spiegel
@ 2004-04-20 11:14           ` Juanma Barranquero
  2004-04-20 14:18             ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Juanma Barranquero @ 2004-04-20 11:14 UTC (permalink / raw)



On Tue, 20 Apr 2004 06:55:15 -0400
Andre Spiegel <spiegel@gnu.org> wrote:

> Yes, I just wanted to leave it to Stefan to decide this, since he is
> maintaining vc-svn.el.

Fair enough, but I don't see a reason why it wouldn't be better (if
anything, consistency with other VC interfaces...).

> As the generic code can handle it either way,
> there is no immediate need for it.

As soon as you install your patch, you mean ;-)

Thanks,

                                                                Juanma

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: "Symbol's value as variable is void" on vc-diff
  2004-04-20 11:14           ` Juanma Barranquero
@ 2004-04-20 14:18             ` Stefan Monnier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2004-04-20 14:18 UTC (permalink / raw)
  Cc: emacs-devel

> Fair enough, but I don't see a reason why it wouldn't be better (if
> anything, consistency with other VC interfaces...).

You're completely right, so feel free to install it.


        Stefan

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-04-20 14:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-16 10:07 "Symbol's value as variable is void" on vc-diff Juanma Barranquero
2004-04-16 10:27 ` Andre Spiegel
2004-04-16 13:41   ` Juanma Barranquero
2004-04-19 23:53     ` Andre Spiegel
2004-04-20  9:08       ` Juanma Barranquero
2004-04-20 10:55         ` Andre Spiegel
2004-04-20 11:14           ` Juanma Barranquero
2004-04-20 14:18             ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.