emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: jmcbray@carcosa.net (Jason F. McBrayer)
To: Taru Karttunen <taruti@taruti.net>
Cc: Org-mode ml <emacs-orgmode@gnu.org>
Subject: Re: server-kill-new-buffers and org-agenda
Date: Fri, 13 Mar 2009 13:13:00 -0400	[thread overview]
Message-ID: <m1eix1xs6b.fsf@bertrand.carcosa.net> (raw)
In-Reply-To: <20090313133437.GA23278@taruti.net> (Taru Karttunen's message of "Fri, 13 Mar 2009 15:34:37 +0200")

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    |  

      parent reply	other threads:[~2009-03-13 17:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1eix1xs6b.fsf@bertrand.carcosa.net \
    --to=jmcbray@carcosa.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=taruti@taruti.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).