From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Function to know weither a dir is local or remote Date: Thu, 20 Oct 2022 19:16:08 +0300 Message-ID: <834jvyxygn.fsf@gnu.org> References: <825ygfngbw.fsf@gmail.com> <821qr2oqu2.fsf@gmail.com> <83k04uyiou.fsf@gnu.org> <82wn8un8h9.fsf@gmail.com> <83ilkeyel3.fsf@gnu.org> <82sfjimz8v.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28143"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 20 18:45:52 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1olYg4-00076F-AF for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 20 Oct 2022 18:45:52 +0200 Original-Received: from localhost ([::1]:40844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olYg0-0007di-GA for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 20 Oct 2022 12:45:48 -0400 Original-Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olYLO-0001Np-8j for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 20 Oct 2022 12:24:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olYDO-0001Bt-5e for help-gnu-emacs@gnu.org; Thu, 20 Oct 2022 12:16:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olYDN-0003bt-69 for help-gnu-emacs@gnu.org; Thu, 20 Oct 2022 12:16:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=EVoQ2GCeyNZBxv/fV23O66ckJ7dgYWReDB8J6UXCrjU=; b=UwRc13Qy7qzL EReGq5CBZ1XEeK0+cBdj3O21B3uYwvQ+N9lYeDtxq+wAzovtX6DOb3lQSHibi1DXcDJRQgqZfhXHq wfdLK5oKhxcpKDRQDYWhjV2SVWRc2E7+lUFeI1VAsgIecnfyQeadLIlLkZ+sLn9SGeCbJtmigw/Ut 34YzXmaKYF6I0gMaQJ/JOu75ODqbnPibdEsoZ1OzWpsihFJrwq/+9z/fUR2pF/hR+LSV08h/bznvD FNxDsgDmmhHME/Ej9SVOrZTGOVICx63ccoCX+89Shr+hzagYjOXOTReokY0GZzTTVlv/BY3p5DZn4 csNAGjqE4mng9iK5et2oNQ==; Original-Received: from [87.69.77.57] (port=1775 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olYDL-00080d-Ta for help-gnu-emacs@gnu.org; Thu, 20 Oct 2022 12:16:12 -0400 In-Reply-To: <82sfjimz8v.fsf@gmail.com> (message from Pascal Quesseveur on Thu, 20 Oct 2022 14:54:40 +0200) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:140198 Archived-At: > From: Pascal Quesseveur > Date: Thu, 20 Oct 2022 14:54:40 +0200 > > My problem is the following. In Org there is a function to create a > PDF from an org file. That function displays an error message when a > problem occured during PDF creation. To find out if a problem occured > during creation, that function compares the time at the beginning of > the processing and the last modification time of the PDF file. When > the later is behind the former, the function displays an error > message. The problem is when the directory of the PDF file is on a > server, server current time can be different from client current time, > and then the error can be wrongly displayed. This problem is not specific to MS-Windows, it is something that Org should handle on every system. So my first advice is to ask the Org developers how they propose to fix this problem. The reliance on synchronized time stamp sounds flaky to me. > One solution to correct the function can be to create a temporary file > in the same directory as the PDF file and compare the times using > creation time of the temporary file instead of local current time. So > I wanted to know if there exists a function that can check a path and > tells if its remote or local. We don't have such a function, no. You could perhaps approximate it by assuming that every UNC is a remote file.