GNU bug report logs - #37820
25.2; xref using etags incorrect case fold during completion

Previous Next

Package: emacs;

Reported by: Radey Shouman <shouman <at> comcast.net>

Date: Sat, 19 Oct 2019 04:54:04 UTC

Severity: normal

Found in version 25.2

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 37820 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Radey Shouman <shouman <at> comcast.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 37820 <at> debbugs.gnu.org
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Wed, 25 Dec 2019 02:45:24 +0200
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.




This bug report was last modified 5 years and 182 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.