[Top][All Lists]

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

RE: Couple minor tramp bugs

From: Jeff Costlow
Subject: RE: Couple minor tramp bugs
Date: Thu, 3 Aug 2006 08:25:02 -0700

Thank you for the file-remote-p fix.  I'll add that to my .emacs

As for M-x revert-file.  You could cause the bug  by merely loading a remote file, then M-x revert-file.  It will fail with "argument not correct; stringp, nil" (something like that, I'm not at my normal computer right now) from tramp-flush-file-property.  This was also happening the first time I attempted to load a remote file.

Thank you for the help.  My elisp is quite rusty, so muddling through all this is slow going for me.

-----Original Message-----
From: Michael Albinus [mailto:address@hidden]
Sent: Thu 8/3/2006 6:25 AM
To: Jeff Costlow
Cc: address@hidden
Subject: Re: Couple minor tramp bugs

"Jeff Costlow" <address@hidden> writes:



> I also was not able to M-x revert-file.  This is apparently caused by
> the tramp-cache-before-revert function that defines a nil localname, and
> then uses it.  It seems to be better off when it uses bfn.
> --- tramp-cache.el      2006-08-02 11:03:07.570130600 -0700
> +++ tramp-cache.el~     2006-07-28 08:30:37.636923900 -0700
> @@ -149,17 +149,17 @@
>  (defun tramp-cache-before-revert-function ()
>    "Flush all Tramp cache properties from buffer-file-name."
>    (let ((bfn (buffer-file-name))
>         ;; Pacify byte-compiler.
>         v localname)
>      (when (and (stringp bfn)
>                (tramp-tramp-file-p bfn))
>        (with-parsed-tramp-file-name bfn nil
> -       (tramp-flush-file-property v bfn)))))
> +       (tramp-flush-file-property v localname)))))

I don't believe that's the solution. localname is defined in order to
satisfy the byte-compiler; it is defined again inside the macro
with-parsed-tramp-file-name, and the value from there is used.

Your solution uses bfn, which is a remote file. This doesn't make
sense - the parameter FILE of tramp-flush-file-property is intended to
be a local file name.

Could you, please, give me a recipe how you were "not able to M-x
revert-file"? What's the buffer where you have called revert-file?
What's the buffer-file-name from that buffer?

Best regards, Michael.

reply via email to

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