GNU bug report logs - #9953
allow for mixed line terminators in a given file

Previous Next

Package: emacs;

Reported by: Angelo Borsotti <angelo.borsotti <at> gmail.com>

Date: Fri, 4 Nov 2011 17:24:02 UTC

Severity: wishlist

To reply to this bug, email your comments to 9953 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#9953; Package emacs. (Fri, 04 Nov 2011 17:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Angelo Borsotti <angelo.borsotti <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 04 Nov 2011 17:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Angelo Borsotti <angelo.borsotti <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: line terminators
Date: Fri, 4 Nov 2011 18:20:57 +0100
[Message part 1 (text/plain, inline)]
Hello,

emacs supports files with Unix, Dos and Mac-OS line terminators. It does
not support
files with have a mixture of them. Unfortunately, there are tools, such as
the Sun java
compilers, that accept source files in which each line can be terminated by
one
of the Unix, Dos or Mac-OS line terminators.
The result is that emacs and such tools number lines differently, and a
programmer, when
trying to locate a line on which the compiler reported an error is at a
loss.
E.g. take the attached file: it has been created with Emacs in Windows
typing the text
and adding with ctrl-q ctrl-m a carriage-return character at the end of the
first line.
When that file is opened with emacs, three lines are shown (i.e. that
carriage-return
does not make an empty line).
When the java compiler is run, this is the result:

D:\jtest>javac Errjava.java
Errjava.java:3: <identifier> expected
    public main ...
               ^
1 error

Note that the compiler is telling that there is an error on line 3, but for
emacs that line is line 2.

P.S. there are other editors, such as PsPad which instead display the file
with the same line
numbering as the java compiler uses.

My request is to add a further choice of line terminators besises Unix, Dos
and Mac-OS that
considers lines terminated by any one of cr-lf, cr or lf (in this order).

Thank you
-Angelo Borsotti
[Message part 2 (text/html, inline)]
[Errjava.java (application/octet-stream, attachment)]

This bug report was last modified 13 years and 223 days ago.

Previous Next


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