all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* git mergetool again
@ 2010-08-13 19:24 Andrea Crotti
  2010-08-13 19:43 ` Andrea Crotti
  0 siblings, 1 reply; 7+ messages in thread
From: Andrea Crotti @ 2010-08-13 19:24 UTC (permalink / raw)
  To: help-gnu-emacs

I really have to solve this before I go completely insane :D
It's more a problem of git but could make life easier to many emacs
user, so I think it's not offtopic.

Anyway I like emerge and it would be nice to use it to solve conflicts
with git.
Now the default configuration for me is really bad, because it opens a
new emacs, loads the WHOLE configuration and in short doesn't work at
all!

So I read again the doc and ended up with something like
--8<---------------cut here---------------start------------->8---
[mergetool "mymerge"]
	cmd = 'exec /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -e \"(ediff-files (getenv \"LOCAL\") (getenv \"MERGED\") (getenv \"REMOTE\"))\"'
[merge]
	tool = mymerge
--8<---------------cut here---------------end--------------->8---

after trying all possible easier solutions.

but now way it doesn't work.
I just need to fire up the editor with ediff-files on those three files,
which at the call moment are part of the environment (I think).

Not sure I need the getenv but the thing is that I have no way to get
the f***** actual command used by git for emerge.

I tried all possible magic combinations with git config, but no way it
doesn't spit it out..
Any help is welcome :)
Thanks




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: git mergetool again
  2010-08-13 19:24 git mergetool again Andrea Crotti
@ 2010-08-13 19:43 ` Andrea Crotti
  2010-08-13 20:47   ` Andrea Crotti
  0 siblings, 1 reply; 7+ messages in thread
From: Andrea Crotti @ 2010-08-13 19:43 UTC (permalink / raw)
  To: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> I really have to solve this before I go completely insane :D
> It's more a problem of git but could make life easier to many emacs
> user, so I think it's not offtopic.
>
> Anyway I like emerge and it would be nice to use it to solve conflicts
> with git.
> Now the default configuration for me is really bad, because it opens a
> new emacs, loads the WHOLE configuration and in short doesn't work at
> all!
>
> So I read again the doc and ended up with something like
> [mergetool "mymerge"]
> 	cmd = 'exec /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -e \"(ediff-files (getenv \"LOCAL\") (getenv \"MERGED\") (getenv \"REMOTE\"))\"'
> [merge]
> 	tool = mymerge
>
> after trying all possible easier solutions.
>
> but now way it doesn't work.
> I just need to fire up the editor with ediff-files on those three files,
> which at the call moment are part of the environment (I think).
>
> Not sure I need the getenv but the thing is that I have no way to get
> the f***** actual command used by git for emerge.
>
> I tried all possible magic combinations with git config, but no way it
> doesn't spit it out..
> Any help is welcome :)
> Thanks

I didn't in the easiest place, what process is started by git, and here
the command (I added the -Q)

--8<---------------cut here---------------start------------->8---
cmd =Emacs -Q -f emerge-files-with-ancestor-command $LOCAL $MERGED $REMOTE
--8<---------------cut here---------------end--------------->8---

it's already much better, but I would like to use emacsclient instead,
still not working there though :(




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: git mergetool again
       [not found] <mailman.13.1281727462.3281.help-gnu-emacs@gnu.org>
@ 2010-08-13 20:00 ` David Kastrup
  0 siblings, 0 replies; 7+ messages in thread
From: David Kastrup @ 2010-08-13 20:00 UTC (permalink / raw)
  To: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> I really have to solve this before I go completely insane :D
> It's more a problem of git but could make life easier to many emacs
> user, so I think it's not offtopic.
>
> Anyway I like emerge and it would be nice to use it to solve conflicts
> with git.
> Now the default configuration for me is really bad, because it opens a
> new emacs, loads the WHOLE configuration and in short doesn't work at
> all!
>
> So I read again the doc and ended up with something like
> [mergetool "mymerge"]
> 	cmd = 'exec /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -e \"(ediff-files (getenv \"LOCAL\") (getenv \"MERGED\") (getenv \"REMOTE\"))\"'
> [merge]
> 	tool = mymerge
>
> after trying all possible easier solutions.
>
> but now way it doesn't work.
> I just need to fire up the editor with ediff-files on those three files,
> which at the call moment are part of the environment (I think).

ediff-files is not emerge.  If you want to use ediff, don't use a
mergetool.  Instead just use
M-x smerge-ediff RET
on the unmerged file with the conflict markers.

-- 
David Kastrup


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: git mergetool again
  2010-08-13 19:43 ` Andrea Crotti
@ 2010-08-13 20:47   ` Andrea Crotti
  2010-08-17 14:10     ` Andrea Crotti
       [not found]     ` <mailman.7.1282054253.30498.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Andrea Crotti @ 2010-08-13 20:47 UTC (permalink / raw)
  To: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

