From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: =?iso-8859-1?q?Stefan_Reich=F6r?= Newsgroups: gmane.emacs.help Subject: Re: Ediff from command line - winXP Date: Wed, 05 Nov 2003 10:03:20 +0100 Organization: Johannes Kepler Universitaet Linz Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1068023815 24470 80.91.224.253 (5 Nov 2003 09:16:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Nov 2003 09:16:55 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 05 10:16:53 2003 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 1AHJmW-00013Z-00 for ; Wed, 05 Nov 2003 10:16:53 +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 1AHJm2-0003tJ-1s for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Nov 2003 04:16:22 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (berkeley-unix) Original-NNTP-Posting-Host: felix.riic.uni-linz.ac.at Original-X-Trace: news.uni-linz.ac.at 1068023001 felix.riic.uni-linz.ac.at (5 Nov 2003 10:03:21 +0100) Original-Lines: 38 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!newscore.univie.ac.at!aconews-feed.univie.ac.at!news.uni-linz.ac.at!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:117877 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:13816 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13816 Hallo Søren! > that sort of works... And by that I means that it works - but not really in > the the way I would like to do it: > > I would like to be able to use this command in a .bat-file, like: > compare.bat: > gnudoit "(ediff \"%1\" \"%2\")" > > but that wont work since the filename have to be in either d:\\files\\file1 > (double backslash) or d:/files/file1 (unix way - with single slashes)... > My questions is now: > 1: Can I make the emacs system look in the current directory for the files?? > 2: Is there a way to make batch-files expand %1 into either of these paths > (Might be the wrong NG for this question) You coud use the emacs function expand-file-name: expand-file-name is a built-in function. (expand-file-name NAME &optional DEFAULT-DIRECTORY) Convert filename NAME to absolute, and canonicalize it. Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative (does not start with slash); if DEFAULT-DIRECTORY is nil or missing, the current buffer's value of default-directory is used. File name components that are `.' are removed, and so are file name components followed by `..', along with the `..' itself; note that these simplifications are done without checking the resulting file names in the file system. An initial `~/' expands to your home directory. An initial `~USER/' expands to USER's home directory. See also the function `substitute-in-file-name'. gnudoit "(ediff (expand-file-name \"%2\" \"%1\") (expand-file-name \"%3\" \"%1\"))" Then you call the batch file with the full directory path (don't know how to get this) and the two file names. Stefan.