From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#15535: Acknowledgement (24.3.50; basic-save-buffer should update buffer-file-coding-system value if the contents were written using different coding system) Date: Mon, 07 Oct 2013 05:52:38 +0300 Message-ID: <83mwml6bd5.fsf@gnu.org> References: <871u3z49ty.fsf@yandex.ru> <52509C0D.1000600@yandex.ru> <83vc1a5omh.fsf@gnu.org> <5251CF11.8080301@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1381114398 24774 80.91.229.3 (7 Oct 2013 02:53:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Oct 2013 02:53:18 +0000 (UTC) Cc: 15535@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 07 04:53:21 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1VT0wg-0004xe-W7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Oct 2013 04:53:19 +0200 Original-Received: from localhost ([::1]:57145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VT0wg-0008J8-DU for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Oct 2013 22:53:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VT0wY-0008Iz-Vi for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2013 22:53:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VT0wQ-0000YO-LB for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2013 22:53:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VT0wQ-0000Y2-HK for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2013 22:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VT0wQ-0006gF-8s for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2013 22:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Oct 2013 02:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15535 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15535-submit@debbugs.gnu.org id=B15535.138111437425666 (code B ref 15535); Mon, 07 Oct 2013 02:53:02 +0000 Original-Received: (at 15535) by debbugs.gnu.org; 7 Oct 2013 02:52:54 +0000 Original-Received: from localhost ([127.0.0.1]:58793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VT0wI-0006fu-HK for submit@debbugs.gnu.org; Sun, 06 Oct 2013 22:52:54 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:51097) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VT0w9-0006fe-0i for 15535@debbugs.gnu.org; Sun, 06 Oct 2013 22:52:52 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MUA003002II1O00@a-mtaout21.012.net.il> for 15535@debbugs.gnu.org; Mon, 07 Oct 2013 05:52:43 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MUA002LD2NVP3B0@a-mtaout21.012.net.il>; Mon, 07 Oct 2013 05:52:43 +0300 (IDT) In-reply-to: <5251CF11.8080301@yandex.ru> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78970 Archived-At: > Date: Sun, 06 Oct 2013 23:58:57 +0300 > From: Dmitry Gutov > CC: 15535@debbugs.gnu.org > > On 06.10.2013 19:51, Eli Zaretskii wrote: > > If the former, we could perhaps add some flag to struct undecided_spec > > and set it whenever the encoder used by `undecided' sees a non-ASCII > > character, and then use that flag to set last-coding-system-used to > > UTF-8. > > That already happens (last-coding-system-used has the right value right > after the file is written) Not here, it doesn't. I see 'undecided'. And that is part of the problem. > but I don't think I can use it: even if > `ruby-mode-set-encoding' is moved to after-save-hook, as long as it's > not the first function in this hook (and I can't ensure that it is), the > previous functions can also do some I/O and thus change > last-coding-system-used's value. You can always take the value of last-coding-system-used as the first thing you do. The problem is that the value is wrong, at least in the scenario I used to reproduce the problem.