GNU bug report logs - #15535
24.3.50; basic-save-buffer should update buffer-file-coding-system value if the contents were written using different coding system

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Sat, 5 Oct 2013 22:45:02 UTC

Severity: normal

Found in version 24.3.50

Fixed in version 24.4

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Dmitry Gutov <dgutov <at> yandex.ru>
Subject: bug#15535: closed (Re: 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: Sun, 13 Oct 2013 20:44:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#15535: 24.3.50; basic-save-buffer should update buffer-file-coding-system value if the contents were written using different coding system

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 15535 <at> debbugs.gnu.org.

-- 
15535: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15535
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>, Kenichi Handa <handa <at> gnu.org>
Cc: 15535-done <at> debbugs.gnu.org
Subject: Re: 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: Sun, 13 Oct 2013 23:43:29 +0300
Version: 24.4

Fixed for me too, thanks.

[Message part 3 (message/rfc822, inline)]
From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50;
 basic-save-buffer should update buffer-file-coding-system value if
 the contents were written using different coding system
Date: Sun, 06 Oct 2013 01:44:09 +0300
Otherwise it's hard to find out which coding system was used, after all.

See here why it's useful:
http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00129.html

The following test passes in Emacs 24.3 but fails on trunk:

(ert-deftest save-buffer-updates-buffer-file-coding-system ()
  (let ((file (expand-file-name "foo" temporary-file-directory))
        (default-buffer-file-coding-system 'utf-8-unix))
    (unwind-protect
        (with-temp-buffer
          (insert "abcdef\n")
          (write-file file))
      (with-current-buffer (find-file-noselect file)
        (should (eq 'undecided (coding-system-change-eol-conversion
                                buffer-file-coding-system nil)))
        (insert "водка матрёшка селёдка")
        (save-buffer)
        ;; Fails here:
        (should (eq 'utf-8-unix buffer-file-coding-system)))
      (delete-file file))))

In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4)
 of 2013-10-04 on axl
Bzr revision: 114513 eggert <at> cs.ucla.edu-20131003161631-vox3mdtalfjg13ed
Windowing system distributor `The X.Org Foundation', version 11.0.11303000
System Description:	Ubuntu 13.04



This bug report was last modified 11 years and 227 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.