monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] emacs merge on Win32


From: Stephen Leake
Subject: [Monotone-devel] emacs merge on Win32
Date: Thu, 30 Aug 2007 08:20:37 -0400
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt)

When monotone needs help merging, it uses the following to launch
emacs:

local elisp = 
 "(ediff-merge-files-with-ancestor \"%s\" \"%s\" \"%s\" nil \"%s\")"

local ret = execute(emacs, "--eval", 
         string.format(elisp, tbl.lfile, tbl.rfile, tbl.afile, tbl.outfile))

This fails on Win32, because the backslashes in the file names are not
escaped. For example, a typical file is:

"C:\DOCUME~1\stephe\LOCALS~1\Temp/mtn.left.QEBJ8B"

Emacs lisp turns this into:

"C:DOCUME~1 tepheLOCALS~1Temp/mtn.left.QEBJ8B"

Escaping the backslashes is straightforward; they just need a
preceding backslash:

"C:\\DOCUME~1\\stephe\\LOCALS~1\\Temp/mtn.left.QEBJ8B"

Alternately, they could be converted to forward slashes (Emacs handles
either):

"C:/DOCUME~1/stephe/LOCALS~1/Temp/mtn.left.QEBJ8B"

Is there already a Lua function that does that, or something similar?

-- 
-- Stephe





reply via email to

[Prev in Thread] Current Thread [Next in Thread]