emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-babel autosave


From: Leo Alekseyev
Subject: Re: [O] org-babel autosave
Date: Mon, 13 Feb 2012 21:38:06 -0500

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 <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]