From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Karl Voit Newsgroups: gmane.emacs.help Subject: emerge-files from command line fails (merging out of unison) Date: Mon, 5 Jan 2004 02:33:10 +0100 Organization: www.karl-voit.at Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: Reply-To: news@Karl-Voit.at NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1073267291 23266 80.91.224.253 (5 Jan 2004 01:48:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Jan 2004 01:48:11 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 05 02:48:03 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AdJqc-0003iv-00 for ; Mon, 05 Jan 2004 02:48:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AdKl6-00018p-0p for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Jan 2004 21:46:24 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!i-196.vc-graz.ac.AT!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 57 Original-NNTP-Posting-Host: i-196.vc-graz.ac.at (193.170.225.196) Original-X-Trace: news.uni-berlin.de 1073266954 5381272 193.170.225.196 ([164903]) X-Orig-Path: lisa.homeunix.net!news X-No-Archive: no X-GPG-Key: http://www.Karl-Voit.at/Karl_Voit_GnuPG_public_key.gpg X-Registered-Linux-User: 224337 X-Confession: church of TUX X-Face: 0.jT^"<'ITetBu!Tz2)mF"hHU|N.Ys; ^AFqy1:C}J7$+yq^bXgqSe!zg%1U$a.Pxp!|2v19pW,|L~{xnuxO<0%VZu~BNm4xW?/-:59.g!g}Vo4.xm\-5{3:lJ{{OU!Z/uX9aZi=d*Epx!&>!"HE2ha?C=[+l5&+'{vx*'FDQzMdHZoJUj~6I9B:9lU\]J!6I~q%xSb@*"DYN2fC@kXQ(>^#N User-Agent: slrn/0.9.8.0 (Linux) Original-Xref: shelby.stanford.edu gnu.emacs.help:119757 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15700 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15700 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)