unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Automatic Ediff-session upon opening file conflicted by a version control update-conflict
Date: Wed, 14 Nov 2007 10:59:28 -0500	[thread overview]
Message-ID: <jwv3av82576.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 1194860435.699130.271030@v2g2000hsf.googlegroups.com

> 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

      reply	other threads:[~2007-11-14 15:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv3av82576.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).