unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: auto-save-visited-file-name
Date: 15 Oct 2003 23:20:55 +0200	[thread overview]
Message-ID: <m3ismqqjt4.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <jwv3cdu1gn3.fsf-monnier+emacs/devel@vor.iro.umontreal.ca>

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> Has anyone ever tried to use this variable ?

Not me.  Is this a new option?

> 
> It has some really nasty effects.  Let's see a session:
> 
> % emacs -q --no-site-file
> M-: (setq auto-save-visited-file-name t)
> C-x C-f ~/tmp/foo.txt RET
> type in some text with é or à
> C-x C-s
> # Now foo.txt has size 30, for instance, using latin-1.
> SPC DEL
> # Wait until the buffer is auto-saved.
> # BUG-1: Now foo.txt has size 32, using emacs-mule encoding.
> C-x C-s
> # BUG-2: Emacs prompts because the file was "changed since saved".
> # let's not save, but kill the buffer instead.
> C-g
> C-x k RET
> # BUG-3: foo.txt does not exist any more because Emacs thought it
> #        was the auto-save file and should thus be removed.
> 
> I think we need to do something.
> Maybe fix the above bugs, which might uglify a good bit of the code.

Re. bug 1, I haven't a clue.

.. but doesn't that mean that auto-save files are always saved 
in emacs-mule rather than the current coding of the buffer?
That sounds like a more generic error that needs fixing anyway.


Re. bug 2, checking the varibale in basic-save-buffer seems to be 
trivial.

Re. bug 3, checking the variable in delete-auto-save-file-if-necessary
seems to be trivial too.

> Or maybe remove the option instead.
> Or at least make it into a `defvar' rather than `defcustom'.

I think we should try to fix it...

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2003-10-15 21:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-15 18:59 auto-save-visited-file-name Stefan Monnier
2003-10-15 21:20 ` Kim F. Storm [this message]
2003-10-16 17:10   ` auto-save-visited-file-name Stefan Monnier
2003-10-16 19:52     ` auto-save-visited-file-name Kim F. Storm
2003-10-16  7:19 ` auto-save-visited-file-name Eli Zaretskii
2003-10-17 20:46 ` auto-save-visited-file-name Richard Stallman
2003-10-17 21:14   ` auto-save-visited-file-name Stefan Monnier
2003-10-23 15:55   ` auto-save-visited-file-name Kevin Rodgers
2003-10-24  5:16     ` auto-save-visited-file-name Richard Stallman

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m3ismqqjt4.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@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.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).