[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Remote temporary directory
From: |
Michael Albinus |
Subject: |
Re: Remote temporary directory |
Date: |
Wed, 27 Jul 2016 18:56:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
Hi Eli,
>> (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.
You're right, my bad. `make-temp-name' doesn't pay attention to any 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.
These "utilities that might have their own ideas about where temporary
file should live" are triggered by the function `temporary-file-directory'
proposed above. It would call a file name handler, if BASE (or its
default value `default-directory') indicates this.
If you find it too confusing, that the function has the same name like
the existing variable, we could choose any other name.
Best regards, Michael.
- Remote temporary directory (was: bug#23076: 24.5; vc-git: add a new variable for log output coding system), Michael Albinus, 2016/07/27
- Re: Remote temporary directory, Nikolay Kudryavtsev, 2016/07/27
- Re: Remote temporary directory (was: bug#23076: 24.5; vc-git: add a new variable for log output coding system), Eli Zaretskii, 2016/07/27
- Re: Remote temporary directory,
Michael Albinus <=
- Re: Remote temporary directory, Eli Zaretskii, 2016/07/27
- Re: Remote temporary directory, Michael Albinus, 2016/07/27
- Re: Remote temporary directory, Michael Albinus, 2016/07/29
- Re: Remote temporary directory, Stefan Monnier, 2016/07/29
- Re: Remote temporary directory, Michael Albinus, 2016/07/31
- Re: Remote temporary directory, Stefan Monnier, 2016/07/31
- Re: Remote temporary directory, Michael Albinus, 2016/07/31
- Re: Remote temporary directory, Eli Zaretskii, 2016/07/30