From unknown Mon Jun 23 23:48:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#4533 <4533@debbugs.gnu.org> To: bug#4533 <4533@debbugs.gnu.org> Subject: Status: 23.1: reverting fails to update line ending mode line Reply-To: bug#4533 <4533@debbugs.gnu.org> Date: Tue, 24 Jun 2025 06:48:12 +0000 retitle 4533 23.1: reverting fails to update line ending mode line reassign 4533 emacs submitter 4533 Benjamin Peterson severity 4533 normal thanks From musiccomposition@gmail.com Tue Sep 22 19:01:44 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Sep 2009 02:01:44 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8N21gS8017854 for ; Tue, 22 Sep 2009 19:01:43 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqHAs-0007TV-66 for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2009 22:01:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqHAn-0007RR-BT for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2009 22:01:41 -0400 Received: from [199.232.76.173] (port=56866 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqHAn-0007RL-7x for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2009 22:01:37 -0400 Received: from mail-yw0-f194.google.com ([209.85.211.194]:52870) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqHAm-00081S-L9 for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2009 22:01:36 -0400 Received: by ywh32 with SMTP id 32so394432ywh.14 for ; Tue, 22 Sep 2009 19:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=iS3MOAUsqS9oc4D5laIC+awm/vaISZnNMn2JPkUwNSU=; b=sXyo37Uj20TbtMl8hr1U44YQSAjZZm9zjHfeAZWR2/tHFNcGsQY0hmp92uCv35eMfC +X24M889fEC9L8Xs4atPNWMLB/L4bpGEyCVhoGyD5CpCnQPQiBUw1Y+Mx6Jx/OvAwpXl yqyQXlgwWNf8YeMaoNqjE35e+sUuOn1uukM8M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=unlCYlsJmQqUfxyiXw92XDw/zFokLhIjilm4K292YwSLIo/Qf+EenIV5qh3m0+oo2k 4fSBFkANahuPFDTYYmCM20YHlMtMH4BQUUHmlwvxQR02O5dbxn4ISZXdNTqfIFwaHQJA RaRKKK82O5Whrpy41iCwPjzPVMPBhy2oaDW04= MIME-Version: 1.0 Sender: musiccomposition@gmail.com Received: by 10.90.174.7 with SMTP id w7mr994983age.11.1253671291410; Tue, 22 Sep 2009 19:01:31 -0700 (PDT) Date: Tue, 22 Sep 2009 21:01:31 -0500 X-Google-Sender-Auth: 3161eb516f81e56d Message-ID: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> Subject: 23.1: reverting fails to update line ending mode line From: Benjamin Peterson To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) I had a buffer with a mode line like this: - U:(DOS) I ran dos2unix on the file, and did M-x revert-buffer. The DOS stayed in the mode line until I killed the buffer and revisited the buffer. In GNU Emacs 23.1.1 (x86_64-pc-linux-gnu) of 2009-09-07 on benjamin Windowing system distributor `The X.Org Foundation', version 11.0.10503000 configured using `configure '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23' '--with-sound' '--with-x' '--without-toolkit-scroll-bars' '--without-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--with-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=no' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-O2 -pipe' 'LDFLAGS=-Wl,-O1'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default-enable-multibyte-characters: t Major mode: Python Minor modes in effect: show-paren-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: n i c o d e C-s C-s C-s C-s C-s C-s C-s C-x b M-v M-v M-v M-v C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n C-n C-n C-n C-n C-n C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-p C-p C-p C-p C-p C-p C-p C-f C-f c l a s s SPC _ u n i c o d e ( s t r ) : p a s s C-x C-s C-v C-v C-v C-v C-v C-v C-v M-v M-v M-v C-x b _ C-x C-s M-v C-v C-n C-n C-n C-n C-n C-n C-n C-p # SPC S D p y . t e s t . s k i p ( " w i l l SPC r e w r i t e " ) C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n p y . t e s t . s k i p ( " w i l l SPC r e w r i t e " ) C-x C-s M-x r e v e r t - u f b u f y M-v M-v M-v f r C-x k C-x C-f t e s t - s e r _ s e r C-v C-v C-v M-v M-v M-x r e p o r t - e m Recent messages: Local value of py-indent-offset set to 4 Using the CPython shell test_serializer.py changed on disk; really edit the buffer? (y, n, r or C-h) Fontifying test_serializer.py... (regexps............) Local value of py-indent-offset set to 4 Using the CPython shell byte-code: File reverted: /home/benjamin/dev/repos/pylib/test_serializer.py Fontifying test_serializer.py... (regexps............) Local value of py-indent-offset set to 4 Using the CPython shell call-interactively: End of buffer From rgm@gnu.org Fri Oct 2 17:16:52 2009 Received: (at 4533) by emacsbugs.donarmstrong.com; 3 Oct 2009 00:16:52 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-7.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n930GoBb029061 for <4533@emacsbugs.donarmstrong.com>; Fri, 2 Oct 2009 17:16:52 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MtsIs-0003SX-AY; Fri, 02 Oct 2009 20:16:50 -0400 From: Glenn Morris To: Benjamin Peterson Cc: 4533@debbugs.gnu.org Subject: Re: bug#4533: 23.1: reverting fails to update line ending mode line References: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> X-Spook: INSCOM Lon Horiuchi USCOI insurgency asset BLU-114/B X-Ran: R)CcTsqEsrPn_.XF"]h2yZ2^{]fNtnOYbtXi.@DEPmQ]wuawfpur}C3clyme%/,+s3Vm:w X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 02 Oct 2009 20:16:50 -0400 In-Reply-To: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> (Benjamin Peterson's message of "Tue, 22 Sep 2009 21:01:31 -0500") Message-ID: <288wftcowd.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Benjamin Peterson wrote: > I had a buffer with a mode line like this: > > - U:(DOS) > > I ran dos2unix on the file, and did M-x revert-buffer. > > The DOS stayed in the mode line until I killed the buffer and > revisited the buffer. I have not been able to reproduce this. From rgm@gnu.org Fri Oct 2 17:15:07 2009 Received: (at control) by emacsbugs.donarmstrong.com; 3 Oct 2009 00:15:07 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.5 required=4.0 tests=AWL,ONEWORD,VALID_BTS_CONTROL, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n930F5Nc028519 for ; Fri, 2 Oct 2009 17:15:06 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MtsHB-0002df-2y; Fri, 02 Oct 2009 20:15:05 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19142.38793.26660.496725@fencepost.gnu.org> Date: Fri, 2 Oct 2009 20:15:05 -0400 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: yellow X-Ran: `1HVlPAe]oX58p&Mww>"vcHF148BX1RE=klf?{tlYoKADa1BE*zv; Sun, 1 Nov 2009 09:07:42 -0800 Received: from BLU129-W14 ([65.55.111.71]) by blu0-omc2-s1.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 1 Nov 2009 09:07:36 -0800 Message-ID: Content-Type: multipart/alternative; boundary="_c7da0dc3-10d1-45c0-9188-41943cdd92fe_" X-Originating-IP: [71.182.160.22] From: Jack Tanner To: <4533@debbugs.gnu.org> CC: Subject: i can reproduce this Date: Sun, 1 Nov 2009 12:07:36 -0500 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 01 Nov 2009 17:07:36.0375 (UTC) FILETIME=[CF4B7470:01CA5B15] --_c7da0dc3-10d1-45c0-9188-41943cdd92fe_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Emacs 23.1.1 i386-mingw-nt5.1.2600 (from ftp.gnu.org) on WinXP SP3. - Start emacs -Q . - C-x C-f ~/foo.txt=2C creating a new file. - Enter text:=20 Line 1 Line 2 - C-x C-s. - dos2unix ~/foo.txt - M-x revert-buffer Nothing changes in the mode line. Mousing over the \ in -1\--- shows "End-o= f-line style: DOS-style CRLF". - C-x k RET - C-x C-f ~/foo.txt Mode line shows --(Unix)---. =20 _________________________________________________________________ Bing brings you maps=2C menus=2C and reviews organized in one place. http://www.bing.com/search?q=3Drestaurants&form=3DMFESRP&publ=3DWLHMTAG&cre= a=3DTEXT_MFESRP_Local_MapsMenu_Resturants_1x1= --_c7da0dc3-10d1-45c0-9188-41943cdd92fe_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Emacs 23.1.1 i386-mingw-nt5.1.2600 (from ftp.gnu.org) on WinXP SP3.
- Start emacs -Q .
- C-x C-f ~/foo.txt=2C creating a new file.
-= Enter text:
Line 1
Line 2

