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 17:01:29 +0100 Message-ID: <87wolldxuu.fsf@gmx.de> References: <87pnrde2rm.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="166431"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 27 17:04:46 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 1gz1hL-000h7v-SJ for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2019 17:04:44 +0100 Original-Received: from localhost ([127.0.0.1]:46581 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gz1hK-0004XE-Ru for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2019 11:04:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gz1g3-0004Gw-FJ for emacs-devel@gnu.org; Wed, 27 Feb 2019 11:03:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gz1fv-0007G3-1R for emacs-devel@gnu.org; Wed, 27 Feb 2019 11:03:21 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:47783) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gz1fs-0006Wp-PE for emacs-devel@gnu.org; Wed, 27 Feb 2019 11:03:13 -0500 Original-Received: from detlef.gmx.de ([213.220.147.65]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MRSeC-1garzu12QS-00Se3J for ; Wed, 27 Feb 2019 17:01:30 +0100 In-Reply-To: (Robert Pluim's message of "Wed, 27 Feb 2019 16:43:29 +0100") X-Provags-ID: V03:K1:/zgcoaAiOy7htYRXNrlhBs9WpJvPlvs26iz422xmMPblu42iijj GEmagsV5KlqC8lbgYqWrnC0KgU71EXqDEoJUnrvCpnfqSB57t6lchBY4lmei8hEkrwEwQ8c hAhyMAdJ1X3fcwf5anXIrZi7SlIkEBvopT2Ib3fQ52Mpk9Y1JjYAhVfmRg+uBZr/nasy39S 3vK1v5MfliktsMlsUvkWA== X-UI-Out-Filterresults: notjunk:1;V03:K0:pNaaTrESnyc=:XoTXL9YQF9VfkIDBwi0T4g /2vGCZ6aWijqRniApTI+g6Rx2+cVVatQU93KppWwMXuVI07k31dITGsVdy7bOA0Wny3H2Q/sd rCbKsSorkf9NeaqoGJzoPfhqulzL/i646y009LYALxyxLFnxgJ4JTdv0b5klcZ0o6xTPUJtGh 6qFW0t+c2V6IB6ZRelosB0fAokoEz4ejBjHG55fgYfyvGZ9nPgxlnIhhGjQqHRAYrVKsUmRgE VHVrmXxsfwcKOf7+CeEY88hFm/10ryWF0uMXd5+h6FBmapxZJWya6zoDL7rCQ1/+4yN2PaEjL 3ms3LkyPr0TbPdnUitDzWFIWGHnQ4vMhG0NFRLmuOUpQjQVa79hPXJBk0u9o4vszpwkf2oqn9 ZrOvzTTj1kBkgcGalfcjZrT85RXYKTz+B77o9A/Ov1FnUSE7Dv9R6UXe6B5o6og+prixK1jbR XeuZZyAeT3D6Cm0tFGXf4WxWJkm2thp9us3yx+PbUiYS4MCTVAHyqzx5F00/4K7dqsu+9I53T uF5lsnWGPD9BrYTrJXrYrLLUtmelamiDULbfj3sh0piK9oCVzaFhfzRPJ8PbebK8YcSIj+P4L e/XRBO4Db7yqZMzSl1nZTaazxgxz+axeoP9m4KimqqdobkprwdF3XrG+Kk3BtnoWsVkugL5a4 gSr/W7gRImqlZBfsaJ2cyMuE2ZlUrHs4IMyxezc6XRpFjc7NPFBhT5qCR7KulCRBwmjWlX5fO erLS/vnMAJwCWt83Oods6mdzE2y8IjEHrfyyz2VaK9iLLaJiyl/R70DmnnxVF48tTigRRHCV X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 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:233653 Archived-At: Robert Pluim writes: >> I believe the current behavior is correct. file-exists-p calls >> expand-file-name, and (expand-file-name "") returns always >> default-directory. > > That=CA=BCs not described in the doc-string though, so it=CA=BCs surprisi= ng > behaviour. Agreed, shall be documented at least. But I'm pretty sure there's code in the wild which depends on this behavior. Maybe not explicitly, but via calling file-exists-p with an empty string, which has been computed som= ehow. I would expect this for example for Tramp. Do we want to change such basic behavior? Btw, several other basic file name operations behave similar. Try (file-attributes "") or (file-readable-p "") or (file-directory-p "") . > Robert Best regards, Michael.