[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"
- Why does (file-exists-p "") return t?, Edgar Vincent, 2023/02/09
- Re: Why does (file-exists-p "") return t?, Gregory Heytings, 2023/02/09
- Re: Why does (file-exists-p "") return t?, Edgar Vincent, 2023/02/09
- Re: Why does (file-exists-p "") return t?,
Eli Zaretskii <=
- Re: Why does (file-exists-p "") return t?, Edgar Vincent, 2023/02/09
- Re: Why does (file-exists-p "") return t?, Jean Louis, 2023/02/11
- Re: Why does (file-exists-p "") return t?, Bruno Barbier, 2023/02/11
- Re: Why does (file-exists-p "") return t?, Jean Louis, 2023/02/11
- Re: Why does (file-exists-p "") return t?, Bruno Barbier, 2023/02/11
- Re: Why does (file-exists-p "") return t?, Eli Zaretskii, 2023/02/11