- C-x C-s.
- dos2unix ~/foo.txt=
- M-x revert-buffer
Nothing changes in the mode line. Mousing over t= he \ in -1\--- shows "End-of-line style: DOS-style CRLF".
- C-x k RET- C-x C-f ~/foo.txt
Mode line shows --(Unix)---.
<= br />
Bing brings you maps=2C menus=2C and reviews organized in one pl= ace. Try it now. = --_c7da0dc3-10d1-45c0-9188-41943cdd92fe_-- From rgm@gnu.org Mon Nov 2 00:11:20 2009 Received: (at 4533) by emacsbugs.donarmstrong.com; 2 Nov 2009 08:11:20 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-8.3 required=4.0 tests=AWL,HAS_BUG_NUMBER, VALID_BTS_CONTROL,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA28BJdc019595; Mon, 2 Nov 2009 00:11:20 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1N4s0T-000432-3t; Mon, 02 Nov 2009 03:11:17 -0500 From: Glenn Morris To: Jack Tanner Cc: 4533@debbugs.gnu.org Subject: Re: bug#4533: i can reproduce this References: X-Spook: CDC FIPS140 AK-47 BCCI Jyllandsposten cypherpunk X-Ran: 3$_IpzVjR>Ob>5IP;JwlA, (Jack Tanner's message of "Sun, 1 Nov 2009 12:07:36 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii tags 4533 = stop Jack Tanner wrote: > - Start emacs -Q . > - C-x C-f ~/foo.txt, creating a new file. > - Enter text: > Line 1 > Line 2 > > - C-x C-s. > - dos2unix ~/foo.txt > - M-x revert-buffer Thanks for the recipe. Saving the file was the missing step. The issue seems to be that saving a file causes basic-save-buffer-1 to set buffer-file-coding-system-explicit. Eg for me on GNU/Linux, it is set to (iso-latin-1-unix). revert-buffer uses this to set coding-system-for-read before it inserts the file contents. So the change in line ending is ignored. If I manually set buffer-file-coding-system-explicit to nil before reverting the buffer, the change in line ending is noticed. I don't know what the right fix is though. From rgm@gnu.org Mon Nov 2 00:57:16 2009 Received: (at 4533) by emacsbugs.donarmstrong.com; 2 Nov 2009 08:57:16 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-7.3 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA28vF2g025597 for <4533@emacsbugs.donarmstrong.com>; Mon, 2 Nov 2009 00:57:16 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1N4siw-0006vd-GV; Mon, 02 Nov 2009 03:57:14 -0500 From: Glenn Morris To: 4533@debbugs.gnu.org Subject: Re: bug#4533: reverting fails to update line ending mode line References: X-Spook: warfare fraud ISEC virus Zachawi crypto anarchy Arnett X-Ran: iua2"KU!nr[8&tq1GUS{e}`kusg1Nt/|-];7#<43f[4=r$8XS&pnQU4noJ7ey.iW{,y`&1 X-Hue: red X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 02 Nov 2009 03:57:14 -0500 In-Reply-To: (Glenn Morris's message of "Mon, 02 Nov 2009 03:11:16 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii But http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1039#42 seems to say this is a feature? But, the problem is the case that you load "hello" by explicitly specifying dos coding system, or you once save the file by dos coding sytem before reverting. In this case, Emacs respects your specification, and thus revert-buffer loads the file as dos coding system, which results in seeing many CR charaters in the above case. We think this behaviour is not a bug but a feature. From rgm@gnu.org Wed Nov 4 19:28:42 2009 Received: (at 4533) by emacsbugs.donarmstrong.com; 5 Nov 2009 03:28:42 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-7.3 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA53SeUu010594 for <4533@emacsbugs.donarmstrong.com>; Wed, 4 Nov 2009 19:28:42 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1N5t1b-0004T0-UE; Wed, 04 Nov 2009 22:28:39 -0500 From: Glenn Morris To: Kenichi Handa Subject: Re: bug#4533: reverting fails to update line ending mode line References: cc: 4533@debbugs.gnu.org X-Spook: Semtex global Crypto AG United Nations Dick Cheney Bosnia X-Ran: ovl^%aQ.r|=iV)9$~V+}NQ`w(`1;.a_\pp5h{KK`/ X-Hue: black X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 04 Nov 2009 22:28:39 -0500 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi, Could you comment on this http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4533#15 (it seems related to your final comment in bug#1039) The behaviour in this case seems odd to me, given that the coding system is never explicitly specified. From handa@m17n.org Wed Nov 4 20:17:15 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 5 Nov 2009 04:17:15 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, IMPRONONCABLE_2 autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA54HEKO015089 for ; Wed, 4 Nov 2009 20:17:15 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5tmc-0004j7-0Y for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2009 23:17:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5tmV-0004he-QS for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2009 23:17:12 -0500 Received: from [199.232.76.173] (port=54853 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5tmV-0004hX-Mx for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2009 23:17:07 -0500 Received: from mx1.aist.go.jp ([150.29.246.133]:59769) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N5tmV-0007P9-4G for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2009 23:17:07 -0500 Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id nA54H1ja012999; Thu, 5 Nov 2009 13:17:01 +0900 (JST) env-from (handa@m17n.org) Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id nA54H1mY021377; Thu, 5 Nov 2009 13:17:01 +0900 (JST) env-from (handa@m17n.org) Received: by smtp4.aist.go.jp with ESMTP id nA54H0cc011347; Thu, 5 Nov 2009 13:17:00 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1N5tmO-00012G-E7; Thu, 05 Nov 2009 13:17:00 +0900 From: Kenichi Handa To: Benjamin Peterson , 4533@debbugs.gnu.org Cc: bug-gnu-emacs@gnu.org Subject: Re: bug#4533: 23.1: reverting fails to update line ending mode line In-Reply-To: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> (message from Benjamin Peterson on Tue, 22 Sep 2009 21:01:31 -0500) References: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> Date: Thu, 05 Nov 2009 13:17:00 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Solaris 9 In article <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com>, Benjamin Peterson writes: > I had a buffer with a mode line like this: > - U:(DOS) > I ran dos2unix on the file, and did M-x revert-buffer. > The DOS stayed in the mode line until I killed the buffer and > revisited the buffer. I found that insert-file-contents forgets to update buffer-file-coding-system in case of replace. I've just installed a fix. --- Kenichi Handa handa@m17n.org From handa@m17n.org Wed Nov 4 20:18:52 2009 Received: (at 4533) by emacsbugs.donarmstrong.com; 5 Nov 2009 04:18:53 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=AWL,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA54IpBX015103 for <4533@emacsbugs.donarmstrong.com>; Wed, 4 Nov 2009 20:18:52 -0800 Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id nA54Ioao013807; Thu, 5 Nov 2009 13:18:50 +0900 (JST) env-from (handa@m17n.org) Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id nA54IoDg021636; Thu, 5 Nov 2009 13:18:50 +0900 (JST) env-from (handa@m17n.org) Received: by smtp4.aist.go.jp with ESMTP id nA54InXD012166; Thu, 5 Nov 2009 13:18:49 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1N5to9-00015l-PA; Thu, 05 Nov 2009 13:18:49 +0900 From: Kenichi Handa To: Glenn Morris Cc: 4533@debbugs.gnu.org Subject: Re: bug#4533: reverting fails to update line ending mode line In-Reply-To: (message from Glenn Morris on Wed, 04 Nov 2009 22:28:39 -0500) References: Date: Thu, 05 Nov 2009 13:18:49 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In article , Glenn Morris writes: > Could you comment on this > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4533#15 I've just installed a fix, and replied to the above message. > (it seems related to your final comment in bug#1039) I don't think so. As I wrote in the mail, it's a simple bug in insert-file-contents. --- Kenichi Handa handa@m17n.org From rgm@gnu.org Thu Nov 5 10:47:52 2009 Received: (at 4533) by emacsbugs.donarmstrong.com; 5 Nov 2009 18:47:52 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-7.3 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA5IlpNh031561 for <4533@emacsbugs.donarmstrong.com>; Thu, 5 Nov 2009 10:47:52 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1N67N7-0002EF-Qo; Thu, 05 Nov 2009 13:47:49 -0500 From: Glenn Morris To: Kenichi Handa Cc: 4533@debbugs.gnu.org Subject: Re: bug#4533: reverting fails to update line ending mode line References: X-Spook: supercomputer Albanian gamma Cohiba ammunition Mena X-Ran: 45AxeSy)frSG6f\-vezs0hp%:D#CxGPhwntB!$"3 X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 05 Nov 2009 13:47:49 -0500 In-Reply-To: (Kenichi Handa's message of "Thu, 05 Nov 2009 13:18:49 +0900") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Kenichi Handa wrote: >> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4533#15 > > I've just installed a fix, and replied to the above message. Thanks, but it makes no difference for me on GNU/Linux. I use the same recipe as in the above message, but with "unix2dos" instead of "dos2unix". I just get "^M" appearing at the ends of lines on reverting. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 17:22:33 2010 Received: (at 4533) by debbugs.gnu.org; 13 Nov 2010 22:22:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHOUT-0006Mh-Fd for submit@debbugs.gnu.org; Sat, 13 Nov 2010 17:22:33 -0500 Received: from pantheon-po16.its.yale.edu ([130.132.50.72]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHOUR-0006Mc-3y for 4533@debbugs.gnu.org; Sat, 13 Nov 2010 17:22:31 -0500 Received: from furball (c-71-192-165-84.hsd1.ct.comcast.net [71.192.165.84]) (authenticated bits=0) by pantheon-po16.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id oADMRM2r032453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 13 Nov 2010 17:27:23 -0500 Received: by furball (Postfix, from userid 1000) id 485B4160750; Sat, 13 Nov 2010 17:27:18 -0500 (EST) From: Chong Yidong To: Kenichi Handa Subject: Re: 23.1: reverting fails to update line ending mode line Date: Sat, 13 Nov 2010 17:27:18 -0500 Message-ID: <87mxpcc115.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 4533 Cc: 4533@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) > - Start emacs -Q . > - C-x C-f ~/foo.txt, creating a new file. > - Enter text: > Line 1 > Line 2 > > - C-x C-s. > - dos2unix ~/foo.txt > - M-x revert-buffer > - C-x k RET > - C-x C-f ~/foo.txt > Mode line shows --(Unix)--- The problem is that `C-x C-s' sets buffer-file-coding-system-explicit. This causes revert-buffer to set coding-system-for-read to that value (which is now incorrect) when inserting the file contents. This is why the revert goes correctly if you omit the `C-x C-s' step. I think the use of buffer-file-coding-system-explicit in revert-buffer is bogus, and should be removed---see below. What do you think? *** lisp/files.el 2010-11-11 22:19:01 +0000 --- lisp/files.el 2010-11-13 22:22:01 +0000 *************** *** 4906,4916 **** (let ((coding-system-for-read ;; Auto-saved file should be read by Emacs' ;; internal coding. ! (if auto-save-p 'auto-save-coding ! (or coding-system-for-read ! (and ! buffer-file-coding-system-explicit ! (car buffer-file-coding-system-explicit)))))) (if (and (not enable-multibyte-characters) coding-system-for-read (not (memq (coding-system-base --- 4906,4914 ---- (let ((coding-system-for-read ;; Auto-saved file should be read by Emacs' ;; internal coding. ! (if auto-save-p ! 'auto-save-coding ! coding-system-for-read))) (if (and (not enable-multibyte-characters) coding-system-for-read (not (memq (coding-system-base From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 04:46:24 2010 Received: (at 4533) by debbugs.gnu.org; 14 Nov 2010 09:46:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHZAG-0003Ai-Ke for submit@debbugs.gnu.org; Sun, 14 Nov 2010 04:46:24 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHZAE-0003Ad-22 for 4533@debbugs.gnu.org; Sun, 14 Nov 2010 04:46:22 -0500 Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PHZEv-0005Tf-LV; Sun, 14 Nov 2010 04:51:13 -0500 From: Eli Zaretskii To: Chong Yidong In-reply-to: <87mxpcc115.fsf@stupidchicken.com> (message from Chong Yidong on Sat, 13 Nov 2010 17:27:18 -0500) Subject: Re: bug#4533: 23.1: reverting fails to update line ending mode line References: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> <87mxpcc115.fsf@stupidchicken.com> Message-Id: Date: Sun, 14 Nov 2010 04:51:13 -0500 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 4533 Cc: 4533@debbugs.gnu.org, handa@m17n.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > From: Chong Yidong > Date: Sat, 13 Nov 2010 17:27:18 -0500 > Cc: 4533@debbugs.gnu.org > > > - Start emacs -Q . > > - C-x C-f ~/foo.txt, creating a new file. > > - Enter text: > > Line 1 > > Line 2 > > > > - C-x C-s. > > - dos2unix ~/foo.txt > > - M-x revert-buffer > > - C-x k RET > > - C-x C-f ~/foo.txt > > Mode line shows --(Unix)--- > > The problem is that `C-x C-s' sets buffer-file-coding-system-explicit. > This causes revert-buffer to set coding-system-for-read to that value > (which is now incorrect) when inserting the file contents. This is why > the revert goes correctly if you omit the `C-x C-s' step. Why is this a real problem? I can handle this situation with C-x RET c undecided RET M-x revert-buffer RET (Perhaps "C-x RET r" should be fixed to do the same, when given `undecided' as the encoding.) > I think the use of buffer-file-coding-system-explicit in revert-buffer > is bogus, and should be removed---see below. What do you think? I'm not sure it's bogus. Why do you think so? Perhaps Handa-san remembers why this variable was introduced in the first place. I'm sure it was to solve some real-life problems. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 12:27:54 2010 Received: (at 4533) by debbugs.gnu.org; 14 Nov 2010 17:27:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHgMs-0006wD-4C for submit@debbugs.gnu.org; Sun, 14 Nov 2010 12:27:54 -0500 Received: from pantheon-po26.its.yale.edu ([130.132.50.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHgMq-0006w7-4X for 4533@debbugs.gnu.org; Sun, 14 Nov 2010 12:27:52 -0500 Received: from furball (dhcp128036226184.central.yale.edu [128.36.226.184]) (authenticated bits=0) by pantheon-po26.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id oAEHWkWW014733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 14 Nov 2010 12:32:46 -0500 Received: by furball (Postfix, from userid 1000) id D227A16055F; Sun, 14 Nov 2010 12:32:45 -0500 (EST) From: Chong Yidong To: Eli Zaretskii Subject: Re: bug#4533: 23.1: reverting fails to update line ending mode line References: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> <87mxpcc115.fsf@stupidchicken.com> Date: Sun, 14 Nov 2010 12:32:45 -0500 In-Reply-To: (Eli Zaretskii's message of "Sun, 14 Nov 2010 04:51:13 -0500") Message-ID: <87oc9r7qv6.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 4533 Cc: 4533@debbugs.gnu.org, handa@m17n.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Eli Zaretskii writes: > Why is this a real problem? I can handle this situation with > > C-x RET c undecided RET M-x revert-buffer RET Sure; you can also kill the buffer and visit the file again with C-x C-f, making the revert-buffer command redundant. That's not really the point. The fact that revert-buffer correctly changes the coding system if you do one thing (i.e. visit the file but haven't yet saved), and does another thing if you do another (i.e. save some changes first) indicates that this is a real bug. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 15:18:20 2010 Received: (at 4533) by debbugs.gnu.org; 14 Nov 2010 20:18:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHj1n-0000U9-RY for submit@debbugs.gnu.org; Sun, 14 Nov 2010 15:18:20 -0500 Received: from mail-yx0-f172.google.com ([209.85.213.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHj1l-0000U4-K0 for 4533@debbugs.gnu.org; Sun, 14 Nov 2010 15:18:18 -0500 Received: by yxs7 with SMTP id 7so539602yxs.3 for <4533@debbugs.gnu.org>; Sun, 14 Nov 2010 12:23:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ae7n9tSmzzLZbvomFIsRG5tvA9jjnN/thcQ3HMsJ6tw=; b=Y+sBx7hjDr5Wmk3J07VmtnAZ4zrMqoW2S5RobQgCbGEpN8x1rgNkZ9E8UDSr3SEx6y raNWbqYYom1FFOqIqMebPXsyFtnRxU/3yl2RRsKhn3MPtw7NKRqH2CTBLyspu9+cLsYw g+R23nEDnMohrpN1bZlo9BCQWyXAQCsaKk5hY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=SmKCAAH5FV0lOGSkPKzEbNIApuB3ScAK1EX65823/aPEeyG47UTRBA2Knu+ptR0t+P oCNfoQv5V3Imq16fkbiqMudeCjJEfEZRU/RSdwvmfJwYL4//+yYDsRUvR19ahNDfX+mQ +deg+lFMGy/1dKWIhV8qMjApXwAbWWjkb3Ets= MIME-Version: 1.0 Received: by 10.90.7.15 with SMTP id 15mr6764755agg.13.1289766192074; Sun, 14 Nov 2010 12:23:12 -0800 (PST) Received: by 10.90.227.16 with HTTP; Sun, 14 Nov 2010 12:23:12 -0800 (PST) In-Reply-To: <87oc9r7qv6.fsf@stupidchicken.com> References: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> <87mxpcc115.fsf@stupidchicken.com> <87oc9r7qv6.fsf@stupidchicken.com> Date: Sun, 14 Nov 2010 21:23:12 +0100 Message-ID: Subject: Re: bug#4533: 23.1: reverting fails to update line ending mode line From: Dani Moncayo To: Chong Yidong Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 4533 Cc: Eli Zaretskii , 4533@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.1 (---) On Sun, Nov 14, 2010 at 6:32 PM, Chong Yidong wrote= : > Eli Zaretskii writes: > >> Why is this a real problem? =A0I can handle this situation with >> >> =A0 =A0 C-x RET c undecided RET M-x revert-buffer RET > > Sure; you can also kill the buffer and visit the file again with > C-x C-f, making the revert-buffer command redundant. =A0That's not really > the point. > > The fact that revert-buffer correctly changes the coding system if you > do one thing (i.e. visit the file but haven't yet saved), and does > another thing if you do another (i.e. save some changes first) indicates > that this is a real bug. > Isn't this bug a duplicated from bug #7383? (Actually, bug #7383 is about two different problems) From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 15:41:23 2010 Received: (at 4533) by debbugs.gnu.org; 14 Nov 2010 20:41:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHjO7-0000da-Gn for submit@debbugs.gnu.org; Sun, 14 Nov 2010 15:41:23 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHjO4-0000dT-Fc for 4533@debbugs.gnu.org; Sun, 14 Nov 2010 15:41:21 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LBW00C006X23R00@a-mtaout20.012.net.il> for 4533@debbugs.gnu.org; Sun, 14 Nov 2010 22:45:53 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.249.126]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LBW00BJS70G18D0@a-mtaout20.012.net.il>; Sun, 14 Nov 2010 22:45:53 +0200 (IST) Date: Sun, 14 Nov 2010 22:46:01 +0200 From: Eli Zaretskii Subject: Re: bug#4533: 23.1: reverting fails to update line ending mode line In-reply-to: X-012-Sender: halo1@inter.net.il To: Dani Moncayo Message-id: <83pqu7d46u.fsf@gnu.org> References: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> <87mxpcc115.fsf@stupidchicken.com> <87oc9r7qv6.fsf@stupidchicken.com> X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 4533 Cc: cyd@stupidchicken.com, 4533@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > Date: Sun, 14 Nov 2010 21:23:12 +0100 > From: Dani Moncayo > Cc: Eli Zaretskii , 4533@debbugs.gnu.org > > Isn't this bug a duplicated from bug #7383? (Actually, bug #7383 is > about two different problems) How can bug #4533 be a duplicate of #7383? Is someone able of predicting the future? If so, I'd like to consult him/her about my stocks. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 15:50:41 2010 Received: (at 4533) by debbugs.gnu.org; 14 Nov 2010 20:50:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHjX7-0000hp-EA for submit@debbugs.gnu.org; Sun, 14 Nov 2010 15:50:41 -0500 Received: from mail-gy0-f172.google.com ([209.85.160.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHjX6-0000hk-NU for 4533@debbugs.gnu.org; Sun, 14 Nov 2010 15:50:41 -0500 Received: by gyh20 with SMTP id 20so2456803gyh.3 for <4533@debbugs.gnu.org>; Sun, 14 Nov 2010 12:55:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=S7DD7rwTof0CjOa0MxQm456ioQ15N8gFl/2ZwJhH6wg=; b=xGxCCNBXIyp2D3x9ZxlNEG1JyArmUjPjyY2pnX8Pp1YKF+tEl5o5jcXPAE2Pl+ChgN l/zPhYG0maU2xGGW6EHJU2lCtHYhdxpVVNn0prsduqavuPGgFa2716w5bpb9Jap+9qT9 ncyeLWKQLYOh6f1AS7Jxo166bhasB9LhRQgrc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=wekqmAQKmgVlS6AlFTFpR0gdvuUOXKFtwS9wt/QMKV4FNpjFMDkac8+ASYghfopwtP TSpWZorJAu81XoCyxTkcOOBH+MO0Tw3Z9v8KKacbFxrujBnwmHbsOPsiJ41GSYmHmvim vfl9tnWJchPmxR0QxhWu5zPjJWIZMOcaxG/dQ= MIME-Version: 1.0 Received: by 10.91.42.23 with SMTP id u23mr6739608agj.67.1289768134386; Sun, 14 Nov 2010 12:55:34 -0800 (PST) Received: by 10.90.227.16 with HTTP; Sun, 14 Nov 2010 12:55:34 -0800 (PST) In-Reply-To: <83pqu7d46u.fsf@gnu.org> References: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> <87mxpcc115.fsf@stupidchicken.com> <87oc9r7qv6.fsf@stupidchicken.com> <83pqu7d46u.fsf@gnu.org> Date: Sun, 14 Nov 2010 21:55:34 +0100 Message-ID: Subject: Re: bug#4533: 23.1: reverting fails to update line ending mode line From: Dani Moncayo To: Eli Zaretskii Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 4533 Cc: cyd@stupidchicken.com, 4533@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.1 (---) On Sun, Nov 14, 2010 at 9:46 PM, Eli Zaretskii wrote: >> Date: Sun, 14 Nov 2010 21:23:12 +0100 >> From: Dani Moncayo >> Cc: Eli Zaretskii , 4533@debbugs.gnu.org >> >> Isn't this bug a duplicated from bug #7383? (Actually, bug #7383 is >> about two different problems) > > How can bug #4533 be a duplicate of #7383? =A0Is someone able of > predicting the future? =A0If so, I'd like to consult him/her about my > stocks. > Yes, the numbering is strange. I noticed that. But check the shipment dates. Which bug was filed earlier? From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 16:42:50 2010 Received: (at 4533) by debbugs.gnu.org; 14 Nov 2010 21:42:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHkLZ-0001AR-Qn for submit@debbugs.gnu.org; Sun, 14 Nov 2010 16:42:49 -0500 Received: from mail-yw0-f44.google.com ([209.85.213.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHkLX-0001AK-Pb for 4533@debbugs.gnu.org; Sun, 14 Nov 2010 16:42:48 -0500 Received: by ywp6 with SMTP id 6so2834725ywp.3 for <4533@debbugs.gnu.org>; Sun, 14 Nov 2010 13:47:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=J2gIxYPWxdgiJO0C1oggslYABMQoTLht9DwZmIcD9iw=; b=KXvWIpHscSot1+mU2r/IuIWC21H3xdw78iJwt26GUeo3vMz7jKjpSc1OkjOucza81X 2T07yOmAbCMP8Il0o3ubPRQim6GI9JFMw3OApWMIZmv1QTqBTNhQWif3YWO42fLjWC/W 1xEFP5OFpzDysEr5UD7+obD65sSYEw5Eb3x0g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=KcVbBvknspZ38w/G7PXbKj45DdFXxBXYdvQV5//Q48zNsNlF4xQsnjU+wXFwdN2fcS h8xCFlrWfdg9nAk9zcoaM4nbuA1cCbK8TPsfJRucc2tlq5oIt9NMd3FRCZrkl7z4Q6y3 5yb+HMQEorS1YdxpPxUDp8YfMjgbsQFDYEBRY= MIME-Version: 1.0 Received: by 10.91.11.3 with SMTP id o3mr6793507agi.148.1289771262293; Sun, 14 Nov 2010 13:47:42 -0800 (PST) Received: by 10.90.227.16 with HTTP; Sun, 14 Nov 2010 13:47:42 -0800 (PST) In-Reply-To: References: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> <87mxpcc115.fsf@stupidchicken.com> <87oc9r7qv6.fsf@stupidchicken.com> <83pqu7d46u.fsf@gnu.org> Date: Sun, 14 Nov 2010 22:47:42 +0100 Message-ID: Subject: Re: bug#4533: 23.1: reverting fails to update line ending mode line From: Dani Moncayo To: Eli Zaretskii Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 4533 Cc: cyd@stupidchicken.com, 4533@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.1 (---) On Sun, Nov 14, 2010 at 9:55 PM, Dani Moncayo wrote: > On Sun, Nov 14, 2010 at 9:46 PM, Eli Zaretskii wrote: >>> Date: Sun, 14 Nov 2010 21:23:12 +0100 >>> From: Dani Moncayo >>> Cc: Eli Zaretskii , 4533@debbugs.gnu.org >>> >>> Isn't this bug a duplicated from bug #7383? (Actually, bug #7383 is >>> about two different problems) >> >> How can bug #4533 be a duplicate of #7383? =A0Is someone able of >> predicting the future? =A0If so, I'd like to consult him/her about my >> stocks. >> > > Yes, the numbering is strange. I noticed that. But check the shipment > dates. Which bug was filed earlier? > Ooops, I'm sorry. I don't know how I searched the bugs archives. #4533 it a lot older than #7383. But both are related bugs. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 11:46:45 2010 Received: (at 4533) by debbugs.gnu.org; 15 Nov 2010 16:46:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PI2Cb-0000sO-O0 for submit@debbugs.gnu.org; Mon, 15 Nov 2010 11:46:45 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PI2CW-0000sI-Ut for 4533@debbugs.gnu.org; Mon, 15 Nov 2010 11:46:44 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0GACPz4ExFpY76/2dsb2JhbAChWn9yvl6FSgSEWo1f X-IronPort-AV: E=Sophos;i="4.59,200,1288584000"; d="scan'208";a="82594208" Received: from 69-165-142-250.dsl.teksavvy.com (HELO pastel.home) ([69.165.142.250]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 15 Nov 2010 11:51:36 -0500 Received: by pastel.home (Postfix, from userid 20848) id 8C816A8263; Mon, 15 Nov 2010 11:51:36 -0500 (EST) From: Stefan Monnier To: Chong Yidong Subject: Re: bug#4533: 23.1: reverting fails to update line ending mode line Message-ID: References: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> <87mxpcc115.fsf@stupidchicken.com> Date: Mon, 15 Nov 2010 11:51:36 -0500 In-Reply-To: <87mxpcc115.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 13 Nov 2010 17:27:18 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 4533 Cc: 4533@debbugs.gnu.org, Kenichi Handa X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > I think the use of buffer-file-coding-system-explicit in revert-buffer > is bogus, and should be removed---see below. What do you think? Its use is not bogus. It's so that when a file's coding-system is incorrectly auto-detected, the user can force the use of a correct coding-system and subsequent revert-buffers won't disregard it. So maybe the problem is that C-x C-s should not set buffer-file-coding-system-explicit (unless the C-x C-s prompted the user to choose a coding-system, I guess). Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 12:22:46 2010 Received: (at 4533) by debbugs.gnu.org; 15 Nov 2010 17:22:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PI2lS-000177-4z for submit@debbugs.gnu.org; Mon, 15 Nov 2010 12:22:46 -0500 Received: from pantheon-po41.its.yale.edu ([130.132.50.98]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PI2lP-000171-Ap for 4533@debbugs.gnu.org; Mon, 15 Nov 2010 12:22:43 -0500 Received: from furball (dhcp128036014113.central.yale.edu [128.36.14.113]) (authenticated bits=0) by pantheon-po41.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id oAFHReBq009580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 15 Nov 2010 12:27:40 -0500 Received: by furball (Postfix, from userid 1000) id 3F8FD1605A6; Mon, 15 Nov 2010 12:27:39 -0500 (EST) From: Chong Yidong To: Stefan Monnier Subject: Re: bug#4533: 23.1: reverting fails to update line ending mode line References: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> <87mxpcc115.fsf@stupidchicken.com> Date: Mon, 15 Nov 2010 12:27:39 -0500 In-Reply-To: (Stefan Monnier's message of "Mon, 15 Nov 2010 11:51:36 -0500") Message-ID: <87bp5qbipg.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 4533 Cc: 4533@debbugs.gnu.org, Kenichi Handa X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Stefan Monnier writes: >> I think the use of buffer-file-coding-system-explicit in revert-buffer >> is bogus, and should be removed---see below. What do you think? > > Its use is not bogus. It's so that when a file's coding-system is > incorrectly auto-detected, the user can force the use of a correct > coding-system and subsequent revert-buffers won't disregard it. > > So maybe the problem is that C-x C-s should not set > buffer-file-coding-system-explicit (unless the C-x C-s prompted the user > to choose a coding-system, I guess). I see. The comments in mule.el say that ;; This variable is set in these three cases: ;; (1) A file is read by a coding system specified explicitly. ;; after-insert-file-set-coding sets the car of this value to ;; coding-system-for-read, and sets the cdr to nil. ;; (2) A buffer is saved. ;; After writing, basic-save-buffer-1 sets the car of this value ;; to last-coding-system-used. ;; (3) set-buffer-file-coding-system is called. ;; The cdr of this value is set to the specified coding system. ;; This variable is used for decoding in revert-buffer and encoding in ;; select-safe-coding-system. Indeed, this seems to imply that (2) can be omitted, as you suggest, since "force selecting" a coding system should trigger (1) and (3). Is there any reason that (2) was originally included? From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 22 21:17:44 2012 Received: (at control) by debbugs.gnu.org; 23 Dec 2012 02:17:44 +0000 Received: from localhost ([127.0.0.1]:56034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tmb8K-0002hJ-3i for submit@debbugs.gnu.org; Sat, 22 Dec 2012 21:17:44 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:54124) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tmb8H-0002h5-8l; Sat, 22 Dec 2012 21:17:41 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Tmb7u-000119-3y; Sat, 22 Dec 2012 21:17:18 -0500 From: Glenn Morris To: Reuben Thomas Subject: Re: bug#13256: 24.1; auto-revert does not re-check encoding References: <87wqw9r66q.fsf@sc3d.org> X-Spook: PLO Aladdin Project Monarch Ceridian $400 million in gold X-Ran: EH^~i6y6pk&J3~^l7U+o4PIs[N[3@.Q"0^./TQE8'b^R)}ZDX&Q)r$~:#gqayU_@{~YTae X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Sat, 22 Dec 2012 21:17:18 -0500 In-Reply-To: <87wqw9r66q.fsf@sc3d.org> (Reuben Thomas's message of "Sat, 22 Dec 2012 23:57:33 +0000") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control Cc: 13256@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.0 (----) merge 4533 13256 stop Reuben Thomas wrote: > I use auto-revert-mode. If I run e.g. dos2unix on a buffer I'm editing, > it is reverted, but Emacs does not notice that the line ending encoding > has changed. Hence, continuing to edit and re-saving will undo the > unix2dos command. http://debbugs.gnu.org/4533 From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 09 22:10:30 2013 Received: (at 4533-done) by debbugs.gnu.org; 10 Feb 2013 03:10:31 +0000 Received: from localhost ([127.0.0.1]:47688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U4NIv-0000e5-Kz for submit@debbugs.gnu.org; Sat, 09 Feb 2013 22:10:26 -0500 Received: from mail-pb0-f41.google.com ([209.85.160.41]:45094) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U4NIr-0000dv-Vl for 4533-done@debbugs.gnu.org; Sat, 09 Feb 2013 22:10:07 -0500 Received: by mail-pb0-f41.google.com with SMTP id um15so267033pbc.14 for <4533-done@debbugs.gnu.org>; Sat, 09 Feb 2013 19:09:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=PxZNu2Akyd3KCa8on74xmf5W7i2kyMQEQZ5GtqJngyI=; b=PzD5T9G1Hf6MYi9PfortxgsaRi4aPVFkmnU1waWLHKKqt5H5d7jrJulSr3U1f7b1yA o0aa9t9NU7O0Udo8tIgUYJRRmsM4gdk88ZNnAwjZYyti89idLYptKCXOztBFMKDMAfJI K2dkWM7IG7eLacNmPCWL+QS4HIaAnjCLyY9h2sZ/KkDMCcXAlsYLk0sADK5gF+8/SOci i9H9h9L5ul8JcXKdiJkL6RHTgcMWa4c6s8GUOTMqgeyHZv2VrH2VRRI3D2Eulw6oTHUb Ce4iit/IijBl9oOwkPoxB22WKCtellPyEQIhNU+gtEoK3XJ+sFe0Z8cI/8ZewlLAveaB 1WmQ== X-Received: by 10.68.197.131 with SMTP id iu3mr7627608pbc.72.1360465793090; Sat, 09 Feb 2013 19:09:53 -0800 (PST) Received: from tsparkle (cm126.delta178.maxonline.com.sg. [59.189.178.126]) by mx.google.com with ESMTPS id xg1sm3190641pbc.26.2013.02.09.19.09.49 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 09 Feb 2013 19:09:51 -0800 (PST) From: Chong Yidong To: Stefan Monnier Subject: Re: bug#4533: 23.1: reverting fails to update line ending mode line References: <1afaf6160909221901p527cca80jcbf81e589cde629d@mail.gmail.com> <87mxpcc115.fsf@stupidchicken.com> <87bp5qbipg.fsf@stupidchicken.com> Date: Sun, 10 Feb 2013 11:09:51 +0800 In-Reply-To: <87bp5qbipg.fsf@stupidchicken.com> (Chong Yidong's message of "Mon, 15 Nov 2010 12:27:39 -0500") Message-ID: <87zjzc3lvk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 4533-done Cc: Kenichi Handa , 4533-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Chong Yidong writes: >> So maybe the problem is that C-x C-s should not set >> buffer-file-coding-system-explicit (unless the C-x C-s prompted the user >> to choose a coding-system, I guess). > > I see. The comments in mule.el say that > > ;; This variable is set in these three cases: > ;; (1) A file is read by a coding system specified explicitly. > ;; after-insert-file-set-coding sets the car of this value to > ;; coding-system-for-read, and sets the cdr to nil. > ;; (2) A buffer is saved. > ;; After writing, basic-save-buffer-1 sets the car of this value > ;; to last-coding-system-used. > ;; (3) set-buffer-file-coding-system is called. > ;; The cdr of this value is set to the specified coding system. > ;; This variable is used for decoding in revert-buffer and encoding in > ;; select-safe-coding-system. > > Indeed, this seems to imply that (2) can be omitted, as you suggest, > since "force selecting" a coding system should trigger (1) and (3). Is > there any reason that (2) was originally included? Since there's been no response, and my testing showed no ill effects to this change, I went ahead and committed it in the trunk. Let's see how it shakes out. From unknown Mon Jun 23 23:48:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 10 Mar 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator