ediff-revision drives me nuts - I keep editing the latest
revision
Michael Kifer
kifer at cs.sunysb.edu
Fri Mar 23 10:25:32 EDT 2007
What I meant was that vc-version-other-window should automatically make
the old revision buffer read-only. The optional argument you are proposing
should have the opposite meaning: if t then writable.
The problem for me with changing ediff as you proposed here (apart from the
fact that I think it doesn't need to be changed - only vc should be
changed) is that it won't work with, say fsf's version (since, as I
understand, it will not be changed).
--michael
> Michael Kifer <kifer <at> cs.sunysb.edu> writes:
>
> > I don't think this is the right solution.
>
> Okay, this works for me as well. Add an optional read-only attribute to
> vc-version-other-window (normally ignored) and pass t from ediff-vc-internal.
>
> Skip
>
> *** /tmp/skipm/vc.el Fri Mar 23 07:03:42 2007
> --- /tmp/skipm/init.el Fri Mar 23 07:03:42 2007
> ***************
> *** 1,8 ****
> ! (defun vc-version-other-window (rev)
> "Visit version REV of the current buffer in another window.
> If the current buffer is named `F', the version is named `F.~REV~'.
> If `F.~REV~' already exists, it is used instead of being re-created."
> ! (interactive "sVersion to visit (default is latest version): ")
> (if vc-dired-mode
> (set-buffer (find-file-noselect (dired-get-filename))))
> (while vc-parent-buffer
> --- 1,8 ----
> ! (defun vc-version-other-window (rev &optional read-only)
> "Visit version REV of the current buffer in another window.
> If the current buffer is named `F', the version is named `F.~REV~'.
> If `F.~REV~' already exists, it is used instead of being re-created."
> ! (interactive "sVersion to visit (default is latest version): \ni")
> (if vc-dired-mode
> (set-buffer (find-file-noselect (dired-get-filename))))
> (while vc-parent-buffer
> ***************
> *** 14,18 ****
> (filename (concat buffer-file-name ".~" version "~")))
> (or (file-exists-p filename)
> (vc-backend-checkout buffer-file-name nil version filename))
> ! (find-file-other-window filename))
> (vc-registration-error buffer-file-name)))
> --- 14,19 ----
> (filename (concat buffer-file-name ".~" version "~")))
> (or (file-exists-p filename)
> (vc-backend-checkout buffer-file-name nil version filename))
> ! (find-file-other-window filename)
> ! (setq buffer-read-only read-only))
> (vc-registration-error buffer-file-name)))
>
> *** /tmp/skipm/ediff-vers.el Fri Mar 23 07:04:37 2007
> --- /tmp/skipm/init.el Fri Mar 23 07:04:37 2007
> ***************
> *** 9,20 ****
> (setq rev1 (ediff-vc-latest-version (buffer-file-name))))
> (save-window-excursion
> (save-excursion
> ! (vc-version-other-window rev1)
> (setq rev1buf (current-buffer)
> file1 (buffer-file-name)))
> (save-excursion
> (or (string= rev2 "") ; use current buffer
> ! (vc-version-other-window rev2))
> (setq rev2buf (current-buffer)
> file2 (buffer-file-name)))
> (setq startup-hooks
> --- 9,20 ----
> (setq rev1 (ediff-vc-latest-version (buffer-file-name))))
> (save-window-excursion
> (save-excursion
> ! (vc-version-other-window rev1 t)
> (setq rev1buf (current-buffer)
> file1 (buffer-file-name)))
> (save-excursion
> (or (string= rev2 "") ; use current buffer
> ! (vc-version-other-window rev2 t))
> (setq rev2buf (current-buffer)
file2 (buffer-file-name)))
> (setq startup-hooks
>
>
> _______________________________________________
> XEmacs-Beta mailing list
> XEmacs-Beta at xemacs.org
> http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
>
More information about the XEmacs-Beta
mailing list