From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Barbier Newsgroups: gmane.emacs.help Subject: Re: Why does (file-exists-p "") return t? Date: Sat, 11 Feb 2023 11:10:03 +0100 Message-ID: <63e7697c.1c0a0220.a6be.a36d@mx.google.com> References: <834jrvm04q.fsf@gnu.org> <87wn4q1r6w.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="23665"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eliz@gnu.org, help-gnu-emacs@gnu.org To: Jean Louis , Edgar Vincent Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 11 11:11:12 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 1pQmqe-0005y5-RH for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 11 Feb 2023 11:11:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQmps-0005h3-Ej; Sat, 11 Feb 2023 05:10:26 -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 1pQmpe-0005VC-Ux for help-gnu-emacs@gnu.org; Sat, 11 Feb 2023 05:10:11 -0500 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQmpb-0000ZT-FU; Sat, 11 Feb 2023 05:10:10 -0500 Original-Received: by mail-wm1-x32d.google.com with SMTP id o36so5548841wms.1; Sat, 11 Feb 2023 02:10:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:date:references:in-reply-to :subject:cc:to:from:message-id:from:to:cc:subject:date:message-id :reply-to; bh=v3Yquw6Fb1r8XejfD83fOIVCapyWNP1NHbpgRKzce1s=; b=Nw50N1zzR0e3qQhtSeDwWC5cOaz4Pk8Zl9YPUushpDs4MseJsNitAl9yU7KntIk+ld L9oSMb2Omm8ETFgxTnO50Dl4sccx1m76IUiiWZI2HU6yGU4L3Ya6HH6jkHpJ4aWtHwOG 2ZcFlGAfcRNwXf/nLqRFyMykqk5TeIASIlCfOm7Vsmeb60gazlYvBFavOpT+lfSWffc1 UHLbLrjImvE0PigJOUE3Kj0mFlRmc+JIcm0fNkaeE39hqKB2ghUEFI5fERxjWaY2TuZe FPMU0UxGZHqsT9cz/8dP6uiDMwD5qHK9Ja6RVAiN8w94gufgqr3mAtCnywcVpZF9OkIe KkrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:date:references:in-reply-to :subject:cc:to:from:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=v3Yquw6Fb1r8XejfD83fOIVCapyWNP1NHbpgRKzce1s=; b=R6eb2WmKTmp/eoT4qz1iNm78cPVOsQLVNXUhBphicgBxpEo+wekb5PE0ZiDq0BXJnr VwUquSQlNxX2fO2rP17G7mAUXc7eRMuxRHiyB6/cw7f7dr+wVwoNvDo95X9IuLsDJmx6 QbpSX+Fp4awP2P7SUYRByfKJLJB6x2isL+tGKcpOgMLxfaNaUX1GZ96hegHBPbINVZ4W 4p3o7DKmKH0aGDjTSzLffqr5BqJoLDgMKKbtFNHqHACZCJWWN7h3DLOnh+GAAFvKwkjE mK7Fef4hn6GQ78Q8CZEpA+1m+fcjRs90pRJarnWQvECeY0PbKYQn74APNy4B9PvMIVxA 9Ytg== X-Gm-Message-State: AO0yUKWT4BNXWlDjrLDnr4P8SXLfu8kYPp5cRVqvHey4wc/G+hR+c5rq dkSYzIxIljCajPRkuqafYcHktaqklG0sOQ== X-Google-Smtp-Source: AK7set8pyp8oloq7hq1YBFevUhK+KZPYK8acXU/jr6U4aPsOdmDyRJc+f9QJlkJhz4Ojv3ZdzZeLbA== X-Received: by 2002:a05:600c:3093:b0:3dd:37a5:dc90 with SMTP id g19-20020a05600c309300b003dd37a5dc90mr14905462wmn.32.1676110205262; Sat, 11 Feb 2023 02:10:05 -0800 (PST) Original-Received: from keynux ([2a01:e0a:505:3460:169:7511:f49a:58eb]) by smtp.gmail.com with ESMTPSA id d5-20020a1c7305000000b003dc4baaedd3sm10347715wmb.37.2023.02.11.02.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Feb 2023 02:10:04 -0800 (PST) Original-Received: by keynux (sSMTP sendmail emulation); Sat, 11 Feb 2023 11:10:03 +0100 In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=brubar.cs@gmail.com; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:142699 Archived-At: Jean Louis writes: > * Edgar Vincent [2023-02-10 00:11]: >> I didn=E2=80=99t know that file-exists-p used expand-file-name, but it d= oes seem obvious. > > To avoid the problem maybe you should use `expand-file-name' before > you check it with `file-exists-p' > > As otherwise you may check the wrong path. Why ? One of the first thing `file-exists-p' is doing is to call `expand-file-name' to expand the file name. I don't see how calling `expand-file-name' before would help. Bruno