From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: n179911 Newsgroups: gmane.emacs.help Subject: Re: How to configure git diff tool to use emacs diff tool Date: Wed, 30 Sep 2009 22:14:10 -0700 Message-ID: <3b9893450909302214q1101e12cvf3df20d4aa9c9581@mail.gmail.com> References: <5ff1d48c0909301638l2c239badq4a946e0a78e1499c@mail.gmail.com> <87r5tnj1i4.fsf@fh-trier.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1254374109 8962 80.91.229.12 (1 Oct 2009 05:15:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 Oct 2009 05:15:09 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Andreas Politz Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 01 07:15:02 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MtE0L-0006VH-0y for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Oct 2009 07:15:01 +0200 Original-Received: from localhost ([127.0.0.1]:55746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtE0J-0005RS-S3 for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Oct 2009 01:15:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtDzd-0005RB-9C for help-gnu-emacs@gnu.org; Thu, 01 Oct 2009 01:14:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtDzY-0005NV-HX for help-gnu-emacs@gnu.org; Thu, 01 Oct 2009 01:14:16 -0400 Original-Received: from [199.232.76.173] (port=51063 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtDzY-0005NH-9y for help-gnu-emacs@gnu.org; Thu, 01 Oct 2009 01:14:12 -0400 Original-Received: from mail-yw0-f204.google.com ([209.85.211.204]:34911) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MtDzX-0003l1-Ux for help-gnu-emacs@gnu.org; Thu, 01 Oct 2009 01:14:12 -0400 Original-Received: by ywh42 with SMTP id 42so3019042ywh.28 for ; Wed, 30 Sep 2009 22:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=eWPacSXFsY0YrZKYSM1TXU59PyQ5sv8JVK5AptJ9IxM=; b=EhyACO34XQ3i6GzIMmPOPUqQq3FXrhCzWZMytUo+29P7S7XELol5fkj4lsQbshAbKi GGr5ymdZwA+PkFSFHGMznt61ZdnPhrBy5//SVtG0LC3ivovu8gEvNO3h/gkdBWIwzU5J 8tyEWM3d3sAdIs2Su2wLSBitYyrwrlmwn6HUk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=k/syNkLoj9NSPJhsNBQIVW85N7Y2m9/W+QwhXQTm4/qDzou/QOg4JBTfskzn2o+q+R YO1YO+BCCMS5ntpbQhHcDaGPEAgd+UPY6KkrOcHx7/9mWusHxn2G+45V9Dkx1W3Ofd3Y QOCT/ya3o2Ja/yc1eiPyB0aMdSE1rIQLE2pm8= Original-Received: by 10.90.16.34 with SMTP id 34mr476681agp.47.1254374050782; Wed, 30 Sep 2009 22:14:10 -0700 (PDT) In-Reply-To: <87r5tnj1i4.fsf@fh-trier.de> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:68589 Archived-At: I tried you script. When I run it at command line with 2 different files: $ /Users/paul/bin/ediff.sh src/ComposeMessageActivity.java src/NewActivity.= java it works. But after i set that up to git merge.tool $ git config --global merge.tool /Users/paul/bin/ediff.sh $ git diff It does not invoke the ediff. It still uses the shell diff tool. Thank you for any idea. On Wed, Sep 30, 2009 at 7:23 PM, Andreas Politz wrote= : > hap 497 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. =A0The emacs function is `ediff-files' = and it > takes 2 arguments, namely the files to run diff on. =A0Combine this with > the --eval option of emacs(client) in a shell. > > $ cat ~/bin/ediff > #!/bin/sh > > emacsclient --eval "(ediff-files \"$1\" \"$2\")" > > -ap > > > >