unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Encoding for auto-save files
@ 2002-05-07 15:47 Kai Großjohann
  2002-05-07 16:33 ` Eli Zaretskii
  2002-05-08 13:59 ` Richard Stallman
  0 siblings, 2 replies; 10+ messages in thread
From: Kai Großjohann @ 2002-05-07 15:47 UTC (permalink / raw)


Emacs always uses emacs-mule for saving auto-save files.  In case a
user happens to use C-x C-f on an auto-save file, shouldn't Emacs use
emacs-mule, too?

I just made Emacs create an autosave file, then I said "emacs
~/#core#" and the file was displayed wrongly (I saw \216 escapes for
Latin-9 characters).

kai
-- 
Silence is foo!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Encoding for auto-save files
  2002-05-07 15:47 Encoding for auto-save files Kai Großjohann
@ 2002-05-07 16:33 ` Eli Zaretskii
  2002-05-08  9:42   ` Kai Großjohann
  2002-05-08 13:59 ` Richard Stallman
  1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2002-05-07 16:33 UTC (permalink / raw)
  Cc: emacs-devel

> From: Kai.Grossjohann@CS.Uni-Dortmund.DE
> Date: Tue, 07 May 2002 17:47:10 +0200
> 
> Emacs always uses emacs-mule for saving auto-save files.  In case a
> user happens to use C-x C-f on an auto-save file, shouldn't Emacs use
> emacs-mule, too?

"M-x recover-file" already does that.

As for "C-x C-f", Emacs just treats #foo# as any other file, and does
its usual encoding-detection guesswork.  Since emacs-mule is very low
on the priority list of that guesswork, you almost always get
something that isn't emacs-mule.

However, if we are sure that files whose names match the pattern
"\\(\\`\\|/\\)#.+#\\'" are mostly Emacs auto-save files, I think
it's a good idea to add an appropriate association to
file-coding-system-alist defined on mule-conf.el.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Encoding for auto-save files
  2002-05-07 16:33 ` Eli Zaretskii
@ 2002-05-08  9:42   ` Kai Großjohann
  2002-05-08 10:17     ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Kai Großjohann @ 2002-05-08  9:42 UTC (permalink / raw)
  Cc: emacs-devel

"Eli Zaretskii" <eliz@is.elta.co.il> writes:

> However, if we are sure that files whose names match the pattern
> "\\(\\`\\|/\\)#.+#\\'" are mostly Emacs auto-save files, I think
> it's a good idea to add an appropriate association to
> file-coding-system-alist defined on mule-conf.el.

Yes, please.  What do people think?

I guess that C-x C-f on an autosave file is not an uncommon
operation.  After all, M-x recover-file RET and friends don't show me
the contents of the autosave file.

kai
-- 
Silence is foo!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Encoding for auto-save files
  2002-05-08  9:42   ` Kai Großjohann
@ 2002-05-08 10:17     ` Eli Zaretskii
  2002-05-08 10:58       ` Kai Großjohann
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2002-05-08 10:17 UTC (permalink / raw)
  Cc: emacs-devel


On Wed, 8 May 2002 Kai.Grossjohann@CS.Uni-Dortmund.DE wrote:

> After all, M-x recover-file RET and friends don't show me
> the contents of the autosave file.

??? Of course they do: what do you think is that text you are looking at 
after M-x recover-file?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Encoding for auto-save files
  2002-05-08 10:17     ` Eli Zaretskii
@ 2002-05-08 10:58       ` Kai Großjohann
  0 siblings, 0 replies; 10+ messages in thread
From: Kai Großjohann @ 2002-05-08 10:58 UTC (permalink / raw)
  Cc: emacs-devel

Eli Zaretskii <eliz@is.elta.co.il> writes:

> On Wed, 8 May 2002 Kai.Grossjohann@CS.Uni-Dortmund.DE wrote:
>
>> After all, M-x recover-file RET and friends don't show me
>> the contents of the autosave file.
>
> ??? Of course they do: what do you think is that text you are looking at 
> after M-x recover-file?

Err.  I should express myself better.  I meant that with C-x C-f I can
compare the file with its autosave file.  M-x recover-file RET asks me
whether I want to recover a file, but doesn't show me the contents.

Or is there a feature I missed that will show me the differences
between a file and its autosave?  (Then I guess that Emacs and my
system are too stable: I recover files very very rarely. :-)

kai
-- 
Silence is foo!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Encoding for auto-save files
  2002-05-07 15:47 Encoding for auto-save files Kai Großjohann
  2002-05-07 16:33 ` Eli Zaretskii
