Issue167

classification
Title ediff-revision with docdiff
Type Module
Severity Platform
Keywords
explanation
process
These optional controls are only of interest to committers and tracker administrators.
Status new   Reason
Superseder   Submitted 2007-11-29.16:36:56
Priority   Assigned To
Nosy List  

Created on 2008-01-19.06:43:04 by oub, last changed 2008-01-19.06:43:04 by oub.

Messages
msg240 [hidden] ([hidden]) Date: 2008-01-19.06:43:04
  Message-ID: <87y7cht3dj.fsf@mat.ucm.es>
Hello

Docdiff is a nice utility which allows to compare 2 files word by word
and writes the difference in one single HTML file, in which the
differences are highlighted. The result looks very much as if a human
would have corrected some text.

Now I wrote a primitive function which works for two files but I would
like to modify ediff-revision (using  RCS) such that docdiff runs on
two versions of a file under version control.

Here is what I did and what does not work:

(defun docdiff-vc-version ()
  "Invoke  docdiff for the current buffer,
and run mozilla-firefox -remote openfile(filename)
to preview the diff"
  (interactive)
  (let* ((currentname 
		  (buffer-file-name (current-buffer)))
		 (newbuffer
		  (vc-version-other-window (read-string "Version number: ")))
		 (origname
		  (vc-version-other-window (read-string "Version number: "))))
	(diff-command
	 "/usr/bin/docdiff --html %s %s > %s")
	(mozilla-command-line
	 "/usr/local/seamonkey/seamonkey -remote 'openfile(%s)'")
	(moztmpfile-name
	 (concat default-directory
			 ".docdiff/docdifftmp.html")))
  (shell-command
   (format diff-command 
		   origname 
		   newbuffer
		   moztmpfile-name))
  (shell-command
   (format mozilla-command-line
		   moztmpfile-name)))

The problem is the second call:
		  (vc-version-other-window (read-string "Version number: "))))
in the first call xemacs has identified the other version say,
test.~1.1~ but then in the second call applies it to that file (and
fails since this file is _not_ under version control) and not the
original file which _is_ under version control.

I tried several tricks such that the second vc-version-other-window
call takes place in the original buffer but I did not succeed it also
would help if vc-version-other-window would allow me to specify the
file but it does not. If somebody has an idea I would be grateful.

Thanks

Uwe Brauer 

_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta@xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
History
Date User Action Args
2008-01-19 06:43:04oubcreate