bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#37820: 25.2; xref using etags incorrect case fold during completion


From: Dmitry Gutov
Subject: bug#37820: 25.2; xref using etags incorrect case fold during completion
Date: Wed, 25 Dec 2019 02:45:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

Hi Radey,

sorry for the late reply.

On 25.10.2019 16:59, Radey Shouman wrote:
Please copy me on any messages to which you expect a response.
I have not subscribed to the mailing list.

Sure. That's the default etiquette here anyway.

The only variable I customize is tags-case-fold-search, I leave
completion-ignore-case with the default value.  I heartily regret
even mentioning the latter variable, it is a red herring.

Don't regret it because it's entirely pertinent.

So, do we really have meaningful scenarios where the user will want tags-case-fold-search set to t while completion-ignore-case *should* remain nil?

I suppose we could add a new method to xref backends just for that, but we shouldn't do that without understanding the use cases. Like, why/how other backends would choose to return different values.

There are at least two reasons to change tags-case-fold-search:

1) Some programming languages are not case sensitive in normal use,
eg Common Lisp, Fortran, Cobol, R[45]RS Scheme ...  For these languages
case-insensitive search should be the default.

How does using one or the other variable help with that distinction?

When someone uses tags, they often use them with a multitude of languages. Whether you employ tags-case-fold-search, or an xref-specific variable Eli suggested to add, that would affect all languages anyway, right?

2) For many code bases the rules of CamelCasing are so vague, or their
observance so lax, that it's hard to predict what the capitalization
of an identifier will be.  It's useful in these cases to use
completion that is not case sensitive.

We can make completion-ignore-case a safe local variable, so that you can set it in dir-locals depending on the code base.





reply via email to

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