emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How to overwrite completely a buffer with a file, with overwriting a


From: Vincent Belaïche
Subject: RE: How to overwrite completely a buffer with a file, with overwriting also the coding system ?
Date: Sat, 9 May 2009 21:04:17 +0200


I have a version 23.xxx Emacs, and I do get the message about the coding that disagree with the buffer.
I will try what you propose in this message and the next one and let you know if this solves the issue.

Thanks for the information !!

   Vincent.



> Date: Sat, 9 May 2009 10:01:15 +0300
> From: address@hidden
> To: address@hidden
> CC: address@hidden
> Subject: Re: How to overwrite completely a buffer with a file, with overwriting also the coding system ?
>
> > From: =?iso-8859-1?Q?Vincent_Bela=EFche?= <address@hidden>
> > Date: Fri, 8 May 2009 23:07:44 +0200
> >
> > When I create a new target-file from a template, emacs-template creates a buffer for this target-file, which therefore is created with the default coding-system (iso-latin-1-dos for my machine), and then emacs-template insert into this buffer the content of the template file. Now I want that the file be created with iso-latin-1-unix coding. Even though the template file contains a -*- coding: iso-latin-1-unix -*- the target file is created with dos end-of-lines.
>
> What Emacs version is this? I think Emacs 23 will ask the user for
> confirmation if the `coding:' cookie disagrees with the buffer's
> encoding.
>
> In any case, if you call the `find-auto-coding' function right after
> inserting the template, this function will tell you what encoding
> should the buffer use, taking into account the file's name and the
> `coding:' cookie. You can then set the right encoding by calling
> `set-buffer-file-coding-system'.
>
>


Découvrez toutes les possibilités de communication avec vos proches

reply via email to

[Prev in Thread] Current Thread [Next in Thread]