[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TAGS completion with (setq-local completion-ignore-case t)
From: |
Morgan Willcock |
Subject: |
Re: TAGS completion with (setq-local completion-ignore-case t) |
Date: |
Thu, 07 Mar 2024 11:37:27 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Morgan Willcock <morgan@ice9.digital>
>> Cc: emacs-devel@gnu.org
>> Date: Thu, 07 Mar 2024 09:54:31 +0000
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> >> Is there a technical reason why TAGS completion cannot use the value of
>> >> completion-ignore-case that is set in the buffer where completion is
>> >> initiated, or is this a bug in the implementation?
>> >
>> > If you mean completion when you type "M-.", then this has its own user
>> > option, tags-case-fold-search. Is that what you want?
>>
>> I am talking about completion as initiated by the complete-tag command.
>>
>> (Setting tags-case-fold-search to t does not change the result, whether
>> set buffer-local or globally).
>
> Can you show a complete recipe, starting from "emacs -Q", to reproduce
> the issue?
I've included a script below which should demonstrate the problem,
i.e. no completions are generated when the buffer-local value of
completion-ignore-case is t until the value of completion-ignore-case is
also set to t for the TAGS buffer.
> And what version of Emacs is that?
I've tested on 29.2 and the master branch (as of a few hours ago).
## Generate a TAGS file.
printf "Function IsSingle\nFunction IsString\n" > functions
etags --lang=none --regex='/^function[ \t]+\([0-9A-Za-z:_]+\)/\1/i' functions
## Test default completion (case-sensitive).
emacs -Q --eval "(progn \
(pop-to-buffer (get-buffer-create \"test\")) \
(visit-tags-table \"TAGS\") \
(insert \"Is\") \
(complete-tag) \
(complete-tag))"
# 2 possible completions:
# IsSingle
# IsString
## Test case-insensitive completion (global).
emacs -Q --eval "(progn \
(pop-to-buffer (get-buffer-create \"test\")) \
(setq completion-ignore-case t) \
(visit-tags-table \"TAGS\") \
(insert \"is\") \
(complete-tag) \
(complete-tag))"
# 2 possible completions:
# IsSingle
# IsString
## Test case-insensitive completion (buffer-local).
emacs -Q --eval "(progn \
(pop-to-buffer (get-buffer-create \"test\")) \
(setq-local completion-ignore-case t) \
(visit-tags-table \"TAGS\") \
(insert \"is\") \
(complete-tag) \
(complete-tag))"
# No completions.
## Test case-insensitive completion (buffer-local, including TAGS buffer).
emacs -Q --eval "(progn \
(pop-to-buffer (get-buffer-create \"test\")) \
(setq-local completion-ignore-case t) \
(visit-tags-table \"TAGS\") \
(with-current-buffer \"TAGS\" \
(setq-local completion-ignore-case t)) \
(insert \"is\") \
(complete-tag) \
(complete-tag))"
# 2 possible completions:
# IsSingle
# IsString
--
Morgan Willcock
- TAGS completion with (setq-local completion-ignore-case t), Morgan Willcock, 2024/03/07
- Re: TAGS completion with (setq-local completion-ignore-case t), Eli Zaretskii, 2024/03/07
- Re: TAGS completion with (setq-local completion-ignore-case t), Morgan Willcock, 2024/03/07
- Re: TAGS completion with (setq-local completion-ignore-case t), Eli Zaretskii, 2024/03/07
- Re: TAGS completion with (setq-local completion-ignore-case t),
Morgan Willcock <=
- Re: TAGS completion with (setq-local completion-ignore-case t), Eli Zaretskii, 2024/03/09
- Re: TAGS completion with (setq-local completion-ignore-case t), Morgan Willcock, 2024/03/09
- Re: TAGS completion with (setq-local completion-ignore-case t), Eli Zaretskii, 2024/03/09
- Re: TAGS completion with (setq-local completion-ignore-case t), Morgan Willcock, 2024/03/09
- Re: TAGS completion with (setq-local completion-ignore-case t), Eli Zaretskii, 2024/03/09
- Re: TAGS completion with (setq-local completion-ignore-case t), Morgan Willcock, 2024/03/09
- Re: TAGS completion with (setq-local completion-ignore-case t), Eli Zaretskii, 2024/03/09
- Re: TAGS completion with (setq-local completion-ignore-case t), Eli Zaretskii, 2024/03/09
- Re: TAGS completion with (setq-local completion-ignore-case t), Morgan Willcock, 2024/03/09
- Re: TAGS completion with (setq-local completion-ignore-case t), Eli Zaretskii, 2024/03/09