From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#22890: 25.1.50; Wishlist: There should be file-attribute accessors Date: Fri, 04 Mar 2016 16:17:54 +0000 Message-ID: References: <87h9goje5d.fsf@gnus.org> <87d1ral5v8.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1457108366 31884 80.91.229.3 (4 Mar 2016 16:19:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Mar 2016 16:19:26 +0000 (UTC) To: 22890@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 04 17:19:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1absRd-0007mn-VK for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Mar 2016 17:19:14 +0100 Original-Received: from localhost ([::1]:42079 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1absRd-00078l-9X for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Mar 2016 11:19:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1absRW-00077a-Qf for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 11:19:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1absRS-0006U4-Jq for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 11:19:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1absRS-0006U0-Gd for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 11:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1absRS-0003Dw-AU for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 11:19:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87h9goje5d.fsf@gnus.org> Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Mar 2016 16:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22890 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.145710831312357 (code B ref -1); Fri, 04 Mar 2016 16:19:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Mar 2016 16:18:33 +0000 Original-Received: from localhost ([127.0.0.1]:33950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1absQv-0003DC-EZ for submit@debbugs.gnu.org; Fri, 04 Mar 2016 11:18:33 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56241) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1absQp-0003Ct-TO for submit@debbugs.gnu.org; Fri, 04 Mar 2016 11:18:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1absQg-0006P5-Eg for submit@debbugs.gnu.org; Fri, 04 Mar 2016 11:18:18 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1absQg-0006Oz-Cd for submit@debbugs.gnu.org; Fri, 04 Mar 2016 11:18:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1absQc-0006xo-DF for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 11:18:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1absQY-0006JG-93 for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 11:18:10 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:44488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1absQY-0006IY-3Q for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 11:18:06 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1absQU-00074g-9N for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 17:18:02 +0100 Original-Received: from uk.solarflare.com ([193.34.186.16]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Mar 2016 17:18:02 +0100 Original-Received: from andrewjmoreton by uk.solarflare.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Mar 2016 17:18:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: uk.solarflare.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (windows-nt) Cancel-Lock: sha1:+Wn8STvUti+wSaCOIfwayU5hAHQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114412 Archived-At: On Fri 04 Mar 2016, Lars Ingebrigtsen wrote: > Lars Ingebrigtsen writes: > >> `file-attributes' returns a list of data, and you very often see code >> like >> >> (let ((atts (file-attributes file))) >> (when (> (elt atts 7) 4000) >> ...)) >> >> and you have no idea what that means. So I think there should be 12 >> attribute accessor functions (well, defsubsts) that people can use >> instead. The names could be something like `file-attribute-size', >> `file-attribute-access-time', etc. > > I've now implemented this on the trunk. A useful addition. Please fix the defsubst typos (ntf -> nth) and possibly add some tests. Consider also fixing file-attributes callers to use the new accessors. AndyM