all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Karl Voit <devnull@Karl-Voit.at>
Subject: emerge-files from command line fails (merging out of unison)
Date: Mon, 5 Jan 2004 02:33:10 +0100	[thread overview]
Message-ID: <slrnbvhfmm.85f.devnull@lisa.homeunix.net> (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)

             reply	other threads:[~2004-01-05  1:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05  1:33 Karl Voit [this message]
2004-01-12  0:30 ` emerge-files from command line fails (merging out of unison) Johan Bockgård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrnbvhfmm.85f.devnull@lisa.homeunix.net \
    --to=devnull@karl-voit.at \
    --cc=news@Karl-Voit.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.