From unknown Sat Jun 21 12:11:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56673: 26.3; Doc of `file-equal-p' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Jul 2022 20:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56673 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 56673@debbugs.gnu.org X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.16583497216103 (code B ref -1); Wed, 20 Jul 2022 20:43:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Jul 2022 20:42:01 +0000 Received: from localhost ([127.0.0.1]:36141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEGW9-0001aG-2D for submit@debbugs.gnu.org; Wed, 20 Jul 2022 16:42:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:36748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEGW3-0001a4-HV for submit@debbugs.gnu.org; Wed, 20 Jul 2022 16:41:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEGW2-00086V-TM for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2022 16:41:55 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:22208) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEGVz-0007hV-5q for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2022 16:41:54 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26KJViJN002272 for ; Wed, 20 Jul 2022 20:41:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=YsJ8cu+RE3IIet4bIys8r7Oe60wU6xmnfAfxdvoGFnU=; b=b41z57mLYeIvEjQJCJEsKmfE9SMJZOxV36B8R3W8KDSWmSoq8wSbSM1x9vi5hIR/DfRb LB6ma23hqUUF5nQQOk6+B5sD5oSqmsXZWUFCRr5i2AT+7q1VQk2yw+BN1X8Z5DpSs8Zq kOOf+s/uqmixHYrAhUMvHWnnMZ5mXuWrFqIsmKL7E3sGmPedv9GIlgjSvwPcT/3QhzbG Q+vrWU6AwzVmo5fYNnDnGgNgEcmyHTGlrZe7aWkhF6yLSRmXOpVjILVICjOjXZ5Hj8Yh yopBtj6Y8Cnf0uDJRRvsPO/XziS1ZOyjp1r25rO65C2ojcR0F8KvLgebb8l+kT868pnG ig== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3hbmxsar75-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 20 Jul 2022 20:41:48 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 26KJW0U6022295 for ; Wed, 20 Jul 2022 20:41:48 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3hc1ht50xv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 20 Jul 2022 20:41:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eGn8vwyj8rCQFkvx19LijBwD7qKmi8ppkMjpJI8BbOyDyub3PGZMD/T4AB1guxkfd4zVf1Gr0D0IGmZ4zDJCZskl+uCb25q/lHKdVPGIIAm5eDuWDqkFhNzHayuxlTqKfCYMvR6u52LmBfa/98Q1JBK7fhSAzNUSxdRf6x+wQH2KuDmmYU/NVtEAGm5OP7d8c2d4ACVoJjoXubEjWOV612x1KvppE36lAYBb+I6WVBEZE5RbcvZn9DyHpryGdkaH/O2NfN6qQLp69aKZuz03plZin12StLiL2mIFGCzenMvQ5XiKMWTRlhO+/vE7vAG1f+bCFVuyvNxo7h4ywN1IBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YsJ8cu+RE3IIet4bIys8r7Oe60wU6xmnfAfxdvoGFnU=; b=iUOLQkNcFtzNg4y5Ui4tZlCxhFMorAjVIq/fHqTSVREMG5WpIfw52xlTOyGDEAe83FLdB1Whc7Ro4qH1EV0im+ViSx+Em7h6rA7B2wSA9qlsKFIwiwi6529Ezbafc0TUdqCM9qQuraz17p7TKdybQap4M/uDF6hdFUFjKxOA9gJFnogCyTcJAaGmbM4XeLpdsa7FFSMuc5hqHZzG45aJrhbfiwcugX2N8of4Xph+giZk2ZyrdBrT3MZUKJITyEnlewuWn+d4xvQPyrImvl0ZIdp1xfsyG87JpZ7klQwKnlC1XmQhlXWUqr7aYwH9HIBxLIz8Ruq/ivhlp1tFl+oWww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YsJ8cu+RE3IIet4bIys8r7Oe60wU6xmnfAfxdvoGFnU=; b=Gip4JF7u1dQzQw8w1mWk8RFDrknvzpAl568V/7B+XyuvRysETn3s+oB4crIzkGCoX0hS3z1kdJbRyqtrXpohKiif0GLVedWbeNsVf08rsye0k5WkqNudsk8/BFzj5HFjIZFcoJhQmOsL16VCYKLDdO90hbmLaqpKBHB7PMfo6To= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by MN2PR10MB3311.namprd10.prod.outlook.com (2603:10b6:208:121::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18; Wed, 20 Jul 2022 20:41:46 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb%7]) with mapi id 15.20.5458.018; Wed, 20 Jul 2022 20:41:46 +0000 From: Drew Adams Thread-Topic: 26.3; Doc of `file-equal-p' Thread-Index: AdiceRSs/yPvbZSkQsOdM8R1vk8/wA== Date: Wed, 20 Jul 2022 20:41:45 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e2c247ce-bae3-4a5b-4b32-08da6a90432e x-ms-traffictypediagnostic: MN2PR10MB3311:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: U5Sz6bkXFnar0/HQrFXSJ8EwzjFHB4Sb+KEUpZhMNjJcEH66HLAmYqwBDbY/5WzPvQoYa1vPHjjp4hv0SJTPvOPHxFYC8pC/4CchrMbFIxZsuNJJnplN2gk2/0F59l8kKSoHnIGbie0eDxtLmgkb/yePqxBMouk5UdUtgBEsA1CRLf+RuVGZ97KD7W2SmUGbqQ0qtfAavPfpeb3i9jb5dbLlUdwPfA/RwAK5osT1egYbDGFnKo1SvAYRmr/wZE+5zj4rdg1eX4GY22el9VUME+esch3x+HCyHnDXQYpsIiV9pPecz2dAk62zMnfrnbK2+3gEro2eAFl8Z5fqWYkQIDa+O4+yhfAnsTXAgBUxDY/PETgoPe1OMjQWHwqv+8AfgrCEFlgHd39VIMTHImk43cOMcRETMKu1YBKIH7o51iDJAGtNbc5BJpJoHxXi6Kr5VCBPkqeqXlObPBTwQ3zKnL1r4ulfIsksrTexcuzEzcweQabx83BNzBlKZ+cuhHFNVdPCUslHWMqfFXTV0sYm7yPVGClWUCEK+fagecFgyasig4PJyHRK6RdDb88dy99Fhj/kiKRXEcitlEuxqi0nBg6sMIHxe6Ot5n/H989uzKkvJxLfk+wqXH59avudviA8ZewKVs7rxiDkAEnVI2/KZ7SakpebBhp6uOtt5rXRXi3qbuI/IJ3yKbDsM+vFBjyXD0b5b+qGmyxlxgs02xwsCqQwuHCC4EE8eJLw280KpO/Wqy41D3z8SJqKQ0t386DDIUoA/BtEfmux01y7D7j+WCNJkpCKBiHU7jwP5TMWkKxvRe9EjTzBGcq7xZwHocuXIrULbD8L4R1ypj7bDX1OUA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(136003)(396003)(39860400002)(376002)(346002)(64756008)(9686003)(26005)(6916009)(76116006)(66446008)(316002)(71200400001)(66556008)(8676002)(66946007)(86362001)(186003)(66476007)(44832011)(2906002)(33656002)(41300700001)(55016003)(122000001)(8936002)(52536014)(38070700005)(45080400002)(38100700002)(6506007)(7696005)(478600001)(5660300002)(81973001); DIR:OUT;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c1mJJHaAwdD025k+HHbcimeiD+4gCj5qYjYGh+JbCPetua1zCVtFYOu8XmTcmYcTNunRGzJdotkjLWjPiHQepnRfjhHIOzEQRtWRs4KRhsp3pDZ1Iayci36c/tOAdZEcviOCfZtRxprNgZYB3u4RwANEoKdzdrVUf9m10wFwN6GtM0NgiSZbkfDm7T96+b2FSdmI/dmMKjQdmZIshXNWe+vS/qNRUbJmj3y2XjHHh2BJF/GYWUT7oXoQt539bPeA3gq7mmvGIqdbZ319E+fLXkrxkEheQcrBDfuXA7WpcXXmISX0shLuWceIdBYWigYpfaO/M4HBWnuo1cG0kfxckXkVLptOcoD3ISB4f/zG0x/MyHdDozS53iEgLbm8bW8jqTEhjwbFDdLEDCHExyWTE+rP3BFKKKq88i9+HVdhvXoNfETUwIfahJmRf4ot4C6OLNMhXT/BJ+KyQp7+Ek37op9db95bYiqUaoorMN6Hwb2/p9C2eBKj1tn+FDHWKzRJoOP1ibsePbI+METdMo44NgtJhGAVuHK4pgolWKQdeyZNrggnHjyktMfCSsjvfWLdO0bmtP8oqz6W9y2b Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2c247ce-bae3-4a5b-4b32-08da6a90432e X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2022 20:41:46.0820 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: TFcNO6kaChWPZBFDx7BCovaTixcj6W8Q+D5sjjnkbnqa/D+dK6UZCoSfso10hvJIiYcoGe456x2v5ybLBbPqvA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB3311 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-20_12,2022-07-20_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 malwarescore=0 mlxscore=0 phishscore=0 mlxlogscore=565 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2207200083 X-Proofpoint-GUID: 1rJobpxYhZ4rYt-ZWSINhhk9nGrL9a3w X-Proofpoint-ORIG-GUID: 1rJobpxYhZ4rYt-ZWSINhhk9nGrL9a3w Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 1. I don't understand this part of the doc (in both doc string and manual): If FILE1 or FILE2 does not exist, the return value is unspecified. What's that about? Looking at the code, it looks like if either doesn't exist then its own part in the test is just nil. OK, if there's a file handler then that case could be unspecified. But if there's a file handler then the result could always be unspecified, no? (The handler doc, if there is one, presumably would "specify" what its handling of `file-equal-p' does/means, however.) Is that caveat only about the case where there's a file handler involved? If so, it would be more helpful to just say so. But if there's no file handler, how can evaluating this give something unspecified? (let (f1-attr f2-attr) (and (setq f1-attr (file-attributes (file-truename file1))) (setq f2-attr (file-attributes (file-truename file2))) (equal f1-attr f2-attr))) `file-attributes' just returns nil if the file can't be opened. In what case(s) is the result unspecified because one or both file doesn't exist? 2. How about adding this sentence from the manual to the doc string (also)? This is similar to comparing their truenames, except that remote file names are also handled in an appropriate manner. In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd Windowing system distributor `Microsoft Corp.', version 10.0.19044 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3'' From unknown Sat Jun 21 12:11:42 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Drew Adams Subject: bug#56673: closed (Re: bug#56673: 26.3; Doc of `file-equal-p') Message-ID: References: <83o7xjngzc.fsf@gnu.org> X-Gnu-PR-Message: they-closed 56673 X-Gnu-PR-Package: emacs Reply-To: 56673@debbugs.gnu.org Date: Thu, 21 Jul 2022 06:00:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1658383202-17143-1" This is a multi-part message in MIME format... ------------=_1658383202-17143-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #56673: 26.3; Doc of `file-equal-p' which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 56673@debbugs.gnu.org. --=20 56673: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D56673 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1658383202-17143-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 56673-done) by debbugs.gnu.org; 21 Jul 2022 05:59:55 +0000 Received: from localhost ([127.0.0.1]:36490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEPE3-0004Ro-19 for submit@debbugs.gnu.org; Thu, 21 Jul 2022 01:59:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEPE0-0004RZ-5s for 56673-done@debbugs.gnu.org; Thu, 21 Jul 2022 01:59:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46506) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEPDs-0000hC-60; Thu, 21 Jul 2022 01:59:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KEVqJB3U2Xyl+CseGsmNYopfixtOhdhUMXYtE36xhn0=; b=iNbBEDF/WXdY 9UvApmukiETuIYWvsd5JU9Y4qEyKMyZJ71Ra1q//4D9Vfnji1Y3OMoYhtxSGb0Scb+nna/i0rtxjy /BV6IL/2dzGBfSW1BFp1p3xfX4gu1oc8D0UJSJZbQ7GD/H8PxQbsedrCTRSsLlrhzerE0SRzC9Zs/ iSy9fEdGII8SNA2N+D1ThLSBv75Izxcnil/B4gOS0syhpWuVBJtqXxixgLr9LyGalRp5DtpPZk7yW EForkyu/VJjnKOBXE3OvFIV5JDAPI8VBsSFXGKlvHm1UxX3CcHrgd8vWcw9cWSTJXJkVFRWDCYrA7 1AQiD1T2lMA2LR6UHPA+GQ==; Received: from [87.69.77.57] (port=2161 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEPDr-0005dy-ER; Thu, 21 Jul 2022 01:59:43 -0400 Date: Thu, 21 Jul 2022 08:59:35 +0300 Message-Id: <83o7xjngzc.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-Reply-To: (message from Drew Adams on Wed, 20 Jul 2022 20:41:45 +0000) Subject: Re: bug#56673: 26.3; Doc of `file-equal-p' References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56673-done Cc: 56673-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Drew Adams > Date: Wed, 20 Jul 2022 20:41:45 +0000 > > 1. I don't understand this part of the doc (in both doc string and > manual): > > If FILE1 or FILE2 does not exist, the return value is unspecified. > > What's that about? It means the result could be anything: nil or non-nil, and you shouldn't expect anything specific. IOW, don't call this function unless both files exist. > In what case(s) is the result unspecified because one or both file > doesn't exist? All of them. There was a long discussion of this in bug#10489, and I'm not interested in reopening it. > 2. How about adding this sentence from the manual to the doc string > (also)? > > This is similar to comparing their truenames, except that remote file > names are also handled in an appropriate manner. The doc string already says that, albeit with different words. Closing. ------------=_1658383202-17143-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 20 Jul 2022 20:42:01 +0000 Received: from localhost ([127.0.0.1]:36141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEGW9-0001aG-2D for submit@debbugs.gnu.org; Wed, 20 Jul 2022 16:42:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:36748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEGW3-0001a4-HV for submit@debbugs.gnu.org; Wed, 20 Jul 2022 16:41:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEGW2-00086V-TM for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2022 16:41:55 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:22208) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEGVz-0007hV-5q for bug-gnu-emacs@gnu.org; Wed, 20 Jul 2022 16:41:54 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26KJViJN002272 for ; Wed, 20 Jul 2022 20:41:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=YsJ8cu+RE3IIet4bIys8r7Oe60wU6xmnfAfxdvoGFnU=; b=b41z57mLYeIvEjQJCJEsKmfE9SMJZOxV36B8R3W8KDSWmSoq8wSbSM1x9vi5hIR/DfRb LB6ma23hqUUF5nQQOk6+B5sD5oSqmsXZWUFCRr5i2AT+7q1VQk2yw+BN1X8Z5DpSs8Zq kOOf+s/uqmixHYrAhUMvHWnnMZ5mXuWrFqIsmKL7E3sGmPedv9GIlgjSvwPcT/3QhzbG Q+vrWU6AwzVmo5fYNnDnGgNgEcmyHTGlrZe7aWkhF6yLSRmXOpVjILVICjOjXZ5Hj8Yh yopBtj6Y8Cnf0uDJRRvsPO/XziS1ZOyjp1r25rO65C2ojcR0F8KvLgebb8l+kT868pnG ig== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3hbmxsar75-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 20 Jul 2022 20:41:48 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 26KJW0U6022295 for ; Wed, 20 Jul 2022 20:41:48 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3hc1ht50xv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 20 Jul 2022 20:41:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eGn8vwyj8rCQFkvx19LijBwD7qKmi8ppkMjpJI8BbOyDyub3PGZMD/T4AB1guxkfd4zVf1Gr0D0IGmZ4zDJCZskl+uCb25q/lHKdVPGIIAm5eDuWDqkFhNzHayuxlTqKfCYMvR6u52LmBfa/98Q1JBK7fhSAzNUSxdRf6x+wQH2KuDmmYU/NVtEAGm5OP7d8c2d4ACVoJjoXubEjWOV612x1KvppE36lAYBb+I6WVBEZE5RbcvZn9DyHpryGdkaH/O2NfN6qQLp69aKZuz03plZin12StLiL2mIFGCzenMvQ5XiKMWTRlhO+/vE7vAG1f+bCFVuyvNxo7h4ywN1IBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YsJ8cu+RE3IIet4bIys8r7Oe60wU6xmnfAfxdvoGFnU=; b=iUOLQkNcFtzNg4y5Ui4tZlCxhFMorAjVIq/fHqTSVREMG5WpIfw52xlTOyGDEAe83FLdB1Whc7Ro4qH1EV0im+ViSx+Em7h6rA7B2wSA9qlsKFIwiwi6529Ezbafc0TUdqCM9qQuraz17p7TKdybQap4M/uDF6hdFUFjKxOA9gJFnogCyTcJAaGmbM4XeLpdsa7FFSMuc5hqHZzG45aJrhbfiwcugX2N8of4Xph+giZk2ZyrdBrT3MZUKJITyEnlewuWn+d4xvQPyrImvl0ZIdp1xfsyG87JpZ7klQwKnlC1XmQhlXWUqr7aYwH9HIBxLIz8Ruq/ivhlp1tFl+oWww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YsJ8cu+RE3IIet4bIys8r7Oe60wU6xmnfAfxdvoGFnU=; b=Gip4JF7u1dQzQw8w1mWk8RFDrknvzpAl568V/7B+XyuvRysETn3s+oB4crIzkGCoX0hS3z1kdJbRyqtrXpohKiif0GLVedWbeNsVf08rsye0k5WkqNudsk8/BFzj5HFjIZFcoJhQmOsL16VCYKLDdO90hbmLaqpKBHB7PMfo6To= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by MN2PR10MB3311.namprd10.prod.outlook.com (2603:10b6:208:121::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18; Wed, 20 Jul 2022 20:41:46 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb%7]) with mapi id 15.20.5458.018; Wed, 20 Jul 2022 20:41:46 +0000 From: Drew Adams To: "bug-gnu-emacs@gnu.org" Subject: 26.3; Doc of `file-equal-p' Thread-Topic: 26.3; Doc of `file-equal-p' Thread-Index: AdiceRSs/yPvbZSkQsOdM8R1vk8/wA== Date: Wed, 20 Jul 2022 20:41:45 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e2c247ce-bae3-4a5b-4b32-08da6a90432e x-ms-traffictypediagnostic: MN2PR10MB3311:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: U5Sz6bkXFnar0/HQrFXSJ8EwzjFHB4Sb+KEUpZhMNjJcEH66HLAmYqwBDbY/5WzPvQoYa1vPHjjp4hv0SJTPvOPHxFYC8pC/4CchrMbFIxZsuNJJnplN2gk2/0F59l8kKSoHnIGbie0eDxtLmgkb/yePqxBMouk5UdUtgBEsA1CRLf+RuVGZ97KD7W2SmUGbqQ0qtfAavPfpeb3i9jb5dbLlUdwPfA/RwAK5osT1egYbDGFnKo1SvAYRmr/wZE+5zj4rdg1eX4GY22el9VUME+esch3x+HCyHnDXQYpsIiV9pPecz2dAk62zMnfrnbK2+3gEro2eAFl8Z5fqWYkQIDa+O4+yhfAnsTXAgBUxDY/PETgoPe1OMjQWHwqv+8AfgrCEFlgHd39VIMTHImk43cOMcRETMKu1YBKIH7o51iDJAGtNbc5BJpJoHxXi6Kr5VCBPkqeqXlObPBTwQ3zKnL1r4ulfIsksrTexcuzEzcweQabx83BNzBlKZ+cuhHFNVdPCUslHWMqfFXTV0sYm7yPVGClWUCEK+fagecFgyasig4PJyHRK6RdDb88dy99Fhj/kiKRXEcitlEuxqi0nBg6sMIHxe6Ot5n/H989uzKkvJxLfk+wqXH59avudviA8ZewKVs7rxiDkAEnVI2/KZ7SakpebBhp6uOtt5rXRXi3qbuI/IJ3yKbDsM+vFBjyXD0b5b+qGmyxlxgs02xwsCqQwuHCC4EE8eJLw280KpO/Wqy41D3z8SJqKQ0t386DDIUoA/BtEfmux01y7D7j+WCNJkpCKBiHU7jwP5TMWkKxvRe9EjTzBGcq7xZwHocuXIrULbD8L4R1ypj7bDX1OUA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(136003)(396003)(39860400002)(376002)(346002)(64756008)(9686003)(26005)(6916009)(76116006)(66446008)(316002)(71200400001)(66556008)(8676002)(66946007)(86362001)(186003)(66476007)(44832011)(2906002)(33656002)(41300700001)(55016003)(122000001)(8936002)(52536014)(38070700005)(45080400002)(38100700002)(6506007)(7696005)(478600001)(5660300002)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qfAjao0LYMWZn0tIjYhEez6RQJs5BOyoVPh1+gGQs7faOp7pLQ1aRQSDvaTf?= =?us-ascii?Q?8Nd/VW36DeQzzEo8lBXmyFvM96swWorBrboQqcnXor1Lg4KgzEWAEzJPJZc3?= =?us-ascii?Q?+oGbhLmbtEYYknmsTzAGnEsoahhCvx54Z2Mj6VfUmBbMdQGosQsM851OeG/Q?= =?us-ascii?Q?qDPUtSpj8fyCZLOzMD3BDTW6mhBWQ5Q2tTxXJ7XTh4gbRg6L+SBOl2a22Tad?= =?us-ascii?Q?fKO3VhDFkHY3aJPFpNpEj/x6vVhTSuFVY0C7cG0WlXbroQSfooSB1NEvCqvM?= =?us-ascii?Q?PuJ1JNaQeujMGB0BL9q4N1gDyNXlBqcLlUnNR2qPXhfYHBse/+/H186Tb61U?= =?us-ascii?Q?Qm/KSk9+0R54gf3XRcGfJOmhn7aR4zmyHiBftuwfrmRtErxQ3IuOVi3bVRTT?= =?us-ascii?Q?mMpWDezN1kOIV2cc/dIv/UfG+lwZpU049ed5Qbin2BsxoJ8O6Zh8t5JsGU5r?= =?us-ascii?Q?SyIjxegXCqpglBWZi5l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us-ascii?Q?3iEgLbm8bW8jqTEhjwbFDdLEDCHExyWTE+rP3BFKKKq88i9+HVdhvXoNfETU?= =?us-ascii?Q?wIfahJmRf4ot4C6OLNMhXT/BJ+KyQp7+Ek37op9db95bYiqUaoorMN6Hwb2/?= =?us-ascii?Q?p9C2eBKj1tn+FDHWKzRJoOP1ibsePbI+METdMo44NgtJhGAVuHK4pgolWKQd?= =?us-ascii?Q?eyZNrggnHjyktMfCSsjvfWLdO0bmtP8oqz6W9y2b?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2c247ce-bae3-4a5b-4b32-08da6a90432e X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2022 20:41:46.0820 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: TFcNO6kaChWPZBFDx7BCovaTixcj6W8Q+D5sjjnkbnqa/D+dK6UZCoSfso10hvJIiYcoGe456x2v5ybLBbPqvA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB3311 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-20_12,2022-07-20_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 malwarescore=0 mlxscore=0 phishscore=0 mlxlogscore=565 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2207200083 X-Proofpoint-GUID: 1rJobpxYhZ4rYt-ZWSINhhk9nGrL9a3w X-Proofpoint-ORIG-GUID: 1rJobpxYhZ4rYt-ZWSINhhk9nGrL9a3w Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 1. I don't understand this part of the doc (in both doc string and manual): If FILE1 or FILE2 does not exist, the return value is unspecified. What's that about? Looking at the code, it looks like if either doesn't exist then its own part in the test is just nil. OK, if there's a file handler then that case could be unspecified. But if there's a file handler then the result could always be unspecified, no? (The handler doc, if there is one, presumably would "specify" what its handling of `file-equal-p' does/means, however.) Is that caveat only about the case where there's a file handler involved? If so, it would be more helpful to just say so. But if there's no file handler, how can evaluating this give something unspecified? (let (f1-attr f2-attr) (and (setq f1-attr (file-attributes (file-truename file1))) (setq f2-attr (file-attributes (file-truename file2))) (equal f1-attr f2-attr))) `file-attributes' just returns nil if the file can't be opened. In what case(s) is the result unspecified because one or both file doesn't exist? 2. How about adding this sentence from the manual to the doc string (also)? This is similar to comparing their truenames, except that remote file names are also handled in an appropriate manner. In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd Windowing system distributor `Microsoft Corp.', version 10.0.19044 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3'' ------------=_1658383202-17143-1-- From unknown Sat Jun 21 12:11:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56673: 26.3; Doc of `file-equal-p' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Jul 2022 16:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56673 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: "56673-done@debbugs.gnu.org" <56673-done@debbugs.gnu.org> Received: via spool by 56673-done@debbugs.gnu.org id=D56673.16584199585290 (code D ref 56673); Thu, 21 Jul 2022 16:13:01 +0000 Received: (at 56673-done) by debbugs.gnu.org; 21 Jul 2022 16:12:38 +0000 Received: from localhost ([127.0.0.1]:38881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEYmz-0001NE-GY for submit@debbugs.gnu.org; Thu, 21 Jul 2022 12:12:37 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:22318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEYmv-0001Mw-7C for 56673-done@debbugs.gnu.org; Thu, 21 Jul 2022 12:12:35 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26LG6Aw9004892; Thu, 21 Jul 2022 16:12:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=UknsumTp8zvIiwZQKocUABaJmo36EpJRYt4rdZuRi1w=; b=G3ve/jNrdVSNcAUmxkyjiT8Njhn2OKTD5KsfRAFIzeZeUOt96+ESq4jg2Brlaevc3yko ak5cKzvfOdMAb36HCjmuh/psKtQ9NaNBsU7OsfaW+KJPMsxjw1ZIZ7xkrJh+LuAAt5Bu da3CWaoGxtg62ifBdr+MXvzCu/oUM9PUDvpkO3ZufT3P0a+5GTRlPHIH3ZxCQm0FR0E7 R0lMcmyMW0H+C7oDtZKvMRshGg4EaGAiamRgzw9KdahEesxoVzogvhFJ0c4U5nU8lbK6 iYd2KkDeq+/mQcvzbVmNstBzz+erNNt0H86arP1AUdCDNOpg4P7vd1FqJ/jcV2eDex8u Ow== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3hbmxsd07j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Jul 2022 16:12:32 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 26LEpvDv002690; Thu, 21 Jul 2022 16:12:31 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2041.outbound.protection.outlook.com [104.47.56.41]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3hc1md88j6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Jul 2022 16:12:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QFF0oX0uRxUoBcaj+otUNfkTDxDNs64mtYS62zIDziBq89aBXeFh07kLv2oyEZQDAxpsBd103lCu7Aq4H55XA5X4zfCWnw/RnKFt1U/II+pmExInbjMSCkHbnq8PQCsOfHB+7+Hsc6uijAwSaeDsnJjI+ATRarPyQLeuEQnBXATy3RaI1vjRzDj8s0VDziMS5qYfCqMLbm80t3VM0n3qVPSwwpJm+2UJNj3W+0Cz2tzs5C3eeOeAeBz566V747PPUCo+1MmlN1RGsCcAiPpC1ocQDaaEo49r7/HGnPh0DaFow1oOaTZfTvC2u/Zq9ZXYwzZrqAboGs2y4DuP0xsO6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UknsumTp8zvIiwZQKocUABaJmo36EpJRYt4rdZuRi1w=; b=cvmwMYUNYZzo5ujG1FDglMSSVX0CjLYOQhxBmHWHO/Il6wpDoTXOtedqk7vBEld03IWflpi1ZvENMTGkkIICM+BoaVLnACd1zJ5ZAIG/LzLIuxa9a6jhjTrgdv3iylAGp3jvF2KEqeq23tq97D2ZIWkT9HZ+Zc9bUp0mLWK2dNgfdwAMhRM/UGOPXl2w3+BW52uKdi8OSIJLqxTHlMIqo3nVJSjzrsb+5hJKRnNBZKges5tyX8pywlmRINv6w+ex3anB2Kf4GQrii1sp3jJy37Yj1K7trPAOz9QpwGIQgcvdt3Wx68DtOZ8JMZonxB6SbggE+vIe0Df79bRn8o7Ocw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UknsumTp8zvIiwZQKocUABaJmo36EpJRYt4rdZuRi1w=; b=CK8noB3PdQrSU9CSAo+95JRayUpMUXw/IhW+0uHUSx8DAZG6QShnKOnfcYavQl15ZhITSDcA81PDiqVwAs64IW6bRPxYscFYPdNedk9rYBYYJ3oc/8GUZcs+ATBiQdBg4BRJ6SlQU03X+2aELSAMMSv5MBcHuzx6oeki9WXOCHY= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by DM6PR10MB4075.namprd10.prod.outlook.com (2603:10b6:5:1d4::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.17; Thu, 21 Jul 2022 16:12:29 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb%7]) with mapi id 15.20.5458.018; Thu, 21 Jul 2022 16:12:29 +0000 From: Drew Adams Thread-Topic: [External] : Re: bug#56673: 26.3; Doc of `file-equal-p' Thread-Index: AdiceRSs/yPvbZSkQsOdM8R1vk8/wAATgQbzABQH2tA= Date: Thu, 21 Jul 2022 16:12:29 +0000 Message-ID: References: <83o7xjngzc.fsf@gnu.org> In-Reply-To: <83o7xjngzc.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ec4b9e10-401a-445e-4a50-08da6b33cf9e x-ms-traffictypediagnostic: DM6PR10MB4075:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: V/WhVq6gbxhTLEil7+F3x6vw891qDgzdQeB4zly4LIERiUpHfQHfDzzqt5B8HAF07+w4x+oi9X21MISO7XWmsqCSBaM5/2EKLl6zpNb9dkPWtTUcjEX/IkZDb4IHDiZVEorDsv/RKRAcgShRaElDDhlAqKNnKj4GDEtkZQl7XKCauXsUguGsBDQ1SZ1uL0rcduIa/fN/B6gEqzwfrLZESXNZj3Xsrm/OWisSOEA2IUYIVVSXxVMdwmflO1pBsXPw3KBohSO0W0GGr0Deu3LtTakeG1PWnCNPjYLh56ekETBKZv06oo4AKemX/UQ6EgbF7MW/afrB6Yc2MuwQzwo6XOvFVPPeumf+yrIFmnWAK3stDbeSu+U+tlN2bZI9C4fSAIbFttVsIgvXAPaXuIa8QrXrPPWwjl3P+whGOOlOdkelVJ6vEalrWztJ/SafPwwZqTniYpgf89ncNd74ZGu2upe01r86UgtnEuT/T/aEAqfTZaQy/8kvd9GyYy4KDp7xY7IwhySg4htcAz6gzXvwihXOeRdUxfZ6OJfuSP5nR6EXTH72/zPY2dMm2BKg2n2GJey5/1X5C5jRvoIUXmsIyEONwz17CwZXkfRQtMx9dc0+4r7lmja/zEFobVPl+6DMGRfI8I76dQ7ZUKw25Jb+n4m+LmUYzx99KODjm6+fnqH0ZAGYzliFtcX27w02uf84wMyN8PIFESvB6blXP64koLiv3V/GPW31ZB+CGklq28Lo6sqpK503oytmu3Lrnb2BeE6LpiMXXZzp020ENTFj0nCgQAuxRpXQ22ZVP7iOjzXstp0p19Wgm7Lg1aiQEQOTQWlK/hcr2jEoc5AFHNKStg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(346002)(396003)(39860400002)(136003)(376002)(6506007)(186003)(71200400001)(41300700001)(5660300002)(26005)(7696005)(478600001)(83380400001)(55016003)(9686003)(44832011)(76116006)(8936002)(6916009)(8676002)(4326008)(64756008)(38070700005)(66946007)(66446008)(122000001)(66476007)(316002)(33656002)(66556008)(2906002)(38100700002)(86362001)(52536014)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: P4QyB8UGAfSG5Uwqnj1yMxirH1L6hoYPMxL/NF04z5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I7obQuSY5xejtSDwKCF1fXFLPtmKN16/ob9Bd+jPlP2vF3PUMgfH7OY1kn7iyoj1jG9U6svQCVbviF2LbK0V0Rmkg5sb56v1s5XIH4a5VqtJ1rNlBVWXp1hShMjzUVFrckS2+9XCg/Ys64QkkXofOClEHmSi54GoEUxxi4WCpocV965Kq4630VyEdmMS1Sas+TI6IYdGN/B21EqOzy0IHOsh8l7TG5XsV6HCmrl3M66PlzgRicuW0s3oZYyoL0JrIpnW1NamwYMnB0/1ppS4OikXWXA8Pk+mnOoDASm/pTUb0qAoAI39ghNDbrTnpSvURFUqYchZtp1aPPsVwtlt2w+M1VhKfmlycG8yBWAsD5qunOY6U6KbcD8owayaIwuPpiOdaHp0WRePXQxTiE7OMCR3a001MVk7ApiEvBhgDbOJ8+gkrWHHEDWUm0hBFq/QiI5KCnscMBw1ETPeD32Mhloh0fVCQN6sRzWDt4 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ec4b9e10-401a-445e-4a50-08da6b33cf9e X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2022 16:12:29.5858 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: kUWcz90BAr/FutaVlglUfACUW0JpDWRSHFb6x7QXwyMX+W+V56ZNmPwgWIclcN4bISudNczIHs7CntBgAy77DA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB4075 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-21_22,2022-07-20_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 phishscore=0 suspectscore=0 mlxlogscore=700 adultscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2207210065 X-Proofpoint-GUID: sZsMg3nBc711ziRSeiTGZc9hEsB2OMhw X-Proofpoint-ORIG-GUID: sZsMg3nBc711ziRSeiTGZc9hEsB2OMhw X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > > 1. I don't understand this part of the doc (in both doc string and > > manual): > > > > If FILE1 or FILE2 does not exist, the return value is unspecified. > > > > What's that about? >=20 > It means the result could be anything: nil or non-nil, and you > shouldn't expect anything specific. IOW, don't call this > function unless both files exist. > > > In what case(s) is the result unspecified because=20 > > one or both file doesn't exist? >=20 > All of them. There was a long discussion of this in=20 > bug#10489, and I'm not interested in reopening it. Thanks for reminding me of that thread. I've scanned it again now. My review of the thread reinforces to me that the _only_ case where a nonexistent file could possibly result in a non-nil return value is when a file handler is used. Do you disagree that that's the only case? If that's the only case, then could we perhaps say something like this (statement, not wording)? If neither file name has a `file-equal-p' handler then if either file does not exist the return value is nil. If either name has a `file-equal-p' handler then the return value could be nil or non-nil when either file does not exist. That first paragraph lets users know about an important, common use case - they may well know that no handler is involved in their use context. IIUC (correct me if wrong, please), code such as this would be correct, to handle the handler case also. But it would be costly, and would make useless any optimization a handler might make by not testing for existence. (defun file-equal-existing-p (file1 file2) "..." (let ((handler (or (find-file-name-handler file1 'file-equal-p) (find-file-name-handler file2 'file-equal-p)))) (if handler ;; Or a different `and' order... (and (funcall handler 'file-equal-p file1 file2) (file-exists-p file1) (file-exists-p file2)) (let (f1-attr f2-attr) (and (setq f1-attr (file-attributes (file-truename file1)) f2-attr (file-attributes (file-truename file2))) (equal f1-attr f2-attr)))))) And code such as this would cover the simple use case: (defun file-equal-no-handler-p (file1 file2) "..." (let ((handler (or (find-file-name-handler file1 'file-equal-p) (find-file-name-handler file2 'file-equal-p))) f1-attr f2-attr) (and (not handler)=20 (setq f1-attr (file-attributes (file-truename file1)) f2-attr (file-attributes (file-truename file2))) (equal f1-attr f2-attr)))))) > > 2. How about adding this sentence from the manual to=20 > > the doc string (also)? > > > > This is similar to comparing their truenames, except that > > remote file names are also handled in an appropriate manner. >=20 > The doc string already says that, albeit with different words. I don't see how it even vaguely suggests that, in any way. Could you point to the wording you think "already says that"? We have lots of `file-*' functions. It's fairly important that we make clear what each does, so users can make best use of them. From unknown Sat Jun 21 12:11:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56673: 26.3; Doc of `file-equal-p' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Jul 2022 16:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56673 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 56673@debbugs.gnu.org Received: via spool by 56673-submit@debbugs.gnu.org id=B56673.16584210847456 (code B ref 56673); Thu, 21 Jul 2022 16:32:01 +0000 Received: (at 56673) by debbugs.gnu.org; 21 Jul 2022 16:31:24 +0000 Received: from localhost ([127.0.0.1]:38935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEZ50-0001vt-FJ for submit@debbugs.gnu.org; Thu, 21 Jul 2022 12:31:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEZ4x-0001vf-HD for 56673@debbugs.gnu.org; Thu, 21 Jul 2022 12:31:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54958) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEZ4r-0006ja-SX; Thu, 21 Jul 2022 12:31:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mhJ75G8Wjf1B99bHIEIch1NKLb262y5EqkoRB39dTz4=; b=LCWD3vJpGXfn NrrnkJKsD6ksrEFQC3FLTooC0WgGf9qoaDDmcsjYWgNdPxn6hQiBvNteYchyzCVWbmWTDyBTPE8W0 vEj8BnOVA784fDFxQ1nFMl+3lsU1d2rrh0EF1MY6LlhFM+D0a7ktMOXFhbJ2PEZQ3H5Ic8sFzl1UF wXiXwxl6AJeCS4gqJFnWXk7wTqMh9KDvfaNYKpLxGA0sh/y7gpd0AQgVIgh53reqjW1AbdwAKyKJ8 NvfVwMvoTmlx5bECt58/o7oazVQCbTmoe+ax6WNhjxH2anSGT0FmeRc+rdG3v/dMySBmjULBNh6I7 knWthwITuHDIZIRHKSqyQw==; Received: from [87.69.77.57] (port=1698 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEZ4r-0004vT-4z; Thu, 21 Jul 2022 12:31:05 -0400 Date: Thu, 21 Jul 2022 19:30:59 +0300 Message-Id: <83czdymnr0.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Drew Adams on Thu, 21 Jul 2022 16:12:29 +0000) References: <83o7xjngzc.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Drew Adams > CC: "56673-done@debbugs.gnu.org" <56673-done@debbugs.gnu.org> > Date: Thu, 21 Jul 2022 16:12:29 +0000 > > Do you disagree that that's the only case? It doesn't matter for the purposes of this discussion, such as it is. > If that's the only case, then could we perhaps say > something like this (statement, not wording)? > > If neither file name has a `file-equal-p' handler > then if either file does not exist the return > value is nil. > > If either name has a `file-equal-p' handler then > the return value could be nil or non-nil when > either file does not exist. It is not useful to write such documentation because there's no easy way to know up front which file will have a handler and which won't. (If you think only remote files have handlers, think again.) > > > This is similar to comparing their truenames, except that > > > remote file names are also handled in an appropriate manner. > > > > The doc string already says that, albeit with different words. > > I don't see how it even vaguely suggests that, > in any way. Could you point to the wording you > think "already says that"? Sorry, I dreamed it.