tramp-devel
[Top][All Lists]
Advanced

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

Re: still no go with tramp


From: Tim Connors
Subject: Re: still no go with tramp
Date: Sun, 4 Jan 2004 20:07:26 +1100 (EST)

On Sat, 3 Jan 2004, Kai Grossjohann wrote:

> Tim Connors <address@hidden> writes:
>
> > On Sat, 3 Jan 2004, Kai Grossjohann wrote:
> >
> >> How come that the find-file command says
> >> "/address@hidden/home/office/tconnors/magellanic/work/flag", but
> >> the error says "/[rsyncfsh/"?
> >>
> >> This must have happened somewhere, but where?
> >
> > I've got
> >  '(tramp-default-method "rsyncfsh")
> >
> > Does that make sense?
>
> That might explain a transformation from
> "/address@hidden/home/office/tconnors/magellanic/work/flag" to
> "/[rsyncfsh/address@hidden/home/office/tconnors/magellanic/work/flag",
> but not to "/[rsyncfsh/".
>
> Kai, still confused

I'm not entirely sure it's tramp's fault. What always made me confused was
I saw the temp file sitting there in /tmp for a few second - so tramp
seems to be working. But that error message certainly has the wrong info.

I finally got edebug to work (It wouldn't let me instrument
(find-file-noselect) until I explicitly loaded the edebug.el file)

For your reference, I'll include the a large part of the defun, but the
relevant part is highlighted down the bottom:

(defun find-file-noselect (filename &optional nowarn rawfile)

;;;.... lots before here

        ;; Else: we must create a new buffer for filename
        (save-excursion
;;; The truename stuff makes this obsolete.
;;;       (let* ((link-name (car (file-attributes filename)))
;;;              (linked-buf (and (stringp link-name)
;;;                               (get-file-buffer link-name))))
;;;         (if (bufferp linked-buf)
;;;             (message "Symbolic link to file in buffer %s"
;;;                      (buffer-name linked-buf))))
          (setq buf (create-file-buffer filename))
          ;; Catch various signals, such as QUIT, and kill the buffer
          ;; in that case.
          (condition-case data
              (progn
                (set-buffer-major-mode buf)
                (set-buffer buf)
                (erase-buffer)
                (condition-case ()
                    (if rawfile
                        (insert-file-contents-literally filename t)
                      (insert-file-contents filename t))
                  (file-error
                   (when (and (file-exists-p filename)
                              (not (file-readable-p filename)))
                     (signal 'file-error (list "File is not readable"
filename)))
                   (if rawfile
                       ;; Unconditionally set error
                       (setq error t)
                     (or
                      ;; Run find-file-not-found-hooks until one returns
non-nil.
                      (run-hook-with-args-until-success
'find-file-not-found-hooks)
                      ;; If they fail too, set error.
                      (setq error t)))))
                ;; Find the file's truename, and maybe use that as visited
name.
                ;; automatically computed in XEmacs, unless jka-compr was
used!
                (unless buffer-file-truename
                  (setq buffer-file-truename truename))
                (setq buffer-file-number number)
                (and find-file-use-truenames
                     ;; This should be in C.  Put pathname
                     ;; abbreviations that have been explicitly
                     ;; requested back into the pathname.  Most
                     ;; importantly, strip out automounter /tmp_mnt
                     ;; directories so that auto-save will work
                     (setq buffer-file-name (abbreviate-file-name
buffer-file-name)))
                ;; Set buffer's default directory to that of the file.
                (setq default-directory (file-name-directory
buffer-file-name))
                ;; Turn off backup files for certain file names.  Since
                ;; this is a permanent local, the major mode won't
eliminate it.
                (and (not (funcall backup-enable-predicate
buffer-file-name))
                     (progn
                       (make-local-variable 'backup-inhibited)
                       (setq backup-inhibited t)))


;;;; starting here

                (if rawfile
                    ;; #### FSF 20.3 sets buffer-file-coding-system to
                    ;; `no-conversion' here.  Should we copy?  It also
                    ;; makes `find-file-literally' a local variable
                    ;; and sets it to t.
                    nil
                  (after-find-file error (not nowarn))
                  (setq buf (current-buffer))))

;;;; ending here


            (t
             (kill-buffer buf)
             (signal (car data) (cdr data))))
        ))
      buf)))


I trace the function, and the error is signalled in rawfile
test. If I just comment this out, the file loads proerply, the format is
raw. If left in, the error is signalled, the buffer deleted, and I don't
get my file.


Now, I recall that mule causes all sorts of complications with file
encodings, but I have xemacs21-nomule installed. So just to test this out
- I installed xemacs21-mule. Same probs.

Any idea Kai, or should I forward this to xemacs-beta?


-- 
TimC -- http://astronomy.swin.edu.au/staff/tconnors/
"Whenever someone thinks that they can replace SSL/SSH with something much
better that they designed this morning over coffee, their computer
speakers should generate some sort of penis-shaped sound wave and plunge
it repeatedly into their skulls until they achieve enlightenment."
--Peter Gutmann/Matt Robinson




reply via email to

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