X-From-Line: owner-xemacs-nt@xemacs.org Thu Jun 25 15:49 MET 1998
Received: from rapier.ecf.teradyne.com (rapier.ecf.teradyne.com [131.101.48.1]) by engine.ecf.teradyne.com (8.7.1/8.7.1) with ESMTP id PAA23189 for <aichner@ecf.teradyne.com>; Thu, 25 Jun 1998 15:49:37 +0200 (MET DST)
Received: from steadfast.teradyne.com (steadfast.teradyne.com [131.101.1.200]) by rapier.ecf.teradyne.com (8.7.1/8.7.1) with ESMTP id OAA24087 for <aichner@ecf.teradyne.com>; Thu, 25 Jun 1998 14:48:23 +0100 (BST)
Received: from gwyn.tux.org (gwyn.tux.org [207.96.122.8]) by steadfast.teradyne.com (8.8.5/8.7.1) with ESMTP id JAA09041 for <aichner@ecf.teradyne.com>; Thu, 25 Jun 1998 09:51:27 -0400 (EDT)
Received: (from majordom@localhost)
	by gwyn.tux.org (8.8.8/8.8.8) id IAA19531
	for xemacs-nt-out; Thu, 25 Jun 1998 08:46:14 -0400
Received: from harcourt-web.plc.psion.com (harcourt-web.plc.psion.com [194.129.1.31])
	by gwyn.tux.org (8.8.8/8.8.8) with ESMTP id IAA19524
	for <xemacs-nt@xemacs.org>; Thu, 25 Jun 1998 08:46:10 -0400
Received: from tardis.ed.ac.uk (dhcp022.plc.psion.com [194.129.2.22])
          by harcourt-web.plc.psion.com (2.5 Build 2639 (Berkeley 8.8.6)/8.8.4) with ESMTP
	  id NAA00081; Thu, 25 Jun 1998 13:44:21 +0100
Message-ID: <3592467F.44407946@tardis.ed.ac.uk>
Date: Thu, 25 Jun 1998 13:45:51 +0100
From: Jonathan Harris <jhar@tardis.ed.ac.uk>
Organization: Very little
X-Mailer: Mozilla 4.05 [en] (WinNT; U)
MIME-Version: 1.0
To: XEmacs NT List <xemacs-nt@xemacs.org>
Subject: efs on Windows NT
Sender: owner-xemacs-nt@xemacs.org
Precedence: bulk
X-Mailing-List: <xemacs-nt@xemacs.org>
Content-Type: multipart/mixed; boundary="------------96FB6EDAE6AC5056A34B13E3"
X-Content-Length: 3620
Xref: tomorrow.ecf.teradyne.com xemacs-nt:327
Lines: 94

This is a multi-part message in MIME format.
--------------96FB6EDAE6AC5056A34B13E3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Damned server appears to have eaten my mail. Apologies if you get this
twice.

The attached patch against efs package 1.08, version "1.16/1.56" gets
efs mostly working on native build when used with my recent "[PATCH] EFS
to work on NT Native - take 2" instead of Adrian's patch.

There are a few problems with efs:

- I had to customize efs-tmp-name-template to "C:\temp\efs". The default
value of "/tmp/efs" assumes the existance of a /tmp directory. The user
shouldn't have to do this; XEmacs provides a temp-directory function
that efs should call.

- I had to customize efs-generate-anonymous-password. On systems where
system-name returns just a hostname, efs attempts to exec nslookup to
find out the localhost's domain. This fails (for me) on NT, and I think
nslookup isn't shipped with 95/98. efs should probably not attempt to
exec nslookup at all when system-type is "windows-nt".

- efs complains that "<connection> seems not a pty. Kill?" on each new
connection. I didn't figure what causes this, but it may be a buffering
problem.

- efs calls XEmacs filename-parsing functions on ftp paths. This causes
failure on windows-nt systems because these functions replace '/' with
'\\', and ftp servers don't accept '\\' in paths. I bodged up a few
occurrences in this patch, but not all. Basically, any ocurrence of
"(let (file-name-handler-alist) ..." in the efs code means that efs is
about to call a XEmacs filename-parsing function. That function call
will have to be replaced by code that does the parsing manually, as in
the attached patch.

I don't have time to properly fix these efs problems on windows-nt. It
would be great if someone else would fix them.

Jonathan.


-- 
Jonathan Harris  |  jhar@tardis.ed.ac.uk
London, England  |  Jonathan.Harris@symbian.com
--------------96FB6EDAE6AC5056A34B13E3
Content-Type: text/plain; charset=us-ascii; name="efs.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="efs.patch"

--- efs.el.orig	Sat Mar 14 11:18:22 1998
+++ efs.el	Wed Jun 24 21:50:46 1998
@@ -6701,8 +6701,10 @@
   ;; By default, simply adds a trailing /, if there isn't one.
   ;; Note that for expanded filenames, it pays to call this rather
   ;; than efs-file-name-as-directory.
-  (let (file-name-handler-alist)
-    (file-name-as-directory name)))
+  (if (efs-save-match-data
+	(string-match "/$" name))
+      name
+    (concat name "/")))
  	
 (defun efs-file-name-directory (name)
   ;; file-name-directory for remote files. Takes care not to
@@ -6718,7 +6720,9 @@
       (if (efs-save-match-data
 	    (not (string-match "/" path)))
 	  (efs-replace-path-component name "")
-	(file-name-directory name)))))
+	(efs-save-match-data
+	  (if (string-match ".*/" name)
+	      (match-string 0 name)))))))
 
 (defun efs-file-name-nondirectory (name)
   ;; Computes file-name-nondirectory for remote files.
@@ -6753,8 +6757,11 @@
   ;; Call this if you want to apply directory-file-name to the remote
   ;; part of a efs-style path. Don't call for non-efs-style paths,
   ;; as this short-circuits the file-name-handler-alist completely.
-  (let (file-name-handler-alist)
-    (directory-file-name dir)))
+  ;; Assumes dir is not equal to "/".
+  (efs-save-match-data
+    (if (string-match "(.*)/$" dir)
+	(match string 1 dir)
+      dir)))
 
 (efs-defun efs-remote-directory-file-name nil (dir)
   "Returns the file name on the remote system of directory DIR.

--------------96FB6EDAE6AC5056A34B13E3--

