From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) Newsgroups: gmane.emacs.help Subject: Re: Comparing last modification time without dired? Date: Fri, 07 Nov 2014 09:50:48 +0100 Organization: The Church of Emacs Message-ID: <87lhnnv1g7.fsf@vsl28t2g.ww011> References: <87wq7779kx.fsf@hornfels.zedat.fu-berlin.de> <87ioir76zj.fsf@hornfels.zedat.fu-berlin.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1415350312 2570 80.91.229.3 (7 Nov 2014 08:51:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Nov 2014 08:51:52 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 07 09:51:45 2014 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 1XmfGg-0007NQ-MU for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Nov 2014 09:51:42 +0100 Original-Received: from localhost ([::1]:58989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmfGg-0005Z2-5Y for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Nov 2014 03:51:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmfGI-0005Os-Ch for help-gnu-emacs@gnu.org; Fri, 07 Nov 2014 03:51:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmfG9-0005kO-OR for help-gnu-emacs@gnu.org; Fri, 07 Nov 2014 03:51:18 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:37880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmfG9-0005kB-GT for help-gnu-emacs@gnu.org; Fri, 07 Nov 2014 03:51:09 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XmfG0-0006jb-Gq for help-gnu-emacs@gnu.org; Fri, 07 Nov 2014 09:51:00 +0100 Original-Received: from p4fd4ed75.dip0.t-ipconnect.de ([79.212.237.117]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Nov 2014 09:51:00 +0100 Original-Received: from dieter by p4fd4ed75.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Nov 2014 09:51:00 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: p4fd4ed75.dip0.t-ipconnect.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:W7uktCGPApY+c4BPBrKGV8rzA5E= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:100817 Archived-At: "Loris Bennett" writes: > Hi Michael, > > Michael Albinus writes: > >> "Loris Bennett" writes: >> >>> Hi, >> >> Hi Loris, >> >>> If I have two buffers and want to see which of the corresponding files >>> is the more recent, is there a faster way of doing it than running dired >>> for each of the corresponding directories? >> >> (file-newer-than-file-p (buffer-file-name buf1) (buffer-file-name buf2)) > > Thanks for this. If I want to do this as part of an interactive > function, how would I invoke the choice of buffers like ediff-buffers > does? (defun bla (buf1 buf2) (interactive "bbuffer1\nbbuffer2") ... ) Could already be sufficent for your needs. Dieter -- Best wishes H. Dieter Wilhelm Darmstadt, Germany