* Re: [Emacs-diffs] emacs-25 b99141d: Make erc completion case-insensitive again
[not found] ` <E1aRDm8-0007Me-Mt@vcs.savannah.gnu.org>
@ 2016-02-04 13:14 ` Stefan Monnier
2016-02-05 2:29 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2016-02-04 13:14 UTC (permalink / raw)
To: emacs-devel; +Cc: Lars Ingebrigtsen
> +(defun erc-completion-at-point ()
> + "Perform complection on the text around point case-insentitively.
> +See `completion-at-point'."
> + (interactive)
> + (let ((completion-ignore-case t))
> + (completion-at-point)))
If the elements in the completion table are indeed case-insensitive,
then the right way to do that is to set the
completion-table accordingly.
E.g. replace
<completion-table>
with
(lambda (s p a)
(let ((completion-ignore-case t))
(complete-with-action a <completion-table> s p)))
-- Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] emacs-25 b99141d: Make erc completion case-insensitive again
2016-02-04 13:14 ` [Emacs-diffs] emacs-25 b99141d: Make erc completion case-insensitive again Stefan Monnier
@ 2016-02-05 2:29 ` Lars Ingebrigtsen
2016-02-05 13:54 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-05 2:29 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> If the elements in the completion table are indeed case-insensitive,
> then the right way to do that is to set the
> completion-table accordingly.
>
> E.g. replace
>
> <completion-table>
>
> with
>
> (lambda (s p a)
> (let ((completion-ignore-case t))
> (complete-with-action a <completion-table> s p)))
Hm... If I do the following in pcomplete-completions-at-point
- (list beg (point) table
+ (list beg (point)
+ (lambda (s p a)
+ (let ((completion-ignore-case t))
+ (complete-with-action a table s p)))
it still doesn't give me case-insensitive completion...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] emacs-25 b99141d: Make erc completion case-insensitive again
2016-02-05 2:29 ` Lars Ingebrigtsen
@ 2016-02-05 13:54 ` Stefan Monnier
2016-02-06 3:14 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2016-02-05 13:54 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: emacs-devel
> Hm... If I do the following in pcomplete-completions-at-point
>
> - (list beg (point) table
> + (list beg (point)
> + (lambda (s p a)
> + (let ((completion-ignore-case t))
> + (complete-with-action a table s p)))
>
> it still doesn't give me case-insensitive completion...
Hmm... so we have a problem. BTW, you don't need the above, you can
just do the following for a test:
(when t;;pcomplete-ignore-case
(setq table (completion-table-case-fold table)))
Or alternatively set pcomplete-ignore-case to t. And indeed, in my test
it did not make the completion case-sensitive.
But fixing it with a new command isn't right, because
completion-at-point is called from various places.
It looks like the core of the problem is that completion-table-case-fold
doesn't work.
For the emacs-25 branch, the better fix is probably to set
completion-ignore-case to t buffer-locally in ERC's major mode.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-06 3:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20160204065220.28270.47611@vcs.savannah.gnu.org>
[not found] ` <E1aRDm8-0007Me-Mt@vcs.savannah.gnu.org>
2016-02-04 13:14 ` [Emacs-diffs] emacs-25 b99141d: Make erc completion case-insensitive again Stefan Monnier
2016-02-05 2:29 ` Lars Ingebrigtsen
2016-02-05 13:54 ` Stefan Monnier
2016-02-06 3:14 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.