[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: etags test is broken on MS-Windows

From: Eli Zaretskii
Subject: Re: etags test is broken on MS-Windows
Date: Fri, 22 May 2015 22:08:44 +0300

> Date: Fri, 22 May 2015 11:23:09 -0700
> From: Paul Eggert <address@hidden>
> CC: address@hidden
> One possible way to do that is suggested in the last paragraph of 
> <http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00657.html>. 
> This approach does remove the different treatment of CRLF on MS-Windows 
> and Unix (as Francesco suggested); but it does so in a different way, by 
> using the Unix convention everywhere, and it suggests an approach that 
> should let Emacs do the right thing on both Unix and MS-Windows, without 
> any glitches on either platform.

These byte counts are not file byte counts (if they were, then what
you suggest would have been TRT).  They are buffer byte counts,
i.e. etags needs to compute the byte counts that Emacs will see when
the file is visited in an Emacs buffer.  So each CRLF EOL needs to be
counted as 1 byte, not 2.  Therefore, the DOS_NT code does TRT in this
case, for both Windows and Posix hosts, as amazing as it sounds.

It is, of course possible to let etags count file bytes, and then have
etags.el correct those to get buffer bytes instead.  But that doesn't
sound right to me: first "break" the perfectly correct code, and then
"unbreak" the result in Emacs.  To say nothing of the fact that
visiting a TAGS table will be slower that way.

However, the issue is minor, and I really don't want to waste any more
time arguing about it.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]