* How to configure git diff tool to use emacs diff tool
@ 2009-09-30 23:38 hap 497
2009-10-01 2:23 ` Andreas Politz
2009-10-02 20:04 ` Andreas Politz
0 siblings, 2 replies; 6+ messages in thread
From: hap 497 @ 2009-09-30 23:38 UTC (permalink / raw)
To: help-gnu-emacs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to configure git diff tool to use emacs diff tool
2009-09-30 23:38 How to configure git diff tool to use emacs diff tool hap 497
@ 2009-10-01 2:23 ` Andreas Politz
2009-10-01 5:14 ` n179911
2009-10-02 20:04 ` Andreas Politz
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Politz @ 2009-10-01 2:23 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to configure git diff tool to use emacs diff tool
2009-10-01 2:23 ` Andreas Politz
@ 2009-10-01 5:14 ` n179911
2009-10-01 7:10 ` Andreas Politz
[not found] ` <mailman.7823.1254381039.2239.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 6+ messages in thread
From: n179911 @ 2009-10-01 5:14 UTC (permalink / raw)
To: Andreas Politz; +Cc: help-gnu-emacs
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 <politza@fh-trier.de> wrote:
> 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
>
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to configure git diff tool to use emacs diff tool
2009-10-01 5:14 ` n179911
@ 2009-10-01 7:10 ` Andreas Politz
[not found] ` <mailman.7823.1254381039.2239.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 6+ messages in thread
From: Andreas Politz @ 2009-10-01 7:10 UTC (permalink / raw)
To: help-gnu-emacs
n179911 <n179911@gmail.com> writes:
> On Wed, Sep 30, 2009 at 7:23 PM, Andreas Politz <politza@fh-trier.de> wrote:
>> 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
>>
>>
>>
>>
> 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.
>
Read the manual, especially `merge.tool' and `merge.<tool>.cmd'. I
never used git-merge, so I don't know how this ought to behave.
-ap
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to configure git diff tool to use emacs diff tool
2009-09-30 23:38 How to configure git diff tool to use emacs diff tool hap 497
2009-10-01 2:23 ` Andreas Politz
@ 2009-10-02 20:04 ` Andreas Politz
1 sibling, 0 replies; 6+ messages in thread
From: Andreas Politz @ 2009-10-02 20:04 UTC (permalink / raw)
To: help-gnu-emacs
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?
I had another look at this. The library in emacs is called emerge,
which is already supported by git.
-ap
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to configure git diff tool to use emacs diff tool
[not found] ` <mailman.7823.1254381039.2239.help-gnu-emacs@gnu.org>
@ 2009-10-23 4:41 ` David Combs
0 siblings, 0 replies; 6+ messages in thread
From: David Combs @ 2009-10-23 4:41 UTC (permalink / raw)
To: help-gnu-emacs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 767 bytes --]
The other day I discovered a thin (100pgs) (commercial!) book
on diff and patch, by Stallman and someone.
Goes into great detail about using diff, patch, etc.
Here it is:
$15.56: "Comparing and Merging Files with GNU diff and patch"
by David MacKenzie, Paul Eggert, and Richard Stallman
"Comparing and Merging Files with GNU diff and patch" nerdbooks
Paperback (6"x9"), 120 pages
Retail Price: $19.95 (£12.95 in UK)
ISBN: 0-9541617-5-0
Product details
* Paperback: 120 pages
* Publisher: Network Theory Limited (1 Jan 2003) <<<==========
* Language English
* ISBN-10: 0954161750
* ISBN-13: 978-0954161750
* Product Dimensions: 22.4 x 15.2 x 0.8 cm
* Average Customer Review: No customer reviews yet. Be the first.
david
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-10-23 4:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-30 23:38 How to configure git diff tool to use emacs diff tool hap 497
2009-10-01 2:23 ` Andreas Politz
2009-10-01 5:14 ` n179911
2009-10-01 7:10 ` Andreas Politz
[not found] ` <mailman.7823.1254381039.2239.help-gnu-emacs@gnu.org>
2009-10-23 4:41 ` David Combs
2009-10-02 20:04 ` Andreas Politz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).