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

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

Re: How to configure git diff tool to use emacs diff tool


From: Andreas Politz
Subject: Re: How to configure git diff tool to use emacs diff tool
Date: Thu, 01 Oct 2009 04:23:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

hap 497 <hap497@gmail.com> writes:

> Hi,
>
> One can configure git merge tool to use vimdiff
>
> $git config --global merge.tool vimdiff
>
> How can I change it to use emacs diff? And is it possible to use
> emacsclient for diff?
> http://www.emacswiki.org/emacs/EmacsClient#toc1 (so that I can speed
> things up by not launching a new emacs every time).
>
> Thank you.

It seems obvious, how to do this.  The emacs function is `ediff-files' and it
takes 2 arguments, namely the files to run diff on.  Combine this with
the --eval option of emacs(client) in a shell.

$ cat ~/bin/ediff
#!/bin/sh

emacsclient --eval "(ediff-files \"$1\" \"$2\")"

-ap





reply via email to

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