emacs-devel
[Top][All Lists]
Advanced

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

Re: undo weirdness with insert-file-contents


From: martin rudalics
Subject: Re: undo weirdness with insert-file-contents
Date: Sat, 08 Mar 2008 10:55:54 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> given a 3-way merge conflict, with 3 branches MINE/BASE/OTHER, I do
> a narrow-to-region on the conflict, then I save all three branches of
> the conflict to separate files and do:
>
>    diff -c -w BASE MINE | patch OTHER >RESULT
>
> and if the patch succeeds I do `insert-file-contents' of RESULT without
> VISIT but with REPLACE.
>
> It's indeed somewhat obscure, and indeed, it crashed Emacs when the
> Unicode branch was merged (because the code didn't expect REPLACE in
> a narrowed buffer).

With the MINE buffer current, I suppose, to avoid visiting RESULT,
inserting it into MINE, and deleting it afterwards.  As a benefit,
`insert-file-contents' will preserve markers within the conflict region
and store less undo information.  Sounds reasonable.

The examples of non-VISIT&REPLACE I've found in the Emacs sources seem
rather obscure though.





reply via email to

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