>
> I didn't in the easiest place, what process is started by git, and here
> the command (I added the -Q)
>
> cmd =Emacs -Q -f emerge-files-with-ancestor-command $LOCAL $MERGED $REMOTE
>
> it's already much better, but I would like to use emacsclient instead,
> still not working there though :(

Sorry wrong command
--8<---------------cut here---------------start------------->8---
 cmd = Emacs -Q -f emerge-files-with-ancestor-command $LOCAL $REMOTE $MERGED
--8<---------------cut here---------------end--------------->8---

Hope it's useful for someone else that wants emerge as the merge tool..




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: git mergetool again
  2010-08-13 20:47   ` Andrea Crotti
@ 2010-08-17 14:10     ` Andrea Crotti
       [not found]     ` <mailman.7.1282054253.30498.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Andrea Crotti @ 2010-08-17 14:10 UTC (permalink / raw)
  To: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:
> Sorry wrong command
>  cmd = Emacs -Q -f emerge-files-with-ancestor-command $LOCAL $REMOTE $MERGED
>
> Hope it's useful for someone else that wants emerge as the merge tool..

I don't get what's wrong with this line
--8<---------------cut here---------------start------------->8---
cmd = /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c -e '(emerge-files-with-ancestor-command (getenv "LOCAL") (getenv "MERGED") (getenv "REMOTE"))'
--8<---------------cut here---------------end--------------->8---

instead of 
        # cmd = Emacs -Q -f emerge-files-with-ancestor-command $LOCAL $REMOTE $MERGED

should not that be the same thing?
But I always get that "local" is a void variable...




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: git mergetool again
       [not found]     ` <mailman.7.1282054253.30498.help-gnu-emacs@gnu.org>
@ 2010-08-17 15:11       ` David Kastrup
  2010-08-17 21:26         ` jpkotta
  0 siblings, 1 reply; 7+ messages in thread
From: David Kastrup @ 2010-08-17 15:11 UTC (permalink / raw)
  To: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> Andrea Crotti <andrea.crotti.0@gmail.com> writes:
>> Sorry wrong command
>>  cmd = Emacs -Q -f emerge-files-with-ancestor-command $LOCAL $REMOTE $MERGED
>>
>> Hope it's useful for someone else that wants emerge as the merge tool..
>
> I don't get what's wrong with this line
> cmd = /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c -e '(emerge-files-with-ancestor-command (getenv "LOCAL") (getenv "MERGED") (getenv "REMOTE"))'
>
> instead of 
>         # cmd = Emacs -Q -f emerge-files-with-ancestor-command $LOCAL $REMOTE $MERGED
>
> should not that be the same thing?

Huh?  Why should it?  emerge-files-with-ancestor-command does not take
arguments.

-- 
David Kastrup


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: git mergetool again
  2010-08-17 15:11       ` David Kastrup
@ 2010-08-17 21:26         ` jpkotta
  0 siblings, 0 replies; 7+ messages in thread
From: jpkotta @ 2010-08-17 21:26 UTC (permalink / raw)
  To: help-gnu-emacs

On Aug 17, 10:11 am, David Kastrup <d...@gnu.org> wrote:
> Andrea Crotti <andrea.crott...@gmail.com> writes:
> > Andrea Crotti <andrea.crott...@gmail.com> writes:
> >> Sorry wrong command
> >>  cmd = Emacs -Q -f emerge-files-with-ancestor-command $LOCAL $REMOTE $MERGED
>
> >> Hope it's useful for someone else that wants emerge as the merge tool..
>
> > I don't get what's wrong with this line
> > cmd = /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c -e '(emerge-files-with-ancestor-command (getenv "LOCAL") (getenv "MERGED") (getenv "REMOTE"))'
>
> > instead of
> >         # cmd = Emacs -Q -f emerge-files-with-ancestor-command $LOCAL $REMOTE $MERGED
>
> > should not that be the same thing?
>
> Huh?  Why should it?  emerge-files-with-ancestor-command does not take
> arguments.
>
> --
> David Kastrup

I use Mercurial, but the merge tool config is basically the same.  See
http://mercurial.selenic.com/wiki/MergingWithEmacs for some
solutions.  I used to use the script there, now I use what would be
the equivalent of 'emacs --eval "(ediff-merge-with-ancestor \"$local\"
\"$other\" \"$base\" nil \"$output\")"'


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-08-17 21:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-13 19:24 git mergetool again Andrea Crotti
2010-08-13 19:43 ` Andrea Crotti
2010-08-13 20:47   ` Andrea Crotti
2010-08-17 14:10     ` Andrea Crotti
     [not found]     ` <mailman.7.1282054253.30498.help-gnu-emacs@gnu.org>
2010-08-17 15:11       ` David Kastrup
2010-08-17 21:26         ` jpkotta
     [not found] <mailman.13.1281727462.3281.help-gnu-emacs@gnu.org>
2010-08-13 20:00 ` David Kastrup

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.