[Top][All Lists]

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

Re: [PATCH 0/4] Fix caret errors

From: Hans Åberg
Subject: Re: [PATCH 0/4] Fix caret errors
Date: Sun, 21 Apr 2019 23:14:18 +0200

> On 21 Apr 2019, at 09:41, Akim Demaille <address@hidden> wrote:
> So what shall we do?
> 1.  Should we stick to treating tabs as magical characters wrt column
>    numbers?  Doing so gives consistent locations for people who mix
>    tabs and spaces.  But a. they need to also tabs of 8 spaces, and
>    b. indenting the way we do is visually wrong.
> 2.  How should we quote source?
>    a. Do like Clang
>    b. Do like GCC
>    c. Do like Bison, i.e., consider this is an unimportant issue,
>       people should not use tabs anyway :)

The only safe way is to replace the visible characters in the quoted string 
with spaces, and then use an initial portion of that. Then you can count 
characters as you like, probably tabs as 1.

Does not work with Unicode, though. In your example
> input.y:15.4-17: warning: empty rule without %empty [-Wempty-rule]
> e: {∇⃗×𝐸⃗ = -∂𝐵⃗/∂t}
>    ^~~~~~~~~~~~~~
here, the U+20D7 COMBINING RIGHT ARROW ABOVE for the nabla combines, but others 
do not.

Probably something else would be needed that does not rely on identical spacing 
on two lines.

Instead of tabs, I use two spaces. One space is not prominent enough, I think.

reply via email to

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