* server-kill-new-buffers and org-agenda
@ 2009-03-13 13:34 Taru Karttunen
2009-03-13 17:04 ` Carsten Dominik
2009-03-13 17:13 ` Jason F. McBrayer
0 siblings, 2 replies; 3+ messages in thread
From: Taru Karttunen @ 2009-03-13 13:34 UTC (permalink / raw)
To: Org-mode ml
Hello
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?
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.
Any suggestions?
- Taru Karttunen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: server-kill-new-buffers and org-agenda
2009-03-13 13:34 server-kill-new-buffers and org-agenda Taru Karttunen
@ 2009-03-13 17:04 ` Carsten Dominik
2009-03-13 17:13 ` Jason F. McBrayer
1 sibling, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2009-03-13 17:04 UTC (permalink / raw)
To: Taru Karttunen; +Cc: Org-mode ml
On Mar 13, 2009, at 2:34 PM, Taru Karttunen wrote:
> Hello
>
> 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?
>
> 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.
>
> Any suggestions?
It might help if you exit the agenda with "x" before quitting.
x will remove org files loaded to create the agenda.
- Carsten
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: server-kill-new-buffers and org-agenda
2009-03-13 13:34 server-kill-new-buffers and org-agenda Taru Karttunen
2009-03-13 17:04 ` Carsten Dominik
@ 2009-03-13 17:13 ` Jason F. McBrayer
1 sibling, 0 replies; 3+ messages in thread
From: Jason F. McBrayer @ 2009-03-13 17:13 UTC (permalink / raw)
To: Taru Karttunen; +Cc: Org-mode ml
Taru Karttunen <taruti@taruti.net> 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 |
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-13 18:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-13 13:34 server-kill-new-buffers and org-agenda Taru Karttunen
2009-03-13 17:04 ` Carsten Dominik
2009-03-13 17:13 ` Jason F. McBrayer
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).