* emerge-files from command line fails (merging out of unison)
@ 2004-01-05 1:33 Karl Voit
2004-01-12 0:30 ` Johan Bockgård
0 siblings, 1 reply; 2+ messages in thread
From: Karl Voit @ 2004-01-05 1:33 UTC (permalink / raw)
Hi!
I am using unison file syncronizer to sync my notebook with my
desktop. This tool uses a special syntax[1] to call an external tool
to do the merging-job. I want to use my emacs with emerge to merge
files.
Fortunately, I found [2] to help me in this case. But when I merge
files (file-A and file-B are opened correctly) and quit the
merge-process ('q'), unison complains, that emacs didn't generate an
outfile which is indeed the case (no such filename exists).
And I cannot figure out, how emacs should know about the name of the
outfile, when I take a look at the proposed[2] code-sniplet:
1:(defun mlw-emerge-files-command ()
2: (let ((file-a (nth 0 command-line-args-left))
3: (file-b (nth 1 command-line-args-left)))
4: (setq command-line-args-left (nthcdr 2 command-line-args-left))
5: (emerge-files-internal
6: file-a file-b nil nil nil)))
In line 6, there are file-a and file-b entered as parameters for
emerge-files-internal but I guess, there should be something like
file-new too.
So I tried to modify the code: (without really knowing emacs-LISP at all!)
1:(defun vk-emerge-files-command ()
2: (let ((file-a (nth 0 command-line-args-left))
3: (file-b (nth 1 command-line-args-left))
4: (file-new (nth 2 command-line-args-left)))
5: (setq command-line-args-left (nthcdr 3 command-line-args-left))
6: (emerge-files-internal
7: file-a file-b nil nil file-new)))
But this does not generate the correct result-file too :-(
I think it should be that way, that the file-new (in this case
"$HOME/.unison/#unisonmerged-file") should appear _instead_ of the
*merge*-buffer, right? But there is no such buffer. But
emerge-files-internal should expect the outfile as last parameter, right?
Unison calls my emerge-Script which contains basically following line
emacs --eval "(vk-emerge-files-command)" $@
to merge files. The parameters in $@ are file-a, file-b and file-new (I
already verified, that this reaches the emacs-call correctly).
What do I do wrong?
[1] http://www.cis.upenn.edu/~bcpierce/unison/manual.html#merge
[2] http://mail.gnu.org/archive/html/help-gnu-emacs/2003-01/msg00805.html
--
Karl VOIT, Graz University of Technology (Austria/Europe)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-12 0:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-05 1:33 emerge-files from command line fails (merging out of unison) Karl Voit
2004-01-12 0:30 ` Johan Bockgård
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).