[Top][All Lists]

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

Re: [Emacs-diffs] trunk r114533: Revert 114527

From: Dmitry Gutov
Subject: Re: [Emacs-diffs] trunk r114533: Revert 114527
Date: Sat, 05 Oct 2013 22:16:36 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 05.10.2013 22:02, Eli Zaretskii wrote:
Because its value doesn't change (from the initial `undecided-unix')
even after the buffer is saved with new, non-ASCII characters.

Didn't Emacs asked you to select an encoding when you saved?

Nope, it saves the file correctly automatically.

Also, what were the non-ASCII characters,

Some cyrillic characters, for example: фывапролд

> and what is your


So far I've decided to use `select-safe-coding-system-function', but it
just adds to the mess:

Please describe the issue from the beginning, I cannot find it in the
mailing list archives.  It's hard to judge the solution without
knowing the details of the problem.

Sorry, at first I thought I had the solution (with last-coding-system-used), so I didn't start the discussion.


1. Open an .rb file, written in ASCII (buffer-file-coding-system will be undecided-unix). 2. Switch to the Russian layout (usually that happens by accident, but sometimes even on purpose, according to my colleagues), type some text in Russian, press `C-x C-s'. 3. The file is saved fine, but buffer-file-coding-system is still undecided-unix. And `ruby-mode-set-encoding', from before-save-hook, has inserted `# coding: undecided' at the beginning of the file.

If I kill the buffer, then open the file again, buffer-file-coding-system is now utf-8-unix. If I make a modification and save the buffer now, the first line is changed to the correct `# -*- coding: utf-8 -*-'.

reply via email to

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