* org-babel autosave
@ 2012-02-14 0:36 Colin Maxwell
2012-02-14 2:38 ` Leo Alekseyev
0 siblings, 1 reply; 2+ messages in thread
From: Colin Maxwell @ 2012-02-14 0:36 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: org-babel autosave
2012-02-14 0:36 org-babel autosave Colin Maxwell
@ 2012-02-14 2:38 ` Leo Alekseyev
0 siblings, 0 replies; 2+ messages in thread
From: Leo Alekseyev @ 2012-02-14 2:38 UTC (permalink / raw)
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 <cs.maxwell@gmail.com> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-14 2:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14 0:36 org-babel autosave Colin Maxwell
2012-02-14 2:38 ` Leo Alekseyev
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).