From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Remote temporary directory Date: Wed, 27 Jul 2016 18:56:07 +0200 Message-ID: <87fuqvxbo8.fsf@gmx.de> References: <837fch1vmw.fsf@gnu.org> <8536522f-fa3f-9fe0-63c0-262b8191b4a3@gmail.com> <83h9bdttxi.fsf@gnu.org> <87lh0ons06.fsf@gmx.de> <83r3afst6v.fsf@gnu.org> <87k2g7pfmx.fsf_-_@gmx.de> <83lh0nrrjs.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1469639112 3678 80.91.229.3 (27 Jul 2016 17:05:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2016 17:05:12 +0000 (UTC) Cc: nikolay.kudryavtsev@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 27 19:05:04 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bSSGU-0004dc-Oy for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2016 19:05:02 +0200 Original-Received: from localhost ([::1]:47792 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSSGU-0003xJ-3d for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2016 13:05:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSS81-0006aj-9w for emacs-devel@gnu.org; Wed, 27 Jul 2016 12:56:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSS7w-0004re-Be for emacs-devel@gnu.org; Wed, 27 Jul 2016 12:56:16 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:62195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSS7w-0004rJ-1j; Wed, 27 Jul 2016 12:56:12 -0400 Original-Received: from detlef.gmx.de ([87.146.52.120]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0M9wrU-1bZ1gv2Lai-00B61H; Wed, 27 Jul 2016 18:56:09 +0200 In-Reply-To: <83lh0nrrjs.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 27 Jul 2016 19:09:43 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-Provags-ID: V03:K0:XixZY0MRQ65ZIai4zi4ZSCT5XKYfK5VubZE7MlgebIxhMHTYcps D530ztViTvPwzVXw1WPhEvAadGdmqPGhRr+oqIZFh+fqqi2pGPFfojgPEu9kM71XEQxtmZ3 rK41QhXLWZ0Ywzbl0sOiX00RnoFWonCj2M6sNipxUHnInH7/c6gE7yM6ic3kCXUqPh+jBor 71l3lVoWL3+EL7hhlHPcg== X-UI-Out-Filterresults: notjunk:1;V01:K0://RpL2jhRYY=:JkYn67h33CZNB72QakxpUB WoV5GU5ykauwAJBIMYj3l8Gt1Cr+z95Hm6iUL6UloE3VsdRpfRZ+wSXPhu/hzUocO8dSgYM6M 38PFckX1THkQZqojhTjKrInVctTv6/WQgK7LLapND0BC5kMSnCDunLJleeQkVJg8pLjetzd+u F7vsp1mnuWo8ACIUgElgcv/gDtBVnbLku+rnLSYUp13G+vMYGDb7CqaztcTeU3Yxut7xdkhZi +LoqSCkEB/8bjSoZJ6H8ukyRc1bnee9o4vG5m/9EiVazBzn2r2kTthKbh6Ywe7IaqCLYO4g0O iaDg12QfVitwqpZqnNGLxMEkZwx+d9c6J6UFZMnw5aZ5CcGq6LFEmb/IlmxmZPRSF6kDNb0d7 b0cBUk0X+0dvacUDSo1ZT+JGGsJdD2Iky4xx9eQql3BOBLRDI2WV93aCsCxhlWL3LzypS1IN7 ZitEOmsJewN0jRhfZBqKee/nuGeImhYBBZMWbuqbdvtns1ycQ5mXkvGjBlgv8B4yPcLBxI+jm ZAUBehqfsBVjJ6DgGwrH1G8J3q+qsF6VE3BaXl4PJci8itSwsFBzUOfvuPDELD2l8q/P/T491 j7tXFK3eoXk7xNJRYdtxsWDv2MJDABXCidF6JvzS9CeKg9ykmE9h3C4Us4X0ja1jOToqiPyK2 hOai6IAS37tJJlvckA2YEI4TkySDhbAClrXCZmfp4bN6fHEjNXoxqaW6IbjL+OXZNOs56CszZ J8qu8n5aLhF385W0jWQ6q05cXyuuLc+M0FRad7F7bz+ZOhIn2lsPY6fTskMf/T0c8bqOm3KX X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:206187 Archived-At: Eli Zaretskii 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.