emacs-devel
[Top][All Lists]
Advanced

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

Re: Remote temporary directory (was: bug#23076: 24.5; vc-git: add a new


From: Eli Zaretskii
Subject: Re: Remote temporary directory (was: bug#23076: 24.5; vc-git: add a new variable for log output coding system)
Date: Wed, 27 Jul 2016 19:09:43 +0300

> From: Michael Albinus <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Wed, 27 Jul 2016 11:57:42 +0200
> 
> (defun temporary-file-directory (&optional base)
>   "The directory for writing temporary files.
> BASE indicates the host where this directory is located.  If this
> is a remote file name, the directory for writing temporary files
> is located on the same host.  A local file name for BASE lets the
> function return the value of the variable `temporary-file-directory'.
> 
> The default value of BASE is `default-directory'."
> --8<---------------cut here---------------end--------------->8---
> 
> Then you could call
> 
> (let ((temporary-file-directory (temporary-file-directory)))
>   (make-temp-file "my-prefix))
> 
> Similar for `make-temp-name'.

I don't understand what you meant by the last sentence.  Currently,
make-temp-name doesn't support remote files and doesn't pay attention
to temporary-file-directory.

It seems to me that we need to extend make-temp-file to support remote
files, but I see no reason to extend temporary-file-directory for that
purpose, sincea remote version of make-temp-file will invoke utilities
that might have their own ideas about where temporary file should live
and how they should be called.



reply via email to

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