From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.bugs Subject: Re: decode_eol and inconsistent EOL Date: 26 Apr 2002 10:37:40 -0400 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <5lr8l2h6ff.fsf@rum.cs.yale.edu> References: <1438-Thu25Apr2002222156+0300-eliz@is.elta.co.il> <5l662eipi3.fsf@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1019880344 22244 127.0.0.1 (27 Apr 2002 04:05:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 27 Apr 2002 04:05:44 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 171JSy-0005mf-00 for ; Sat, 27 Apr 2002 06:05:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 171JT4-0004re-00; Sat, 27 Apr 2002 00:05:50 -0400 Original-Received: from delysid.gnu.org ([158.121.106.20]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 171JJC-0004Em-00; Fri, 26 Apr 2002 23:55:38 -0400 Original-Received: from dimail.epfl.ch ([128.178.79.31]) by delysid.gnu.org with esmtp (Exim 3.34 #2) id 171I1z-0006nB-00 for ; Fri, 26 Apr 2002 22:33:47 -0400 Original-Received: from dinews.epfl.ch (news@disunds1 [128.178.79.23]) by dimail.epfl.ch (8.8.X/EPFL-8.1g) with SMTP id EAA16005 for ; Sat, 27 Apr 2002 04:33:45 +0200 (MET DST) Original-To: gnu-emacs-bug@gnu.org Original-Newsgroups: gnu.emacs.bug Original-Lines: 26 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 X-Original-NNTP-Posting-Host: rum.cs.yale.edu X-Original-Trace: 26 Apr 2002 10:37:40 -0400, rum.cs.yale.edu Original-Path: rum.cs.yale.edu!rum.cs.yale.edu Original-NNTP-Posting-Host: liasun13.epfl.ch X-Original-NNTP-Posting-Host: liasun13.epfl.ch Original-X-Trace: 27 Apr 2002 04:33:43 +0100, liasun13.epfl.ch Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:978 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:978 >>>>> "Stefan" == Stefan Monnier writes: > I think all that we really care about is that the load+save trip is safe > and that the content of the Emacs buffer looks "as right as possible". I.e. I suggest the patch below which makes Emacs accept lone CRs inside dos-style files. It should fix the problem for Stephen while still guaranteeing a safe load+save round trip. Stefan --- coding.c.~1.241.~ Tue Apr 16 10:15:28 2002 +++ coding.c Fri Apr 26 09:09:16 2002 @@ -3173,11 +3173,6 @@ ONE_MORE_BYTE (c); if (c != '\n') { - if (coding->mode & CODING_MODE_INHIBIT_INCONSISTENT_EOL) - { - coding->result = CODING_FINISH_INCONSISTENT_EOL; - goto label_end_of_loop; - } src--; c = '\r'; }