GNU bug report logs -
#58446
28.2; file-attribute-device-number returns a cons cell instead of an integer
Previous Next
Reported by: Thierry Volpiatto <thievol <at> posteo.net>
Date: Tue, 11 Oct 2022 18:18:02 UTC
Severity: normal
Found in version 28.2
Fixed in version 29.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> - 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"?
>> - 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.
>> - 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.
Stefan
This bug report was last modified 2 years and 299 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.