|
From: | Paul Eggert |
Subject: | Re: etags test is broken on MS-Windows |
Date: | Thu, 21 May 2015 16:28:21 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 05/21/2015 12:54 PM, Eli Zaretskii wrote:
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.
I don't see why it's worth our trouble to substitute one incorrect solution for another, if it's OK that the solutions are approximate.
If it's important to fix this, how about the following idea instead. Have etags always compute byte offsets the POSIX way, counting any CRs, and put POSIX-oriented byte counts into the TAGS file (the way it already does on GNU hosts). When Emacs starts up, if the source file is in DOS mode (with CRLF replaced by LF internally), Emacs subtracts the line count from the POSIX byte count, and uses the resulting byte count instead. That way, we don't need to change how etags works on GNU platforms, nor do we need to tell GNU users to regenerate their TAGS files.
[Prev in Thread] | Current Thread | [Next in Thread] |