From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.devel Subject: Re: Popup when buffer file is changed on disk Date: Sun, 06 Feb 2005 11:53:26 +0200 Message-ID: <01c50c31$Blat.v2.4$d9a7a2a0@zahav.net.il> References: <200502040036.j140atb03430@raven.dms.auburn.edu> <009d01c50bbb$9aa2fd50$0200a8c0@sedrcw11488> <000c01c50bc5$248dc1e0$6501a8c0@y8h26> <01c50bd6$Blat.v2.4$48866000@zahav.net.il> <001701c50be6$0eb9fa20$0200a8c0@sedrcw11488> <01c50c1c$Blat.v2.4$88670e40@zahav.net.il> <002801c50c2a$cbce93c0$0200a8c0@sedrcw11488> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT X-Trace: sea.gmane.org 1107684988 10085 80.91.229.2 (6 Feb 2005 10:16:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Feb 2005 10:16:28 +0000 (UTC) Cc: emacs-devel@gnu.org, moheb1333@comcast.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 06 11:16:27 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CxjSo-0003qi-I1 for ged-emacs-devel@m.gmane.org; Sun, 06 Feb 2005 11:16:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cxjgg-0004Nm-LX for ged-emacs-devel@m.gmane.org; Sun, 06 Feb 2005 05:30:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CxjfO-0004Mq-W8 for emacs-devel@gnu.org; Sun, 06 Feb 2005 05:29:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CxjfM-0004MY-SN for emacs-devel@gnu.org; Sun, 06 Feb 2005 05:29:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxjcU-0003lR-Vk for emacs-devel@gnu.org; Sun, 06 Feb 2005 05:26:23 -0500 Original-Received: from [192.114.186.66] (helo=romy.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CxjAz-0003jq-Fn for emacs-devel@gnu.org; Sun, 06 Feb 2005 04:57:57 -0500 Original-Received: from zaretski (tony04-57-217.inter.net.il [80.230.57.217]) by romy.inter.net.il (MOS 3.5.6-GR) with ESMTP id AMD09351 (AUTH halo1); Sun, 6 Feb 2005 11:57:52 +0200 (IST) Original-To: "Lennart Borgman" X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.4 In-reply-to: <002801c50c2a$cbce93c0$0200a8c0@sedrcw11488> (lennart.borgman.073@student.lu.se) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:32936 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32936 > From: "Lennart Borgman" > Cc: , > Date: Sun, 6 Feb 2005 10:02:20 +0100 > > > When Emacs warns you that the file was changed, what would you do in > > response? I thought that you would revert the buffer, so auto-revert > > seemed like a good solution. > > auto-revert-mode does what it does later, not at the moment Emacs gets > focus. ??? auto-revert-mode periodically checks all buffers that are visiting a file. The frequency of these checks is determined by the variable auto-revert-interval, by default every 5 seconds. Perhaps you need to set auto-revert-stop-on-user-input to nil and maybe also play with auto-revert-interval's value, to get almost instanteneous automatic reverts whenever a file changes. > I believe that at the moment when Emacs gets focus it should for all > files that are visited in buffers and changed outside of Emacs should ask: > > "File AA.C has changed on disk. Do you want to reload it?" Perhaps a feature can be added to autorevert.el, whereby it checks the buffers when a focus event arrives. All the rest is already there, I believe.