From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: file-exists-p on empty string Date: Wed, 27 Feb 2019 15:15:25 +0100 Message-ID: <87pnrde2rm.fsf@gmx.de> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="65626"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel To: Evgeny Zajcev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 27 15:41:00 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gz0OJ-000Gwf-Vj for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2019 15:41:00 +0100 Original-Received: from localhost ([127.0.0.1]:45099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gz0OI-00084v-Qd for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2019 09:40:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gz0Fn-0000Ms-1D for emacs-devel@gnu.org; Wed, 27 Feb 2019 09:32:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyzzg-0000DH-QC for emacs-devel@gnu.org; Wed, 27 Feb 2019 09:15:34 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:35883) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gyzze-0008Qn-Si for emacs-devel@gnu.org; Wed, 27 Feb 2019 09:15:32 -0500 Original-Received: from detlef.gmx.de ([213.220.147.65]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MWkep-1gWCQ93ZOt-00XvU4; Wed, 27 Feb 2019 15:15:26 +0100 In-Reply-To: (Evgeny Zajcev's message of "Wed, 27 Feb 2019 15:29:53 +0300") X-Provags-ID: V03:K1:vPSsJKfbI8nfVyM6DvppeDPV6uC//XO5l1qPPn7oUfvliJDcpT9 WkbH9/rEvF6OoqUICsISZutUmRMoSF3SSaO6SZ2cSGm9c9qSf1Da3BjVsmvftseGQIq5yVt dbNRmDRLMfPoFrw4eHFt5H5iZ+RnOKLBRHmbF4ZkTjis7CHXctbR8ixDONWzO5UTqsIQd1S BOYZuVqlkul+BQc21drww== X-UI-Out-Filterresults: notjunk:1;V03:K0:Bf2JRfQAKxY=:Niavk2srgCfXqoS4lRpBVs rN6Q3cSr7Vt37zuu1RehdMIscaTEbFYQStU+RnL650Uvr6YhHkP+oOfVZCmVneUO9YrHj0XRK 5lw1KGvdStlxaniabArvqz8ukvoRm1b5i5DXxbKH1bUC/DE9VV82buUi5eLT5qr9xLuqvfN5b tGu12wMsIixpJfMZsEymxbg1MLk60CSm/OQdEdQlMz4OjvdeITzB1cpLr7Ip0UzGap83BHiN8 WBoexTPBebmzWkHpKH1JcxmD/iocUew2YFXnNY7fULLgdQiCXu/mu6Ddo1Iri7AeGEh6ZriuL 5xBvKftqmR+4TSSYmFq5iSVvnZC1iJWcBiXcr3QYo4l/yqiD5n7ylIE/f1c309CWyoGu5Tqg9 VEL2C0unCg2t7ueBhnOm87SAYEDsN4d3Z3rOSLldHg/SIeH6fgaZ929YtTmEAb1YKS13ypbKU +WJABXqldPDjn2WzITGOSwJlEgrsFJ14Rm4+sJ3dhz3s6AJz6BkgfOnpYvF//3lH7AZLW5vxg MIg/A20GiGNdMsLxgDU4cBp0juOaBQkRMsBwQMexoM4wnVMTTOt/IoZ8mJ7hrvqEJ1E3qwY/c SiRnFYrgbK10tOYqQRufDG6iTrrOtoUtL4ty9FaHJlFghoZjF48lN+sYKqLFj3qwLj3cq2r79 kpQ+riHf1SPbi8TWECkKgsQp7EoS/WYnqdQwt9jYDSXuC7+KV9eH/mJJusln546Mb01+u19Ro wshlmxk1KunVmMuqZ71UTxau7f2j4u+D7gkHLw0rubrqbTrURHBhI203WAx7xcTyVfjIa9wd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.18 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:233647 Archived-At: Evgeny Zajcev writes: Hi Evgeny, > It was quite surprising for me that > > (file-exists-p "") > ==> t > > I thought that `file-exists-p` resembles stat, such as > > $ stat "" > No such file or directory > > This is because `file-exists-p` uses `expand-file-name`, which returns > current directory for empty string > > Would not it be more correct for `file-exists-p` to return `nil` for > empty string, and if someone wants current directory he will use "." > as filename? I believe the current behavior is correct. file-exists-p calls expand-file-name, and (expand-file-name "") returns always default-directory. > Thanks Best regards, Michael.