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: Fri, 17 Jan 2020 04:15:07 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 26.12.2019 23:56, Radey Shouman wrote:
Dmitry Gutov writes:
  > Hi Radey,
  >
  > sorry for the late reply.

Not at all.

And once again. Upon some consideration, I have settled on the most backward-compatible option, I think.

No.  I believe that completion-ignore-case should always be bound to
the value of tags-case-fold-search when doing a tags completion.  If
this is not so then completion is not consistent with the tags search,
which is the bug in question.

Yes, OK. See the attached patch.

The alternative would be to create a new user option local to the xref package that would affect both identifier completion and search, but a) that will likely be an incompatible change unless tags-case-fold-search becomes an obsolete-alias, b) it seems unrealistic to have all backends adhere to it anyway.

So let's ask the backends instead.

On the other hand, it might well be useful to make
tags-case-fold-search or any xref replacement a safe local variable.

Yes. The patch also does that.

BTW, how might one find the list of safe local variables?

Well, um. You can evaluate this expression:

(seq-filter
 (lambda (s) (get (intern-soft s) 'safe-local-variable))
 (all-completions "" obarray))

Eli, is this patch okay for emacs-27?

On the one hand, the issue seems minor-ish.

On the other, it's a backward compatibility problem. And the patch must be pretty safe because it's basically additive: the only real change is to xref--read-identifier, and it calls xref-backend-identifier-completion-ignore-case which will default to the current behavior for all backends except etags.

Attachment: xref-backend-identifier-completion-ignore-case.diff
Description: Text Data


reply via email to

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