From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: nikolay.kudryavtsev@gmail.com, emacs-devel@gnu.org
Subject: Remote temporary directory (was: bug#23076: 24.5; vc-git: add a new variable for log output coding system)
Date: Wed, 27 Jul 2016 11:57:42 +0200 [thread overview]
Message-ID: <87k2g7pfmx.fsf_-_@gmx.de> (raw)
In-Reply-To: <83r3afst6v.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 27 Jul 2016 05:36:40 +0300")
[Moving the discussion to emacs-devel]
Eli Zaretskii <eliz@gnu.org> writes:
Hi Eli,
>> In general, it looks OK. Although I have reservations to use Tramp
>> internal functions outside the Tramp package. But there's no Tramp
>> equivalent to make-temp-file yet. Maybe we shall add such a function?
>
> Yes, I think we should.
Thinking about, a more general solution seems to be a function which
returns a temporary directory on a remote host. Something like this:
--8<---------------cut here---------------start------------->8---
(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'. And other use cases in `process-file' and
`start-file-process'.
WDYT?
Best regards, Michael.
next prev parent reply other threads:[~2016-07-27 9:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <acdfa136-1d37-a920-b572-fdd0f6e11257@gmail.com>
[not found] ` <837fch1vmw.fsf@gnu.org>
2016-07-25 18:46 ` bug#23076: 24.5; vc-git: add a new variable for log output coding system Nikolay Kudryavtsev
2016-07-25 19:10 ` Eli Zaretskii
2016-07-26 19:01 ` Michael Albinus
2016-07-27 2:36 ` Eli Zaretskii
2016-07-27 9:57 ` Michael Albinus [this message]
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
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
2016-08-07 12:08 ` bug#23076: 24.5; vc-git: add a new variable for log output coding system Michael Albinus
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k2g7pfmx.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.