From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: [bug] org-edit-src-code auto-save glitch Date: Tue, 9 Apr 2013 13:51:06 -0700 Message-ID: References: <87ip3y2fvq.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPfVr-0002Di-3Z for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 16:51:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPfVo-0000e3-5i for emacs-orgmode@gnu.org; Tue, 09 Apr 2013 16:51:31 -0400 In-Reply-To: <87ip3y2fvq.fsf@bzg.ath.cx> 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: Bastien Cc: emacs-orgmode@gnu.org On Sun, 7 Apr 2013, Bastien wrote: > Hi Charles, > > Charles Berry 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