* 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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.