From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#28921: [PROPOSED] Fix xdg timestamp error on 32-bit Emacs Date: Sat, 21 Oct 2017 18:11:24 +0900 Message-ID: <874lqs6f2b.fsf@gmail.com> References: <20171021030455.16035-1-eggert@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1508577142 23672 195.159.176.226 (21 Oct 2017 09:12:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 21 Oct 2017 09:12:22 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: mvoteiza@udel.edu, 28921@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 21 11:12:18 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5pp8-00040m-JJ for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Oct 2017 11:12:06 +0200 Original-Received: from localhost ([::1]:57159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5ppE-0004L3-Ai for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Oct 2017 05:12:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5pp7-0004Km-Ud for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 05:12:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5pp4-0000Ah-Pd for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 05:12:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44416) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5pp4-0000Ab-LZ for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 05:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e5pp4-0006sT-Gl for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 05:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Oct 2017 09:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28921 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28921-submit@debbugs.gnu.org id=B28921.150857710126403 (code B ref 28921); Sat, 21 Oct 2017 09:12:02 +0000 Original-Received: (at 28921) by debbugs.gnu.org; 21 Oct 2017 09:11:41 +0000 Original-Received: from localhost ([127.0.0.1]:53097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5poj-0006rn-MM for submit@debbugs.gnu.org; Sat, 21 Oct 2017 05:11:41 -0400 Original-Received: from mail-pf0-f174.google.com ([209.85.192.174]:43604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5poh-0006rY-HL for 28921@debbugs.gnu.org; Sat, 21 Oct 2017 05:11:40 -0400 Original-Received: by mail-pf0-f174.google.com with SMTP id a8so13759844pfc.0 for <28921@debbugs.gnu.org>; Sat, 21 Oct 2017 02:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ZDZDGiQNCPBP71W9K0P4TkB6qeE/CwV0mf9aBIQzfJs=; b=lD20nCPzVn1LHYRuRZ1ufWWOOBMbBIIWI/pY2bNcLSzQNA2CGMFzCoUjeLO3ShJrla ERasBMWiMDS2A6PX11+aEZZ2ml9lMevzJFc0UpjroE13OQJGrbjbg++q56eIpq/pLY1m LpZVldmhVzIq+XDiTTz4Avnyir2YaKHiuJ1QECyDfAQTR0+wNTuxDbcEEK8fxie6wUCT yQzAtoLvZWa0xyMnb8bPLRsYkmMiN88elMNYhryuaQjmKypboNU2b7UnYKT10fXr+DEn 8qqH8H/6d6fTskYEmm2+PsT2ThUHjTSgHEdH2XXIvu60aeXlypD2adZZhrUpltz0mwY2 99qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ZDZDGiQNCPBP71W9K0P4TkB6qeE/CwV0mf9aBIQzfJs=; b=g+g97H6hhRMTJJPnYlGw6cBCoUpz3Xvg6N93KFEG478ggz6tikHBestlu9vse+N6In mbxWw21kAUIMyFGvqzm24oX7C5DWqBNoOHZQLPg+xML8Ki1RCGtraEjXQlKxJ2jJN0/B E3hSAD8qddJI1NRdy039rm0VxnlGn0bCh1dGPy8o2I3Y6XfRkKVPXWFIRMvBvrdEFrpn T8abQkBtaL3zLF5GWVt/Jw5n2KoZEm5xA0eSZp+R3rcSTubNfFtKAoAbIc/7JeLZWBE5 zOaFwkNfan3ybrtrDesbjhfM3ZenXzgnpsYK2b3I5kB2wuOHJFPTUcFMlUEaGDThZjE7 qL6w== X-Gm-Message-State: AMCzsaUnjS+hNwNRRLq9Wfwc82QNwuCO9cuOa2QfdoHSjnHHsftgJd2x JKhjmAEa6cIHcbPIA89EUIM= X-Google-Smtp-Source: ABhQp+RmkOXAz8f0T9EwEZCffQmigwU5lJniv6myUa47sxj7fudSVU66TizyIa+CZt5J/cdcNOlZlg== X-Received: by 10.84.178.37 with SMTP id y34mr2537598plb.99.1508577093558; Sat, 21 Oct 2017 02:11:33 -0700 (PDT) Original-Received: from calancha-pc (h212207.dynamic.ppp.asahi-net.or.jp. [61.114.212.207]) by smtp.gmail.com with ESMTPSA id z73sm3985273pgz.46.2017.10.21.02.11.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Oct 2017 02:11:32 -0700 (PDT) In-Reply-To: <20171021030455.16035-1-eggert@cs.ucla.edu> (Paul Eggert's message of "Fri, 20 Oct 2017 20:04:55 -0700") 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" Xref: news.gmane.org gmane.emacs.bugs:138811 Archived-At: Paul Eggert writes: > (defun xdg-thumb-mtime (filename) > - "Return modification time of FILENAME as integral seconds from the epoch." > - (floor (float-time (nth 5 (file-attributes filename))))) > + "Return modification time of FILENAME as an Emacs timestamp." > + (nth 5 (file-attributes filename))) Maybe you could use here the new accesor `file-attribute-modification-time': diff --git a/lisp/xdg.el b/lisp/xdg.el index 4250faaeb4..9edc3d2629 100644 --- a/lisp/xdg.el +++ b/lisp/xdg.el @@ -94,8 +94,8 @@ xdg-thumb-name (concat (md5 (xdg-thumb-uri filename)) ".png")) (defun xdg-thumb-mtime (filename) - "Return modification time of FILENAME as integral seconds from the epoch." - (floor (float-time (nth 5 (file-attributes filename))))) + "Return modification time of FILENAME as an Emacs timestamp." + (file-attribute-modification-time (file-attributes filename))) ;; XDG User Directories