From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: How to compare time of last file modification? Date: Sun, 01 Jul 2012 11:23:03 +0200 Message-ID: <87txxr4yyw.fsf@gmx.de> References: <87bok0nuw4.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1341134606 9839 80.91.229.3 (1 Jul 2012 09:23:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 1 Jul 2012 09:23:26 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Pascal J. Bourguignon" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 01 11:23:24 2012 Return-path: Envelope-to: geh-help-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 1SlGNH-0002S4-46 for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Jul 2012 11:23:23 +0200 Original-Received: from localhost ([::1]:38688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlGNF-0005qt-Er for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Jul 2012 05:23:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlGN8-0005qW-4a for help-gnu-emacs@gnu.org; Sun, 01 Jul 2012 05:23:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SlGN6-0003Xt-DI for help-gnu-emacs@gnu.org; Sun, 01 Jul 2012 05:23:13 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:52494) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SlGN6-0003Xn-2Q for help-gnu-emacs@gnu.org; Sun, 01 Jul 2012 05:23:12 -0400 Original-Received: (qmail invoked by alias); 01 Jul 2012 09:23:08 -0000 Original-Received: from p57BB9D39.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.157.57] by mail.gmx.net (mp070) with SMTP; 01 Jul 2012 11:23:08 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+xhSoyC3ixtXOhn0FZxCbhyh18tN/fNW2ts1CcqD eApESjom9+MeAO In-Reply-To: <87bok0nuw4.fsf@kuiper.lan.informatimago.com> (Pascal J. Bourguignon's message of "Sun, 01 Jul 2012 03:16:11 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.22 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:85601 Archived-At: "Pascal J. Bourguignon" writes: > (defun time-lessp (t1 t2) > "Returns whether t1 t1 and t2 are lists of two integers. The first integer has the > high-order 16 bits of time, the second has the low 16 bits." > (destructuring-bind (h1 l1) t1 > (destructuring-bind (h2 l2) t2 > (cond > ((< h1 h2) t) > ((> h1 h2) nil) > (t (cond ((< l1 l2) t) > (t nil))))))) In Tramp, we use (defun tramp-time-less-p (t1 t2) "Say whether time value T1 is less than time value T2." (unless t1 (setq t1 '(0 0))) (unless t2 (setq t2 '(0 0))) (or (< (car t1) (car t2)) (and (= (car t1) (car t2)) (< (nth 1 t1) (nth 1 t2))))) Best regards, Michael.