From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r114533: Revert 114527 Date: Sat, 05 Oct 2013 23:03:14 +0300 Message-ID: <52507082.1000901@yandex.ru> References: <52505FDE.30106@yandex.ru> <8361tb7d8v.fsf@gnu.org> <52506594.9010408@yandex.ru> <834n8v7bk3.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1381003419 14569 80.91.229.3 (5 Oct 2013 20:03:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Oct 2013 20:03:39 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 05 22:03:42 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VSY4k-0005rq-E6 for ged-emacs-devel@m.gmane.org; Sat, 05 Oct 2013 22:03:42 +0200 Original-Received: from localhost ([::1]:52862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSY4j-0006C0-EQ for ged-emacs-devel@m.gmane.org; Sat, 05 Oct 2013 16:03:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSY4c-0006BX-Hg for emacs-devel@gnu.org; Sat, 05 Oct 2013 16:03:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VSY4Y-0003Zt-AN for emacs-devel@gnu.org; Sat, 05 Oct 2013 16:03:34 -0400 Original-Received: from mail-ee0-x22f.google.com ([2a00:1450:4013:c00::22f]:44105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSY4P-0003Ya-J2; Sat, 05 Oct 2013 16:03:21 -0400 Original-Received: by mail-ee0-f47.google.com with SMTP id d49so2449019eek.34 for ; Sat, 05 Oct 2013 13:03:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=op5JkWDkE9CgaW9L2AB0vsUtVX4sCYFLspMUSWEAVmc=; b=a2GsAKhJooye0dAZj8cUmjRJX3S201wGxSkbRHAhVhw4RF9P2I5bHnyr9eZcY8g83Z i49sxKb3bzZxAQaO2IX0iyG/kfNb0gueJytw4xHsAK0oQosmNQmV5ON9ZKzIB1bY89ED PxViZgWi+SNzymRhQwYtX/110gzmsp3LLLmaLwKUwLZbLoweASvRJsWejba49WElcbE+ 6wijvsXmhPHinfumfiUDF47jbT1hcTkkus+G5KgwyyaYiPT4it/QMnicB8w0RJk8ugFJ HKrWiTyxYN8ey3v0vORYwhO0ETYjKaBwrAV/C2M4kdL9s6zIQRk2E3GL9A8t3DGj0Fv8 essg== X-Received: by 10.14.210.8 with SMTP id t8mr33232644eeo.39.1381003400503; Sat, 05 Oct 2013 13:03:20 -0700 (PDT) Original-Received: from [192.168.10.2] (93-113-74.netrun.cytanet.com.cy. [93.109.113.74]) by mx.google.com with ESMTPSA id a43sm43034966eep.9.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 05 Oct 2013 13:03:19 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 In-Reply-To: <834n8v7bk3.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163894 Archived-At: On 05.10.2013 22:38, Eli Zaretskii wrote: >> Date: Sat, 05 Oct 2013 22:16:36 +0300 >> From: Dmitry Gutov >> CC: monnier@iro.umontreal.ca, emacs-devel@gnu.org >> >> 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 -*-'. > > "Changed"? You mean, there was an existing coding: cookie in the file > before you typed the cyrillic characters? If so, what did that > original coding cookie say? No, that's a continuation of the scenario. That's what happens if I kill the modified buffer with the newly-added `# coding: undecided`, and then reopen it. The presence of the `# coding' line is not particularly important. The fact that the file has some cyrillic characters in it, however, makes the buffer open with buffer-file-coding-system `utf-8-unix'. > Also, do you see the same behavior with Emacs 24.3? Yes and no. The `ruby-mode-set-encoding' bug is there, because it uses `before-save-hook', but `buffer-file-coding-system' does change after the buffer is saved, in accordance with your preference below. So I don't need to kill and reopen the buffer. Just making another change and saving sets `coding:` comment to the right value (as long as the second change leaves at least some non-ASCII characters in the buffer). > I think it is OK to silently save the buffer with UTF-8, if that's > your default, but the value of buffer-file-coding-system should in > that case change to UTF-8. Should I file a bug, or..?