>> But the above solution still has the following problem: pop-to-buffer may
>> create a new frame, in which case the save-window-excursion won't be enough.
>> Basically, we need to tell vc-do-command not to call pop-to-buffer.
>> 
>> I'll install a patch for it, thanks.
> Thank you.

Does the patch below solve the problem?


        Stefan


Index: lisp/vc.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc.el,v
retrieving revision 1.404
diff -u -r1.404 vc.el
--- lisp/vc.el  31 Oct 2005 01:22:56 -0000      1.404
+++ lisp/vc.el  13 Dec 2005 21:32:43 -0000
@@ -930,8 +930,9 @@
 current buffer if BUFFER is t.  If the destination buffer is not
 already current, set it up properly and erase it.  The command is
 considered successful if its exit status does not exceed OKSTATUS (if
-OKSTATUS is nil, that means to ignore errors, if it is 'async, that
-means not to wait for termination of the subprocess).  FILE is the
+OKSTATUS is nil, that means to ignore error status, if it is 'async, that
+means not to wait for termination of the subprocess; if it is t it means to
+ignore all execution errors).  FILE is the
 name of the working file (may also be nil, to execute commands that
 don't expect a file name).  If an optional list of FLAGS is present,
 that is inserted into the command line before the filename."
@@ -976,7 +977,9 @@
               `(unless (active-minibuffer-window)
                   (message "Running %s in the background... done" ',command))))
          (setq status (apply 'process-file command nil t nil squeezed))
-         (when (or (not (integerp status)) (and okstatus (< okstatus status)))
+         (when (and (not (eq t okstatus))
+                     (or (not (integerp status))
+                         (and okstatus (< okstatus status))))
            (pop-to-buffer (current-buffer))
            (goto-char (point-min))
            (shrink-window-if-larger-than-buffer)
Index: lisp/vc-svn.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-svn.el,v
retrieving revision 1.22
diff -u -r1.22 vc-svn.el
--- lisp/vc-svn.el      14 Nov 2005 04:33:03 -0000      1.22
+++ lisp/vc-svn.el      13 Dec 2005 21:32:43 -0000
@@ -114,15 +114,19 @@
                                           (file-name-directory file)))
     (with-temp-buffer
       (cd (file-name-directory file))
-      (condition-case nil
-         (vc-svn-command t 0 file "status" "-v")
-       ;; Some problem happened.  E.g. We can't find an `svn' executable.
-        ;; We used to only catch `file-error' but when the process is run on
-        ;; a remote host via Tramp, the error is only reported via the
-        ;; exit status which is turned into an `error' by vc-do-command.
-       (error nil))
-      (vc-svn-parse-status t)
-      (eq 'SVN (vc-file-getprop file 'vc-backend)))))
+      (let ((status 
+             (condition-case nil
+                 ;; Ignore all errors.
+                 (vc-svn-command t t file "status" "-v")
+               ;; Some problem happened.  E.g. We can't find an `svn'
+               ;; executable.  We used to only catch `file-error' but when
+               ;; the process is run on a remote host via Tramp, the error
+               ;; is only reported via the exit status which is turned into
+               ;; an `error' by vc-do-command.
+               (error nil))))
+        (when (eq 0 status)
+          (vc-svn-parse-status t)
+          (eq 'SVN (vc-file-getprop file 'vc-backend)))))))
 
 (defun vc-svn-state (file &optional localp)
   "SVN-specific version of `vc-state'."


_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to