From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#58446: 28.2; file-attribute-device-number returns a cons cell instead of an integer Date: Fri, 14 Oct 2022 21:03:15 +0200 Message-ID: <87sfjqxm6k.fsf@gmx.de> References: <87lepmusw5.fsf@posteo.net> <87pmexcn1h.fsf@gnus.org> <87edvd5bun.fsf@gmx.de> <87wn92xql1.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31799"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Thierry Volpiatto , Lars Ingebrigtsen , 58446@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 14 21:04:19 2022 Return-path: Envelope-to: geb-bug-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 1ojPyj-0007xl-5v for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 21:04:17 +0200 Original-Received: from localhost ([::1]:38976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojPyh-0004xG-NP for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Oct 2022 15:04:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojPyU-0004vR-P1 for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 15:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39550) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojPyU-0003fp-Fo for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 15:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ojPyU-0004kx-AA for bug-gnu-emacs@gnu.org; Fri, 14 Oct 2022 15:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Oct 2022 19:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58446 X-GNU-PR-Package: emacs Original-Received: via spool by 58446-submit@debbugs.gnu.org id=B58446.166577420918244 (code B ref 58446); Fri, 14 Oct 2022 19:04:02 +0000 Original-Received: (at 58446) by debbugs.gnu.org; 14 Oct 2022 19:03:29 +0000 Original-Received: from localhost ([127.0.0.1]:38628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojPxx-0004kC-4N for submit@debbugs.gnu.org; Fri, 14 Oct 2022 15:03:29 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:35705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojPxu-0004jt-St for 58446@debbugs.gnu.org; Fri, 14 Oct 2022 15:03:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1665774197; bh=+H93OVmAo1lmXhkhGQOdH2gi4RsfCE86lEnVwX5HHNQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=guwZnMtsPJJgynhea8OdxGYEcZNrfHJcg1pTDmo0HY24BvjThJqaZx8dylP4J0sAh +QpW1ptyvPryxaQXUXx6oo68JWAZV9rGRPf7DT42o7RHUdC8s0dVryFkxixIIu9l2E COoAp9edBI7wkPi092t7FypdHYUxtqSpglLyG/Ao= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.151.229]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N0XCw-1p6R1N0ibk-00wY6L; Fri, 14 Oct 2022 21:03:17 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 14 Oct 2022 14:34:09 -0400") X-Provags-ID: V03:K1:N+yLtJ++PgtA+3sAglBMOmfHcVTU6l4wYAwoRnLx5pSuFZcyrDD lhfubKbrM2l8LeiniGV2hKj5zsIDPLbZesFfUwLaXsfVU2f7BvXlKZsmb6i4ITzEKauzcj/ U3geIG6fhkVSxldMSSVo2JQdVI7p9nD1DTaTvwwqE3QNXhcfc2br482rOn2W8BqvWrQwbZE cgd5/SmdnEUjBKthC0hyQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:G6xzO0w8S/Q=:NqW58A1ElZgU5NxBcJGE1o 1t2P6HsYwVcjUaRYNtg9OS0cadgSiN5jyTDNgzZ6bfN8SNKueKaGhMir/1VZqR4eTMs6wYYpM Wrv7/QRzi0LdJVeMio63lc/poQwXbtXduo2Y+VEPQZXYeZ9BO46JNVGYdk4UP7MNWW0zx7QnX vsONljv7uyrEbTltU8Ii7j34gjD067On3fWOg9PaURl6y9Q/ds9XWWDZoWcby+CIDWqVrNzrs I3schW+b0NaQhS84pepVkgxWWfxDbuY2PRJkw9rs6/0aGcmmFpuxe8Ah52YtWLzK/6eW/YPBt JdJL1S+HAa2BtIMNEzX1jszz11d7RDukY6pIsURJiDKhcRa6fbFdxM/2SkFEhtS/NrX9XmBE7 GwFsIbQa2Da6E+ffzO/tIBlCnnYo1X68eZIkRTxBbY3CR5z0id7slf0idPZJqB8hQr02JPRRu dpwnWGVyYPg00phI/Egb1ZOGeLu+O/5AH97FqTm46mi1yPkGwL/4I34pObxLZjUhfCm3Zz6EG 2ZWUz99Gi9tCUboFjW+AS/P6kIzvNfsYBMlHjR7H0QkuLXyKy8Ku8+EoKXiTDYDv3paOuL3TG gG6i+GQep8zrvMQkTvtBFFtAKEIUpGGET4vXISq2+mTz97xeB7n9jlSx9wIIK5rsUF6X4xGfV lK7lse4FnJK/mw/oKgSg74Xf9a4UExLGLAh0nrRoAKtBag4eRae461/p0X2ZGQqra2OEmglha ExCiSYq0llDN9SoW8vl+6Yc7POULTBjQuHG1CSdeCfQ1CLM8etX/FPyDzBWnfDbXWRDfBQ7I X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245478 Archived-At: Stefan Monnier writes: Hi Stefan, >>> - The name `file-attribute-file-number` doesn't sound right >>> because it doesn't return a number. >> The name is a reminiscence of the existing variable buffer-file-number, >> which serves exactly the same purpose. > > One error doesn't justify another. > Maybe a better name would be "file identifier"? True, but I'd let decide the maintainers. >>> - I wouldn't use `defsubst` (so it can more easily be modified in the >>> future, e.g. in case we add more fields to the attributes or use some >>> other representation for attributes). >> All other accessor functions for file-attributes are defsubsts. > > Every `defsubst` should be judged on its own individual value. > This one doesn't seem to be justified. As I said, it should be an "accessor function" for the result of file-attributes. Just a stupid one, which returns inode and device. That's the intention, and not something more sophisticated about identifying a file. >>> - I would document it more abstractly, mentioning inode and device >>> number only as *examples* of things it might contain. >> There is no intention to use it for anything else. It shall return >> (nthcdr 10 attributes) like all the other file-attributes accessor >> functions return for the respective slots. > > I did not suggest changing its implementation. Only its documentation. > The doc should describe the intended semantics of the return value > without documenting how it's implemented. The intended semantics is what's described. I understand that you see something more for the future. I don't see it, sorry. No other use case I could think of. We have file-equal-p for more sophisticated checks, and this has even file name handler support. > Stefan Best regards, Michael.