tramp-devel
[Top][All Lists]
Advanced

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

Re: tramp (2.0.28); tramp-auto-save-directory broken (at least in XEmacs


From: Angus Lees
Subject: Re: tramp (2.0.28); tramp-auto-save-directory broken (at least in XEmacs); patch included
Date: Mon, 03 Mar 2003 11:23:03 +1100
User-agent: Wanderlust/2.10.0 (Venus) XEmacs/21.4 (Portable Code)

At Wed, 12 Feb 2003 08:59:12 +0100, Kai Gro├čjohann wrote:
> Ken Neighbors <address@hidden> writes:
> 
> > Here's my patch to tramp.el.  The fix is to simply pass the newly
> > defined buffer-file-name as an argument to the
> > make-auto-save-file-name function, since the file-name argument takes
> > precedence over the buffer-local variables buffer-file-truename and
> > buffer-file-name as you can see in the code snippet above.
> 
> This fix won't work for Emacs since its make-auto-save-file-name
> function does not accept arguments.

alternatively, just have tramp-make-auto-save-file-name return the
desired auto-save path directly, rather than calling back into
make-auto-save-file-name.  The tramp filename includes, host, user,
method, etc so should already be unique.

i have been successfully using just such a
tramp-make-auto-save-file-name:

(defun my-tramp-make-auto-save-file-name (fn)
  "Returns a file name in `tramp-auto-save-directory' for autosaving this file."
  (when tramp-auto-save-directory
    (unless (file-exists-p tramp-auto-save-directory)
      (make-directory tramp-auto-save-directory t)))
  (expand-file-name
   (tramp-subst-strs-in-string '(("_" . "|")
                                 ("/" . "_a")
                                 (":" . "_b")
                                 ("|" . "__")
                                 ("[" . "_l")
                                 ("]" . "_r"))
                               fn)
   tramp-auto-save-directory))

-- 
 - Gus




reply via email to

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