GNU bug report logs -
#37820
25.2; xref using etags incorrect case fold during completion
Previous Next
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 #35 received at 37820 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
[xref-backend-identifier-completion-ignore-case.diff (text/x-patch, attachment)]
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.