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

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

Re: Using emerge on windows? Funky errors with Temp files


From: David Kastrup
Subject: Re: Using emerge on windows? Funky errors with Temp files
Date: Wed, 23 Mar 2011 08:23:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Kevin Rodgers <address@hidden> writes:

> On 3/22/11 2:01 AM, David Kastrup wrote:
>> Stefan Monnier<address@hidden>  writes:
>>
>>>>>> Note -- I am an emerge newbie, so, um, be gentle..
>>>>> BTW, is there a particular reason you use emerge rather than ediff3?
>>>>> I thought emerge was only used by old-time users, all new ones
>>>>> preferring the snazzier ediff3.
>>>> AFAIK, ediff does not have an interface for commandline usage as an
>>>> external merge resolution tool.
>>>
>>> That'd be easy to add, I'm sure.
>>
>> I once tried for about a week (since i would have liked to have ediff be
>> an option for merge resolution in git) and then gave up.  ediff is a
>> maze of twisty little hooks and indirections, catering without useful
>> documentation for everything except that which you'd actually need.
>>
>> In any case, "that'd be easy to add" is nothing that is going to make
>> users switch.  The proof is in the pudding.
>
> I have this in my ~/.emacs to run ediff-files.  I think you just need to add
> file-c in the obvious way to call ediff3 instead:
>
> (defun diff-command-line-args (switch)
>   "Run `ediff-files' on the following 2 command line arguments (after 
> SWITCH)."
>   ;; (prog1 ...) == (pop command-line-args-left):
>   (let ((file-a (prog1 (car command-line-args-left)
>                 (setq command-line-args-left
>                       (cdr command-line-args-left))))
>         (file-b (prog1 (car command-line-args-left)
>                 (setq command-line-args-left
>                       (cdr command-line-args-left)))))
>     (ediff-files file-a file-b)))
>
> (setq command-switch-alist
>       (cons '("--diff" . diff-command-line-args) command-switch-alist))

There is more to it than that, like exit status.  And IIRC, ediff-files
returned more or less immediately, basically just starting the ediff.

-- 
David Kastrup


reply via email to

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