tramp-devel
[Top][All Lists]
Advanced

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

Re: Help needed from XEmacs gurus (was: Invalid format character: ?m)


From: Kai Großjohann
Subject: Re: Help needed from XEmacs gurus (was: Invalid format character: ?m)
Date: Tue, 23 Jul 2002 11:38:44 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu)

Daniel Serodio <address@hidden> writes:

> On Mon, 2002-07-22 at 16:25, Kai Großjohann wrote:
>
>> What happens when you eval the following expression?
>> 
>>     (tramp-make-tramp-file-name nil "scp" nil "alicia" "/tmp/teste")
>> 
>> Does it return a filename with parentheses?
>
> Yes, it returns "/[(scp)/(alicia)](/tmp/teste)"

Please try the following patch, or the current CVS version.

2002-07-23  Kai Großjohann  <address@hidden>

        * tramp.el (tramp-open-connection-su, tramp-multi-connect-telnet) 
        (tramp-multi-connect-rlogin, tramp-multi-connect-su) 
        (tramp-make-tramp-file-name, tramp-make-tramp-multi-file-name):
        Correct alist for `format-spec', use (a . b) instead of (a b).

Index: lisp/tramp.el
===================================================================
RCS file: /cvsroot/tramp/tramp/lisp/tramp.el,v
retrieving revision 2.138
diff -u -r2.138 tramp.el
--- lisp/tramp.el       21 Jul 2002 08:44:54 -0000      2.138
+++ lisp/tramp.el       23 Jul 2002 09:35:49 -0000
@@ -3875,7 +3875,7 @@
                        (tramp-get-su-program multi-method method)
                        (mapcar
                         '(lambda (x)
-                           (format-spec x `((?u ,user))))
+                           (format-spec x `((?u . ,user))))
                         (tramp-get-su-args multi-method method))))
              (found nil)
              (pw nil))
@@ -3990,8 +3990,9 @@
 character.
 
 If USER is nil, uses the return value of (user-login-name) instead."
-  (let ((cmd (format-spec command `((?h ,host) (?n ,tramp-rsh-end-of-line))))
-        (cmd1 (format-spec command `((?h ,host) (?n ""))))
+  (let ((cmd (format-spec command
+                         `((?h . ,host) (?n . ,tramp-rsh-end-of-line))))
+        (cmd1 (format-spec command `((?h . ,host) (?n . ""))))
         found pw)
     (erase-buffer)
     (tramp-message 9 "Sending telnet command `%s'" cmd1)
@@ -4040,12 +4041,12 @@
 `%%' if you want to use a literal percent character.
 
 If USER is nil, uses the return value of (user-login-name) instead."
-  (let ((cmd (format-spec command `((?h ,host)
-                                   (?u ,(or user (user-login-name)))
-                                   (?n ,tramp-rsh-end-of-line))))
-        (cmd1 (format-spec command `((?h ,host)
-                                    (?u ,(or user (user-login-name)))
-                                    (?n ""))))
+  (let ((cmd (format-spec command `((?h . ,host)
+                                   (?u . ,(or user (user-login-name)))
+                                   (?n . ,tramp-rsh-end-of-line))))
+        (cmd1 (format-spec command `((?h . ,host)
+                                    (?u . ,(or user (user-login-name)))
+                                    (?n . ""))))
         found)
     (erase-buffer)
     (tramp-message 9 "Sending rlogin command `%s'" cmd1)
@@ -4093,10 +4094,10 @@
 user name, and `%n' is replaced with the value of
 `tramp-rsh-end-of-line'.  Use `%%' if you want a literal percent
 character."
-  (let ((cmd (format-spec command `((?u ,(or user (user-login-name)))
-                                   (?n ,tramp-rsh-end-of-line))))
-        (cmd1 (format-spec command `((?u ,(or user (user-login-name)))
-                                    (?n ""))))
+  (let ((cmd (format-spec command `((?u . ,(or user (user-login-name)))
+                                   (?n . ,tramp-rsh-end-of-line))))
+        (cmd1 (format-spec command `((?u . ,(or user (user-login-name)))
+                                    (?n . ""))))
         found)
     (erase-buffer)
     (tramp-message 9 "Sending su command `%s'" cmd1)
@@ -4927,9 +4928,9 @@
       (tramp-make-tramp-multi-file-name multi-method method user host path)
     (if user
         (format-spec tramp-make-tramp-file-format
-                     `((?m ,method) (?u ,user) (?h ,host) (?p ,path)))
+                     `((?m . ,method) (?u . ,user) (?h . ,host) (?p . ,path)))
       (format-spec tramp-make-tramp-file-user-nil-format
-                   `((?m ,method) (?h ,host) (?p ,path))))))
+                   `((?m . ,method) (?h . ,host) (?p . ,path))))))
 
 ;; CCC: Henrik Holm: Not Changed.  Multi Method.  What should be done
 ;; with this when USER is nil?
@@ -4940,15 +4941,15 @@
   (let* ((prefix-format (nth 0 tramp-make-multi-tramp-file-format))
          (hop-format    (nth 1 tramp-make-multi-tramp-file-format))
          (path-format   (nth 2 tramp-make-multi-tramp-file-format))
-         (prefix (format-spec prefix-format `((?m ,multi-method))))
+         (prefix (format-spec prefix-format `((?m . ,multi-method))))
          (hops "")
-         (path (format-spec path-format `((?p ,path))))
+         (path (format-spec path-format `((?p . ,path))))
          (i 0)
          (len (length method)))
     (while (< i len)
       (let ((m (aref method i)) (u (aref user i)) (h (aref host i)))
         (setq hops (concat hops (format-spec hop-format
-                                            `((?m ,m) (?u ,u) (?h ,h)))))
+                                            `((?m . ,m) (?u . ,u) (?h . ,h)))))
         (incf i)))
     (concat prefix hops path)))
 

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)




reply via email to

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