[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] server-kill-new-buffers and org-agenda
From: |
Jason F. McBrayer |
Subject: |
Re: [Orgmode] server-kill-new-buffers and org-agenda |
Date: |
Fri, 13 Mar 2009 13:13:00 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) |
Taru Karttunen <address@hidden> 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 address@hidden |
| 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 |