help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comparing last modification time without dired?


From: H. Dieter Wilhelm
Subject: Re: Comparing last modification time without dired?
Date: Fri, 07 Nov 2014 09:50:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

"Loris Bennett" <loris.bennett@fu-berlin.de> writes:

> Hi Michael,
>
> Michael Albinus <michael.albinus@gmx.de> writes:
>
>> "Loris Bennett" <loris.bennett@fu-berlin.de> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]