help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does (file-exists-p "") return t?


From: Eli Zaretskii
Subject: Re: Why does (file-exists-p "") return t?
Date: Thu, 09 Feb 2023 15:36:21 +0200

> From: Edgar Vincent <e-v@posteo.net>
> Cc: help-gnu-emacs@gnu.org
> Date: Thu, 09 Feb 2023 11:10:07 +0000
> 
> Gregory Heytings <gregory@heytings.org> 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"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]