help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ediff between buffer and corresponding (changed) file


From: Robert Thorpe
Subject: Re: ediff between buffer and corresponding (changed) file
Date: 8 Dec 2006 08:33:11 -0800
User-agent: G2/1.0

Sascha Wilde wrote:
> "Robert Thorpe" <rthorpe@realworldtech.com> wrote:
> > Sascha Wilde wrote:
> >> - I'm editing a file
> >> - the file is changed by someone (or something) else on disk
> >> - I want to safe my changes and emacs asks if I want to overwrite the
> >>   changes on disk
> >>
> >> now I would like to make a diff and merge between my version and the
> >> version on disk, but I can't find a straight forward way top do this,
> >> without writing a temporary file.
> >
> > It is a recent addition, which can be added by inserting some elisp.
> > See this thread:-
> > http://groups.google.co.uk/group/gnu.emacs.help/browse_frm/thread/ee86853ef6243e5f/3b7bdaedebb77c2e?lnk=st&q=ediff+buffer+underlying+file+emacs&rnum=1#3b7bdaedebb77c2e
> > Message-ID: <m2odtujmix.fsf@janus.isnogud.escape.de>
>
> Thanks.  diff-buffer-with-file is indeed neat, but I would like a
> ediff version much better, as it allows for not only seeing the
> changes but merging, too.

Changing the line (diff buffer-file-name tempfile nil t) to
(ediff-files buffer-file-name tempfile) should do it, but it won't give
you merge.  You will have to manually save the tempfile by a different
name.

Has anyone expanded ediff to give this functionality?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]