From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] trunk r114533: Revert 114527
Date: Sat, 05 Oct 2013 22:16:36 +0300 [thread overview]
Message-ID: <52506594.9010408@yandex.ru> (raw)
In-Reply-To: <8361tb7d8v.fsf@gnu.org>
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
> default-buffer-file-coding-system?
utf-8-unix
>> 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.
Scenario:
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 -*-'.
next prev parent reply other threads:[~2013-10-05 19:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1VSVZF-0008Rg-4r@vcs.savannah.gnu.org>
2013-10-05 18:43 ` [Emacs-diffs] trunk r114533: Revert 114527 Stefan Monnier
2013-10-05 18:52 ` Dmitry Gutov
2013-10-05 19:02 ` Eli Zaretskii
2013-10-05 19:16 ` Dmitry Gutov [this message]
2013-10-05 19:38 ` Eli Zaretskii
2013-10-05 20:03 ` Dmitry Gutov
2013-10-06 2:40 ` Eli Zaretskii
2013-10-06 2:44 ` Dmitry Gutov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52506594.9010408@yandex.ru \
--to=dgutov@yandex.ru \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.