From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: nikolay.kudryavtsev@gmail.com, emacs-devel@gnu.org
Subject: Re: Remote temporary directory
Date: Wed, 27 Jul 2016 20:14:26 +0200 [thread overview]
Message-ID: <87a8h3x81p.fsf@gmx.de> (raw)
In-Reply-To: <83a8h3rnib.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 27 Jul 2016 20:37:00 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
> Yes, but temporary-file-directory just returns the directory, you
> still need to create the file itself. And due to remote
> communications, the window between these two events can be quite
> large, so we can be a victim of a race condition with probability that
> is too high.
>
> That is why I thought that maybe a single function that actually
> creates the file and returns its name could be better.
I see. Yes, it makes sense. But we shouldn't extend just
`make-temp-file' with a file name handler; often it is mandatory to get
a local temporary file, even if `default-directory' is remote. Another
function, with the same footprint as `make-temp-file', would be
useful. A pair like we have already for `call-process'/`process-file',
for example.
`make-remote-temp-file' comes to mind, but this would imply that the
result resides on a remote host. It should still behave like
`make-temp-file' when `default-directory' is local, and even in case it
calls a file name handler, that handler must not support remote files.
Maybe you have a better name.
A `temporary-file-directory' function might still be useful, for example
when you call a remote process, and you want it to pass as argument, or
make it the default remote directory while running the process.
Best regards, Michael.
next prev parent reply other threads:[~2016-07-27 18:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <acdfa136-1d37-a920-b572-fdd0f6e11257@gmail.com>
[not found] ` <837fch1vmw.fsf@gnu.org>
[not found] ` <8536522f-fa3f-9fe0-63c0-262b8191b4a3@gmail.com>
[not found] ` <83h9bdttxi.fsf@gnu.org>
[not found] ` <87lh0ons06.fsf@gmx.de>
[not found] ` <83r3afst6v.fsf@gnu.org>
2016-07-27 9:57 ` Remote temporary directory (was: bug#23076: 24.5; vc-git: add a new variable for log output coding system) Michael Albinus
2016-07-27 11:42 ` Remote temporary directory Nikolay Kudryavtsev
2016-07-27 12:27 ` Michael Albinus
2016-07-27 16:09 ` Remote temporary directory (was: bug#23076: 24.5; vc-git: add a new variable for log output coding system) Eli Zaretskii
2016-07-27 16:56 ` Remote temporary directory Michael Albinus
2016-07-27 17:37 ` Eli Zaretskii
2016-07-27 18:14 ` Michael Albinus [this message]
2016-07-29 20:15 ` Michael Albinus
2016-07-29 21:02 ` Stefan Monnier
2016-07-31 11:26 ` Michael Albinus
2016-07-31 14:19 ` Stefan Monnier
2016-07-31 14:45 ` Michael Albinus
2016-07-30 6:58 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8h3x81p.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=nikolay.kudryavtsev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).