From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: lg.zevlg@gmail.com Newsgroups: gmane.emacs.devel Subject: Re: file-exists-p on empty string Date: Wed, 27 Feb 2019 22:40:41 +0300 Message-ID: <636956CB-1279-4EFC-BF5C-92CD7C40CAA3@gmail.com> References: <87pnrde2rm.fsf@gmx.de> Mime-Version: 1.0 (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="65447"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Michael Albinus , emacs-devel To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 27 20:45:12 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 1gz58h-000Gu2-Bi for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2019 20:45:11 +0100 Original-Received: from localhost ([127.0.0.1]:49765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gz58g-0007FJ-9r for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2019 14:45:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gz581-0007F9-9B for emacs-devel@gnu.org; Wed, 27 Feb 2019 14:44:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gz57n-0002cV-LT for emacs-devel@gnu.org; Wed, 27 Feb 2019 14:44:22 -0500 Original-Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:46971) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gz57i-00008H-Rw for emacs-devel@gnu.org; Wed, 27 Feb 2019 14:44:15 -0500 Original-Received: by mail-lj1-x231.google.com with SMTP id v16so14929825ljg.13 for ; Wed, 27 Feb 2019 11:40:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=yQjZAxTGdmgtzGrqWHrN/ASlp52fauiY238Rk3MEJ64=; b=On5teIZcLudaykaHZ3wCwfyIo40fYyufYZVcc181m/b2PBRSPdMxahDCn2bjFcDvmi lmYZhFoUvRswI0lT6tYkziN83X0LR0ulAfD+jR3ESr21UNv6LWa5/E71V9EE6vGLJ5g7 Oexq8etiWKWCi0uTJRNiOmzqgRVwx+BkTxUoYHurguu47ecpXKCVcOziSI1eDLiPd9rN ETl/lXe9A6Qb1X7F+PF199+BZ6iVTMnsoSEGrcLBtQ661l0bpqlqAbRAdYqd2UqMrF4g yr9GKLqN2xGryDnUKwCOIzl+Cj4oNFGx2CShLiuRgS1OHTx5O9w+Zgy1aEr29nXvvLYb Plxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=yQjZAxTGdmgtzGrqWHrN/ASlp52fauiY238Rk3MEJ64=; b=PhEgeST7o/a7N+X+tVpBBHig3UprYX/frBRx5qSdb5ma0/jmjU0XG35Tswg71h81i4 1MOTPGpKwt7/SaEPUV7Q2lY1zMIH832XnezZPzTUFQe0V9nUUZIvXZMx7WP4Aqb79n2F c1wJqpAs19BsxAPqqU4X64ZsXVbRG+Q3jH/gXeidR7nILS2Yn9j2KvgpFbBCpPSLEv2V 2FSfvTlmPTS66KrQdq6VVYgHEnkmd7iUDe3ED/k0acNvkc92k/P+i0idwW7KX9EUcclJ Eg2Sq2Z66zs7rK0W5SFfv7mciAtY5J2r27elmhVvRKLoL+7t17q7Bb5iClSvU2T9u+Cs kG5A== X-Gm-Message-State: APjAAAU750+X9vzNI8gbH7dbSWhlNWtiq480v8+3VlDUoIslOyn5wxer 2dsgS5LCvsVEVuKxSNX18H8= X-Google-Smtp-Source: APXvYqw9XvspBcbGbenV/43m0CfXJExMpmw+g2Vra2JzVm7vfNQgIjNCgCOSA5k1JXeaz2DRQnRyqg== X-Received: by 2002:a2e:a28f:: with SMTP id k15mr2474668lja.160.1551296442976; Wed, 27 Feb 2019 11:40:42 -0800 (PST) Original-Received: from [100.67.164.232] ([31.173.81.184]) by smtp.gmail.com with ESMTPSA id 2sm3687907ljh.41.2019.02.27.11.40.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Feb 2019 11:40:41 -0800 (PST) X-Mailer: iPad Mail (16A404) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::231 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:233674 Archived-At: > 27 =D1=84=D0=B5=D0=B2=D1=80. 2019 =D0=B3., =D0=B2 18:43, Robert Pluim =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0): >=20 > Michael Albinus writes: >=20 >> Evgeny Zajcev writes: >>=20 >> Hi Evgeny, >>=20 >>> It was quite surprising for me that >>>=20 >>> (file-exists-p "") >>> =3D=3D> t >>>=20 >>> I thought that `file-exists-p` resembles stat, such as >>>=20 >>> $ stat "" >>> No such file or directory >>>=20 >>> This is because `file-exists-p` uses `expand-file-name`, which returns >>> current directory for empty string >>>=20 >>> Would not it be more correct for `file-exists-p` to return `nil` for >>> empty string, and if someone wants current directory he will use "." >>> as filename? >>=20 >> I believe the current behavior is correct. file-exists-p calls >> expand-file-name, and (expand-file-name "") returns always >> default-directory. >=20 > That=CA=BCs not described in the doc-string though, so it=CA=BCs surprisin= g > behaviour. >=20 Yeah, exactly, I=E2=80=99m ok with the current behaviour if it was described= in doc-string! =E2=80=94 lg=