unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Automatic Ediff-session upon opening file conflicted by a version control update-conflict
@ 2007-11-12  9:40 Nordlöw
  2007-11-14 15:59 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Nordlöw @ 2007-11-12  9:40 UTC (permalink / raw)
  To: help-gnu-emacs

How can I make ediff automatically parse the conflicts tags ( <<<<
File A, >>>> File B, ... ) and enter into an ediff merge-2 or merge-3
session when I open a file that has been conflicted by an cvs,svn,..
update. File opening can be either direct or through a svn/cvs/git-
status buffer.

/Nordlöw

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

* Re: Automatic Ediff-session upon opening file conflicted by a version control update-conflict
  2007-11-12  9:40 Automatic Ediff-session upon opening file conflicted by a version control update-conflict Nordlöw
@ 2007-11-14 15:59 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2007-11-14 15:59 UTC (permalink / raw)
  To: help-gnu-emacs

> How can I make ediff automatically parse the conflicts tags ( <<<<
> File A, >>>> File B, ... ) and enter into an ediff merge-2 or merge-3
> session when I open a file that has been conflicted by an cvs,svn,..
> update. File opening can be either direct or through a svn/cvs/git-
> status buffer.

Normally when you enter a file with diff3 conflict markers you should be
able to automatically activate smerge-mode (a minor mode specifically
designed for that).  Ideally, this already works completely
automatically (thanks to VC).  If it doesn't, please give us
some details (I know it doesn't always work, but I'm not sure in which
circumstances it fails, so it'll help me fix it).

In case smerge-mode is not automatically activated, you may want to add
something like the following to your .emacs:

   (defun sm-try-smerge ()
     (save-excursion
       (goto-char (point-min))
       (when (re-search-forward "^<<<<<<< " nil t)
         (smerge-mode 1))))
   (when (fboundp 'smerge-mode) (add-hook 'find-file-hooks 'sm-try-smerge t))

Now, once smerge-mode is activated, you can enter ediff with C-c ^ E


        Stefan

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

end of thread, other threads:[~2007-11-14 15:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-12  9:40 Automatic Ediff-session upon opening file conflicted by a version control update-conflict Nordlöw
2007-11-14 15:59 ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).