From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Alekseyev Subject: Re: org-babel autosave Date: Mon, 13 Feb 2012 21:38:06 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rx8HT-0003tH-LP for emacs-orgmode@gnu.org; Mon, 13 Feb 2012 21:38:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rx8HS-0007jB-Af for emacs-orgmode@gnu.org; Mon, 13 Feb 2012 21:38:11 -0500 Received: from mail-pz0-f41.google.com ([209.85.210.41]:42881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rx8HS-0007j3-2i for emacs-orgmode@gnu.org; Mon, 13 Feb 2012 21:38:10 -0500 Received: by dadv6 with SMTP id v6so5347984dad.0 for ; Mon, 13 Feb 2012 18:38:08 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Emacs orgmode Yes, but the question is -- what is the desired behavior? If you just want to autosave the temporary org-src buffer, see my question on stack overflow: http://stackoverflow.com/q/8849661/133234 In short, you'd just need to (add-hook 'org-src-mode-hook '(lambda () (auto-save-mode t))) and specify the appropriate file name. This has the drawback that the autosave fill will never be removed, since the org-src buffers never actually get saved. A better solution would be to auto-save the underlying org-buffer. I am not sure how to do this for timed autosave. For manual do-auto-save, the following works. (defadvice do-auto-save (around do-auto-save-org-src activate) (if org-src-mode (org-src-in-org-buffer (do-auto-save)) ad-do-it)) I tried putting this into an autosave-hook and disable the hook on invocation from org, but couldn't avoid infinite recursion. Perhaps someone more experienced can come up with the right solution. On Mon, Feb 13, 2012 at 7:36 PM, Colin Maxwell wrote: > Hello, > I've noticed that autosaving does not operate when you are editing an org-babel buffer via C-c '. Is there a way to turn it on? > > > cheers, > Colin