views:

87

answers:

2

Had this working well in Emacs 23.1.x but it appears to have broke in the move to Emacs 23.2

I want to use ediff when comparing working copy of a file with SVN HEAD.

Normally I press C-x v = and ediff runs because of the following configuration in my .emacs

;; Use ediff and not diff 
(setq diff-command "ediff")

But, alas I still get the normal vc-diff buffer appearing and no ediff session...

Has anyone else encountered this and know what might be the problem?

+1  A: 

Am a bit skeptical that the above setting did what you say it did.

That said, this will bind '=' to use 'ediff-revision:

(eval-after-load "vc-hooks"
         '(define-key vc-prefix-map "=" 'ediff-revision))
Trey Jackson
A: 

Found out I could just rebind C-x v = to the following:

(defun ediff-current-buffer-revision () 
  "Run Ediff to diff current buffer's file against VC depot. 
Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'." 
  (interactive) 
  (let ((file (or (buffer-file-name) 
          (error "Current buffer is not visiting a file")))) 
(if (and (buffer-modified-p) 
     (y-or-n-p (message "Buffer %s is modified. Save buffer? " 
                (buffer-name)))) 
    (save-buffer (current-buffer))) 
(ediff-load-version-control) 
(funcall 
 (intern (format "ediff-%S-internal" ediff-version-control-package)) 
 "" "" nil))) 

This approach means you avoid having to specify the versions to compare as it defaults to comparing HEAD and the current file state.

Source: http://www.groupsrv.com/computers/about152826.html

landstatic