From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.bugs Subject: java line termination Date: 28 Jan 2003 11:30:47 -0700 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <874r7txh2g.fsf@fleche.redhat.com> Reply-To: tromey@redhat.com NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1043778977 21584 80.91.224.249 (28 Jan 2003 18:36:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 28 Jan 2003 18:36:17 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18daal-0005bm-00 for ; Tue, 28 Jan 2003 19:36:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18dacK-0006E1-05 for gnu-bug-gnu-emacs@m.gmane.org; Tue, 28 Jan 2003 13:37:52 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18dac6-00068X-00 for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2003 13:37:38 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18dabB-0005e2-00 for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2003 13:36:42 -0500 Original-Received: from mail.peakpeak.com ([207.174.178.17] helo=gash2.peakpeak.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18daaq-0005Oo-00 for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2003 13:36:20 -0500 Original-Received: from fleche.redhat.com (tz0183.peakpeak.com [207.174.69.183]) by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id LAA18824; Tue, 28 Jan 2003 11:36:09 -0700 Original-Received: by fleche.redhat.com (Postfix, from userid 1000) id D37604F8073; Tue, 28 Jan 2003 11:30:47 -0700 (MST) Original-To: bug-gnu-emacs@gnu.org X-Attribution: Tom X-Zippy: Is this where people are HOT and NICE and they give you TOAST for FREE?? Original-Lines: 69 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4336 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4336 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.2.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars) of 2002-04-08 on porky.devel.redhat.com configured using `configure i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --with-gcc --with-pop --with-sound' 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: en_US.iso885915 locale-coding-system: iso-latin-9 default-enable-multibyte-characters: nil Please describe exactly what actions triggered the bug and the precise symptoms of the bug: Java has its own rules for what constitutes a line terminator. A bare \r is one, as is a bare \n; but the \r\n sequence is also considered a single terminator. I've run across Java source code which uses a mix of different line terminators in a single file. While ugly, there's not much I can do about it. If I compile code like this with gcj, and then use gdb to debug it, I find that the debug arrow will be misplaced, because Emacs and gcj disagree about the current line number. Similarly, M-x next-error will sometimes jump to the wrong line, as gcj reports line numbers according to Java rules, but Emacs interprets them according to its own rules. I think in java-mode Emacs ought to respect Java's notion of line termination. Recent input: l i k e SPC t h e r e ' s SPC m o r e SPC f o r SPC u s SPC t o SPC d o SPC h e r e SPC : - ( C-u C-b C-k l , SPC b l e a h . C-p C-k C-e C-f C-f C-n C-f C-n C-f C-v C-c C-c M-v z C-c b C-v C-s j a v a C-w C-w C-w C-w C-s C-l C-s C-s C-s C-s C-s C-s C-s C-a M-x r e p o r t - e m Recent messages: Saving file /home/tromey/.newsrc.eld... Wrote /home/tromey/.newsrc.eld Saving /home/tromey/.newsrc.eld...done Mark set set-mark-command: No mark set in this buffer [2 times] Mark set [4 times] Auto-saving...done Sending...done Mark saved where search started [2 times] Tom