From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: etags test is broken on MS-Windows Date: Thu, 21 May 2015 22:54:27 +0300 Message-ID: <83h9r5670s.fsf@gnu.org> References: <83y4kmdjmj.fsf@gnu.org> <555A8E62.7060700@cs.ucla.edu> <83h9r8egen.fsf@gnu.org> <83pp5t6gex.fsf@gnu.org> <555E09AE.9070208@cs.ucla.edu> <83lhgh6fb2.fsf@gnu.org> <555E2C10.4010501@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1432238136 21640 80.91.229.3 (21 May 2015 19:55:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 May 2015 19:55:36 +0000 (UTC) Cc: pot@gnu.org, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 21 21:55:27 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YvWYx-0005GL-8B for ged-emacs-devel@m.gmane.org; Thu, 21 May 2015 21:55:27 +0200 Original-Received: from localhost ([::1]:59312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvWYw-0005dk-M2 for ged-emacs-devel@m.gmane.org; Thu, 21 May 2015 15:55:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvWY9-0004nU-88 for emacs-devel@gnu.org; Thu, 21 May 2015 15:54:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvWY5-0005My-4m for emacs-devel@gnu.org; Thu, 21 May 2015 15:54:37 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:38038) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvWY4-0005Mn-Rz; Thu, 21 May 2015 15:54:33 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NOP00L00TI23H00@mtaout25.012.net.il>; Thu, 21 May 2015 22:50:19 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NOP00L7OTRV1W10@mtaout25.012.net.il>; Thu, 21 May 2015 22:50:19 +0300 (IDT) In-reply-to: <555E2C10.4010501@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186722 Archived-At: > Date: Thu, 21 May 2015 12:03:44 -0700 > From: Paul Eggert > CC: pot@gnu.org, emacs-devel@gnu.org > > On 05/21/2015 09:55 AM, Eli Zaretskii wrote: > > IOW, the "CRLF->LF translation" that the comment mentions is done on > > all platforms. Or am I missing something? > > I was thinking about the case where a source file has mostly lines with > LF but a few lines end in CRLF. E.g., the attached file has a CR at the > end of the second line. In that case, Emacs doesn't strip the trailing > CRs on GNU/Linux. Wouldn't the byte counts get messed up then? Yes, they would, but it's not fatal, since etags.el searches around the position for the pattern stated on the tag line. And of course, in the case you present, the byte counts will be slightly off on Windows as well. But the way etags works currently, a file with all of its lines ending in CRLF will _always_ have all of its byte counts messed up. Not a catastrophe, either, but still worse than under my suggestion. > Come to think of it, one of the etags test cases did that before I > removed the CR (and perhaps that was part of the test...). Yes, one of the files has a single line with CRLF (I thought it was part of the test as well).