From xemacs-m  Thu Mar 20 11:36:00 1997
Received: from newman (root@newman.aventail.com [38.225.141.10])
	by xemacs.org (8.8.5/8.8.5) with SMTP id LAA15279
	for <xemacs-beta@xemacs.org>; Thu, 20 Mar 1997 11:35:59 -0600 (CST)
Received: from kramer.in.aventail.com.aventail.com (wmperry@kramer [192.168.1.12]) by newman (8.6.12/8.6.9) with SMTP id JAA00981; Thu, 20 Mar 1997 09:33:21 -0800
Date: Thu, 20 Mar 1997 09:33:21 -0800
Message-Id: <199703201733.JAA00981@newman>
From: "William M. Perry" <wmperry@aventail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: "Karl M. Hegbloom" <karlheg@inetarena.com>
Cc: <xemacs-beta@xemacs.org>
Subject: Re: [19.15b101 comint patched] w3, html mode, efs
In-Reply-To: <199703200828.AAA28571@bittersweet.inetarena.com>
References: <199703200828.AAA28571@bittersweet.inetarena.com>
Errors-to: wmperry@aventail.com
Reply-to: wmperry@aventail.com
X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7</SYF`{vYQ(&RI1&EiH[FvT;J}@f!4kfz
 x_!Y#=y{Uuj9GvUi=cPuajQ(Z42R[wE@{G,sn$qGr5g/wnb*"*ktI+,CD}1Z'wxrM2ag-r0p5I6\nA
 [WJopW_J.WY;

Karl M. Hegbloom writes:
>
>I just submitted a bug report on w3...  right after that, I tried to view
>it in Netscape, and got a dialog saying that it couldn't find the file:
>karlheg@inetarena:/home/karlheg/public_html/HEADER.html
>
>It looks like what needs to happen is that the html mode be made
>'efs' aware, and ask for an HTTP URL to a remote file to hand off to a
>browser...  Or save it locally to a /tmp/file for viewing.

  I guess you could do this with file-remote-p, and then munge it into an
ftp URL before sending it to netscape.  This brings up an interesting bug
in file-remote-p - there was no way it could have been working.  Something
like this might work with the attached patch.

(defun remote-file-to-url (file)
  (let ((components (file-remote-p file)))
     (if (or (null components) (symbolp components))
       (concat "file:" (expand-file-name file))
      (apply 'format "ftp://%2$s@%1$s%3$s" components))))

>It would be good to have a menu option for both methods; one for file: and
>another for http: or https:.
>
> W3 could be made efs aware also, right?

  W3 is efs aware, just as any other emacs app is.

-Bill P.

*** files.el	1997/03/20 17:29:11	1.1
--- files.el	1997/03/20 17:29:34
***************
*** 3012,3020 ****
    "Test whether file resides on the local system.
  The special value 'unknown is returned if no remote file access package
  has been loaded."
!   (cond ((featurep 'ange-ftp) (ange-ftp-ftp-path file-name))
!         (t (require 'efs)
! 	   (efs-ftp-path file-name))))
  
  ;; Written in C in FSF
  (defun insert-file-contents (filename &optional visit beg end replace)
--- 3012,3022 ----
    "Test whether file resides on the local system.
  The special value 'unknown is returned if no remote file access package
  has been loaded."
!   (cond ((featurep 'ange-ftp)
! 	 (ange-ftp-ftp-path file))
!         (t
! 	 (require 'efs)
! 	 (efs-ftp-path file))))
  
  ;; Written in C in FSF
  (defun insert-file-contents (filename &optional visit beg end replace)

