On Sun, 7 Apr 2013, Bastien wrote:

Hi Charles,

Charles Berry <ccbe...@ucsd.edu> writes:

IIUC the problem is that this part of the function

,----
| (setq buffer-file-name nil
|       buffer-auto-save-file-name
|       (concat (make-temp-name "org-src-")
|             (format-time-string "-%Y-%d-%m") ".txt"))
`----


should consult org-edit-src-auto-save-idle-delay and when it is zero,
set buffer-auto-save-file-name to nil or take some other action to ensure that
auto-save-mode does get enabled.

Fixed, thanks.

IMHO, this is not fixed.

I did make update2 this morning and have:

,----
| (when auto-save-default
|   (setq buffer-auto-save-file-name
|       (concat (make-temp-name "org-src-")
|               (format-time-string "-%Y-%d-%m") ".txt")))
`----

starting in line 354 in org-src.el.

auto-save-default affects lots of things outside of org-mode. So I really do not want to set it nil and thereby disable saving of all the buffers I really care about.

And unlike normal auto-saving, the auto-saved-files (of src block edits) are not deleted when the parent buffer is saved.

So, I am still getting the nuisance files.

I still don't see why org-src.el doesn't use this:

,----
| (when (< 0 org-edit-src-auto-save-idle-delay)
|   (setq buffer-auto-save-file-name
|       (concat (make-temp-name "org-src-")
|               (format-time-string "-%Y-%d-%m") ".txt")))
`----



HTH,

Chuck

Reply via email to