From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Edgar Vincent Newsgroups: gmane.emacs.help Subject: Re: Why does (file-exists-p "") return t? Date: Thu, 09 Feb 2023 11:10:07 +0000 Message-ID: <87y1p713ln.fsf@posteo.net> References: <87zg9n15f1.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20363"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Gregory Heytings Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 09 12:27:49 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 1pQ55g-00057j-UM for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 09 Feb 2023 12:27:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQ553-0008VP-CX; Thu, 09 Feb 2023 06:27:09 -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 1pQ551-0008Uq-Ar for help-gnu-emacs@gnu.org; Thu, 09 Feb 2023 06:27:07 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ54z-00028Y-FV for help-gnu-emacs@gnu.org; Thu, 09 Feb 2023 06:27:07 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id A551424035C for ; Thu, 9 Feb 2023 12:27:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1675942022; bh=+3uuEHt09NbUyOTn7d0/JYJ6gEICX9oKa5/gfrQ+bZs=; h=From:To:Cc:Subject:Date:From; b=MEuxMSTcYuo0lMKOd78Zp84zMC+bSQ4V6HHo06oydFlw11np3ld6xDvGlvZY5KRZY vgtwD9RLUfcnK1hdrKv9tS10ub3gDvuQ072k4mXXeWf/pvWVejJ2UBBIuRJY6idVx+ ntPvIEZdDqSnP9g7er9KkKgo68YLRVgZpNveHyPQKaaHfjN1M+3+G4qJDRNwpT5jTb B7Yqr/PbnsJfr6B2DsaDf9cJvqu+729Qkbsq9UTemW/hTXb3W60QIOm+4RYVAr2p4Z lKauN/vh/hre6HbPb1QkRDGN4qeRPDDnXTIvhprCpKr8CZW0KX449PcZEPTnUicsvx wNJlDERoy2i1Q== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PCF2F4Nb7z6trc; Thu, 9 Feb 2023 12:27:01 +0100 (CET) In-reply-to: Content-Disposition: inline Received-SPF: pass client-ip=185.67.36.65; envelope-from=e-v@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:142670 Archived-At: Gregory Heytings writes: > When the argument to file-exists-p is not an absolute file name, it is > understood as being relative to default-directory. Therefore with an emp= ty > string, file-exists-p checks whether default-directory exists, which is n= ormally > the case. But > > (let ((default-directory =E2=80=9C/nonexistent=E2=80=9D)) (file-exists-p = =E2=80=9C=E2=80=9D)) > > returns nil. Thank you very much for your reply. This makes sense - and I=E2=80=99m sure= it is mentioned somewhere in the documentation. Edgar Vincent