From mboxrd@z Thu Jan 1 00:00:00 1970 From: jmcbray@carcosa.net (Jason F. McBrayer) Subject: Re: server-kill-new-buffers and org-agenda Date: Fri, 13 Mar 2009 13:13:00 -0400 Message-ID: References: <20090313133437.GA23278@taruti.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LiAwV-0001t5-7s for emacs-orgmode@gnu.org; Fri, 13 Mar 2009 13:13:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LiAwP-0001sZ-NS for emacs-orgmode@gnu.org; Fri, 13 Mar 2009 13:13:06 -0400 Received: from [199.232.76.173] (port=60466 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LiAwP-0001sW-KC for emacs-orgmode@gnu.org; Fri, 13 Mar 2009 13:13:01 -0400 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.121]:61993) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LiAwP-0001WA-Cq for emacs-orgmode@gnu.org; Fri, 13 Mar 2009 13:13:01 -0400 In-Reply-To: <20090313133437.GA23278@taruti.net> (Taru Karttunen's message of "Fri, 13 Mar 2009 15:34:37 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Taru Karttunen Cc: Org-mode ml Taru Karttunen writes: > It seems that server-kill-new-buffers in emacs23 works fine for normal > org-mode files, but it doesn't affect buffers opened with > org-agenda. Is it possible to fix this? As you probably realize, this is because those buffers aren't server-editing buffers. > The problematic behaviour is as follows: > 1) look at the agenda in emacsclient > 2) close emacsclient (org-mode buffers opened by agenda are not closed) > 3) some hours later the files are edited by git etc > 4) open emacsclient to edit some org-file and when saving in emacs > it complains rightly that the file has been changed on the disk. > > Thus I would need a way to close the buffers opened by org-agenda when > the emacsclient exits. You might consider global-auto-revert-mode. If a buffer does not have unsaved changes, and emacs notices that it has changed on disk, it automatically refreshes it to the new version. If it does have unsaved changes, then it uses the normal behaviour. As long as you remember to save your org-mode buffers when you're done with the agenda, and rely on your VCS to avoid losing data to overwriting, then it should be pretty transparent. -- +-----------------------------------------------------------+ | Jason F. McBrayer jmcbray@carcosa.net | | If someone conquers a thousand times a thousand others in | | battle, and someone else conquers himself, the latter one | | is the greatest of all conquerors. --- The Dhammapada |