From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Peter Milliken" Newsgroups: gmane.emacs.help Subject: Re: elisp: how to detect if a file has changed on disk Date: Wed, 17 Dec 2008 09:51:07 +1100 Message-ID: <791153ba0812161451r282eab6dtc1ec1bb2f810925@mail.gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12870_9768377.1229467867657" X-Trace: ger.gmane.org 1229467920 31340 80.91.229.12 (16 Dec 2008 22:52:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Dec 2008 22:52:00 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Mirko Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 16 23:53:04 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LCimZ-00014E-SW for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Dec 2008 23:52:52 +0100 Original-Received: from localhost ([127.0.0.1]:34764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCilN-00088X-MH for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Dec 2008 17:51:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCil0-00085j-Mg for help-gnu-emacs@gnu.org; Tue, 16 Dec 2008 17:51:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCikw-0007xl-TN for help-gnu-emacs@gnu.org; Tue, 16 Dec 2008 17:51:14 -0500 Original-Received: from [199.232.76.173] (port=35341 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCikw-0007xc-PV for help-gnu-emacs@gnu.org; Tue, 16 Dec 2008 17:51:10 -0500 Original-Received: from mail-bw0-f12.google.com ([209.85.218.12]:63798) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LCikw-0003uF-5E for help-gnu-emacs@gnu.org; Tue, 16 Dec 2008 17:51:10 -0500 Original-Received: by bwz5 with SMTP id 5so7244360bwz.18 for ; Tue, 16 Dec 2008 14:51:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=7SWY7qGm+qV90ZuMb7BP7oG17aO8eEqdBVRr9Crt7G4=; b=GoEpcx4hLQfV61BbakTd+RxuQoREm2s1g6HR51T1QMAZh6DqiDkVz1ABsfonZN2R15 +9aogcpT9ZqNzs0Y5vJ9QeXpUTw60mRp7TTDOfwuk31N+f81otnn/HxW5hGW3t9ftYWf xTbGr6ncB6m60ho6FSbMOyx0U3b/ThreqBZLs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=cSK/Z2MFzAUW9DLkB01sXW5M3qAQaY7rpzypS0oNUpMe6HMuGxMmXiT9T49b7kNDFr I5QnN05F4eSVgZRJ3rxPrXAOAov9UYzrxdXVp9kH5bIYj/8TNTKAo9N+MoixiWSX4Bhh 3xck6H4UyMXKHJgJYCMf1qtuap8DPreRmB3tY= Original-Received: by 10.103.172.9 with SMTP id z9mr3467327muo.39.1229467867672; Tue, 16 Dec 2008 14:51:07 -0800 (PST) Original-Received: by 10.103.165.9 with HTTP; Tue, 16 Dec 2008 14:51:07 -0800 (PST) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60706 Archived-At: ------=_Part_12870_9768377.1229467867657 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline See section 27.6 of the Elisp Manual (comparison of modification time). See also 26.3 (Reverting) for reverting mechanisms. Pete On Wed, Dec 17, 2008 at 1:03 AM, Mirko wrote: > Hello, > > I use emacs on my desktop and laptop, and unison to synchronize > modified files between the machines. > > But that means that after synchronization, some of the files that a > buffer is visiting will change, and I will have to revert the buffer. > I would like to automatically revert all such buffers. What function > can I use to test whether a the file that a buffer is visiting has > changed? > > Thanks, > > Mirko > ------=_Part_12870_9768377.1229467867657 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline See section 27.6 of the Elisp Manual (comparison of modification time).

See also 26.3 (Reverting) for reverting mechanisms.

Pete

On Wed, Dec 17, 2008 at 1:03 AM, Mirko <mvukovic@nycap.rr.com> wrote:
Hello,

I use emacs on my desktop and laptop, and unison to synchronize
modified files between the machines.

But that means that after synchronization, some of the files that a
buffer is visiting will change, and I will have to revert the buffer.
I would like to automatically revert all such buffers.  What function
can I use to test whether a the file that a buffer is visiting has
changed?

Thanks,

Mirko

------=_Part_12870_9768377.1229467867657--