emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Charles C. Berry" <ccberry@ucsd.edu>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: [bug] org-edit-src-code auto-save glitch
Date: Tue, 9 Apr 2013 13:51:06 -0700	[thread overview]
Message-ID: <alpine.OSX.2.00.1304091322380.3817@charles-berrys-macbook.local> (raw)
In-Reply-To: <87ip3y2fvq.fsf@bzg.ath.cx>

On Sun, 7 Apr 2013, Bastien wrote:

> Hi Charles,
>
> Charles Berry <ccberry@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	other threads:[~2013-04-09 20:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26 19:18 [bug] org-edit-src-code auto-save glitch Charles Berry
2013-04-07 20:42 ` Bastien
2013-04-09 20:51   ` Charles C. Berry [this message]
2013-04-09 21:04     ` Bastien
2013-04-10  2:08       ` Charles C. Berry
2013-04-16  8:42         ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.OSX.2.00.1304091322380.3817@charles-berrys-macbook.local \
    --to=ccberry@ucsd.edu \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).