unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6923: 24.0.50; Can't load remote elc.gz file using tramp-ftp
@ 2010-08-27  8:02 Katsumi Yamaoka
  2010-08-27 10:37 ` Michael Albinus
  0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2010-08-27  8:02 UTC (permalink / raw)
  To: 6923

Hi,

Now there is the file gnus.elc.gz in: /ftp:ftp.jpl.org:/pub/tmp/lisp
You can see this one fails:

(let ((load-path (cons "/ftp:ftp.jpl.org:/pub/tmp/lisp" load-path)))
  (load "gnus"))

;; (require 'gnus) also fails.

This might not be a bug and there might not be a demand either,
but loading elc.gz file using tramp-ssh succeeds (you don't have
access to this, sorry):

(let ((load-path (cons "/ssh:jpl.org:~/ftp/pub/tmp/lisp" load-path)))
  (load "gnus"))

It seems easy to solve.  How about the attached patch?

BTW, after starting Emacs, I needed to do tramp-ftp (e.g. dired)
to the remote site before testing the above two items.  If not,
I got the error `Variable binding depth exceeds max-specpdl-size'
for unknown reason.  At that time, there were many "*ftp-.netrc*<N>"
buffers, in which `buffer-file-name' was "~/.netrc".  I'd like to
investigate this when I have time.

Regards,

--8<---------------cut here---------------start------------->8---
--- ange-ftp.el~	2010-05-28 00:48:36 +0000
+++ ange-ftp.el	2010-08-27 05:59:12 +0000
@@ -1728,11 +1728,12 @@
 ;;; Temporary file location and deletion...
 ;;; ------------------------------------------------------------
 
-(defun ange-ftp-make-tmp-name (host)
+(defun ange-ftp-make-tmp-name (host &optional suffix)
   "This routine will return the name of a new file."
   (make-temp-file (if (ange-ftp-use-gateway-p host)
 		      ange-ftp-gateway-tmp-name-template
-		    ange-ftp-tmp-name-template)))
+		    ange-ftp-tmp-name-template)
+		  nil suffix))
 
 (defun ange-ftp-del-tmp-name (filename)
   "Force to delete temporary file."
@@ -4158,7 +4159,8 @@
   (let* ((fn1 (expand-file-name file))
 	 (pa1 (ange-ftp-ftp-name fn1)))
     (if pa1
-	(let ((tmp1 (ange-ftp-make-tmp-name (car pa1))))
+	(let ((tmp1 (ange-ftp-make-tmp-name (car pa1)
+					    (file-name-extension file t))))
 	  (ange-ftp-copy-file-internal fn1 tmp1 t nil
 				       (format "Getting %s" fn1))
 	  tmp1))))
--8<---------------cut here---------------end--------------->8---





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-27 23:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-27  8:02 bug#6923: 24.0.50; Can't load remote elc.gz file using tramp-ftp Katsumi Yamaoka
2010-08-27 10:37 ` Michael Albinus
2011-03-03 21:33   ` Glenn Morris
2011-03-04 19:37     ` Michael Albinus
2011-03-06  0:42       ` Glenn Morris
2011-06-27 21:31     ` Chong Yidong
2011-06-27 23:35       ` Katsumi Yamaoka

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).