emacs-devel
[Top][All Lists]
Advanced

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

Re: TAGS completion with (setq-local completion-ignore-case t)


From: Eli Zaretskii
Subject: Re: TAGS completion with (setq-local completion-ignore-case t)
Date: Sat, 09 Mar 2024 16:26:35 +0200

> From: Morgan Willcock <morgan@ice9.digital>
> Cc: emacs-devel@gnu.org
> Date: Sat, 09 Mar 2024 14:06:39 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > You need to set tags-case-fold-search, not the buffer-local value of
> > completion-ignore-case.  That's because the commands in etags.el look
> > at tags-case-fold-search to decide whether they should ignore
> > letter-case.
> 
> Setting tags-case-fold-search to t (buffer-local or not) doesn't seem to
> have any effect when completion-ignore-case is also set to t.
> 
>   emacs -Q --eval "(progn \
>                      (pop-to-buffer (get-buffer-create \"test\")) \
>                      (setq-local completion-ignore-case t) \
>                      (setq-local tags-case-fold-search t) \

Don't use setq-local, use setq.  Or let-bind it, like this:

  (progn
    (pop-to-buffer (get-buffer-create "test"))
    (let ((tags-case-fold-search t))
      (insert "is")
      (complete-tag)
      (complete-tag)))

> I would still need to set completion-ignore-case to t because that is
> still relevant for other capf backends for the buffer (but not for all
> buffers).

That's fine, and should not interfere.

> It also pretty strange that setting completion-ignore-case to t has done
> the opposite of what it advertises.

It just is not heeded to.  Like with
read-file-name-completion-ignore-case in case of reading file names,
and a few other similar variables.



reply via email to

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