From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Remote temporary directory Date: Wed, 27 Jul 2016 20:37:00 +0300 Message-ID: <83a8h3rnib.fsf@gnu.org> 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> <87fuqvxbo8.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1469641047 16478 80.91.229.3 (27 Jul 2016 17:37:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2016 17:37:27 +0000 (UTC) Cc: nikolay.kudryavtsev@gmail.com, emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 27 19:37:26 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 1bSSlp-0003FA-Li for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2016 19:37:25 +0200 Original-Received: from localhost ([::1]:47984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSSlo-0001AA-Rl for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2016 13:37:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSSlj-0001A5-IU for emacs-devel@gnu.org; Wed, 27 Jul 2016 13:37:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSSlf-0000l6-DT for emacs-devel@gnu.org; Wed, 27 Jul 2016 13:37:18 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSSlf-0000l2-AO; Wed, 27 Jul 2016 13:37:15 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3216 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bSSld-0006f2-4j; Wed, 27 Jul 2016 13:37:14 -0400 In-reply-to: <87fuqvxbo8.fsf@gmx.de> (message from Michael Albinus on Wed, 27 Jul 2016 18:56:07 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:206189 Archived-At: > From: Michael Albinus > Cc: nikolay.kudryavtsev@gmail.com, emacs-devel@gnu.org > Date: Wed, 27 Jul 2016 18:56:07 +0200 > > > 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. 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.