@ 2002-05-08 13:59 ` Richard Stallman
  2002-05-08 15:04   ` Kai Großjohann
  1 sibling, 1 reply; 10+ messages in thread
From: Richard Stallman @ 2002-05-08 13:59 UTC (permalink / raw)
  Cc: emacs-devel

    Emacs always uses emacs-mule for saving auto-save files.  In case a
    user happens to use C-x C-f on an auto-save file, shouldn't Emacs use
    emacs-mule, too?

Yes, it should.  Would someone like to implement that in
set-auto-coding (mule.el)?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Encoding for auto-save files
  2002-05-08 13:59 ` Richard Stallman
@ 2002-05-08 15:04   ` Kai Großjohann
  2002-05-09 14:59     ` Richard Stallman
  0 siblings, 1 reply; 10+ messages in thread
From: Kai Großjohann @ 2002-05-08 15:04 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     Emacs always uses emacs-mule for saving auto-save files.  In case a
>     user happens to use C-x C-f on an auto-save file, shouldn't Emacs use
>     emacs-mule, too?
>
> Yes, it should.  Would someone like to implement that in
> set-auto-coding (mule.el)?

Is it not enough to add an item to file-coding-system-alist?

(add-to-list 'file-coding-system-alist
             '("\\(\\`\\|/\\)#[^/]+#\\'" . emacs-mule))

kai
-- 
Silence is foo!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Encoding for auto-save files
  2002-05-08 15:04   ` Kai Großjohann
@ 2002-05-09 14:59     ` Richard Stallman
  2002-05-19 20:30       ` Kai Großjohann
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Stallman @ 2002-05-09 14:59 UTC (permalink / raw)
  Cc: emacs-devel

If that change in file-coding-system-alist does the job, that method
is fine.  Please change it by editing the definition, not by calling
add-to-list.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Encoding for auto-save files
  2002-05-09 14:59     ` Richard Stallman
@ 2002-05-19 20:30       ` Kai Großjohann
  2002-05-20  4:59         ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Kai Großjohann @ 2002-05-19 20:30 UTC (permalink / raw)


Richard Stallman <rms@gnu.org> writes:

> If that change in file-coding-system-alist does the job, that method
> is fine.  Please change it by editing the definition, not by calling
> add-to-list.

It seems that Emacs uses emacs-mule for auto-save files even if a
`coding:' tag is present in the file.  That means I should put the
pattern in auto-coding-alist instead of file-coding-system-alist.

Right?

kai
-- 
Silence is foo!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Encoding for auto-save files
  2002-05-19 20:30       ` Kai Großjohann
@ 2002-05-20  4:59         ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2002-05-20  4:59 UTC (permalink / raw)
  Cc: emacs-devel


On Sun, 19 May 2002 Kai.Grossjohann@CS.Uni-Dortmund.DE wrote:

> It seems that Emacs uses emacs-mule for auto-save files even if a
> `coding:' tag is present in the file.

True: auto-save files are always written in emacs-mule.

> That means I should put the
> pattern in auto-coding-alist instead of file-coding-system-alist.
> 
> Right?

Right.  Thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-05-20  4:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-07 15:47 Encoding for auto-save files Kai Großjohann
2002-05-07 16:33 ` Eli Zaretskii
2002-05-08  9:42   ` Kai Großjohann
2002-05-08 10:17     ` Eli Zaretskii
2002-05-08 10:58       ` Kai Großjohann
2002-05-08 13:59 ` Richard Stallman
2002-05-08 15:04   ` Kai Großjohann
2002-05-09 14:59     ` Richard Stallman
2002-05-19 20:30       ` Kai Großjohann
2002-05-20  4:59         ` Eli Zaretskii

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).