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: Why does (file-exists-p "") return t? Date: Thu, 09 Feb 2023 15:36:21 +0200 Message-ID: <834jrvm04q.fsf@gnu.org> References: <87zg9n15f1.fsf@posteo.net> <87y1p713ln.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1368"; 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 Feb 09 14:37:09 2023 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 1pQ76q-000AeZ-2b for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 09 Feb 2023 14:37:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQ76H-000148-U8; Thu, 09 Feb 2023 08:36:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ76F-00013e-Cj for help-gnu-emacs@gnu.org; Thu, 09 Feb 2023 08:36:32 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ76F-0002lc-4s for help-gnu-emacs@gnu.org; Thu, 09 Feb 2023 08:36:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=nKkBAmXQp6PKlyb2tUHxza84ZUIV/fX0Y6tbMBurPp8=; b=VOe9BJ8bmXMTK7OqbiZ4 eSHyf+5BTkEvzcJPOL37eeVmO/Rp+Dx/aLn6GpeoDfJBADWml1uckrWPIN1q3NGb6NCSjhrrPBC6V Av/mlcc1u3KrmKT4DzJFFbJ5rHd4uM40YOZb0atYwDJ4yJIdNyktD7ujuFAaAxZSq9Kvx3XfL+Nlt bIPezYdFE5MPZUmHOoPx9quhieQjvi006ubsps3/DR6sEkG5uVDgAiuJddjZfOKnrO2ly/w5/3C1K 4CR0PYUhnOxyochIMzb+4Xwgb1TwrtPv3iLaUsRIDlgAqFSHLEgeo5LpEgU/mcpWRix9vIYKoh6bc /GZedczjf8ik5w==; Original-Received: from [87.69.77.57] (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 1pQ76E-0003CG-Pg for help-gnu-emacs@gnu.org; Thu, 09 Feb 2023 08:36:30 -0500 In-Reply-To: <87y1p713ln.fsf@posteo.net> (message from Edgar Vincent on Thu, 09 Feb 2023 11:10:07 +0000) 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142675 Archived-At: > From: Edgar Vincent > Cc: help-gnu-emacs@gnu.org > Date: Thu, 09 Feb 2023 11:10:07 +0000 > > Gregory Heytings writes: > > > (let ((default-directory “/nonexistent”)) (file-exists-p “”)) > > > > returns nil. > > Thank you very much for your reply. This makes sense - and I’m sure it is mentioned somewhere > in the documentation. It is: Expanding ‘.’ or the empty string returns the default directory: (expand-file-name "." "/usr/spool/") ⇒ "/usr/spool" (expand-file-name "" "/usr/spool/") ⇒ "/usr/spool"