Stefan Monnier <monn...@iro.umontreal.ca> writes:

Hi Stefan,

>> So the question is: how can the completion-ignore-case value be
>> propagated from the completion gathering function in
>> `completion-at-point-functions' to the function that actually applies
>> this completion, without having to modify the global or buffer local
>> value of `completion-ignore-case'?
>
> Assuming you have a completion table in variable `table', you should
> be able to construct a new completion table that's case-insensitive
> with something like the untested code below:
>
> (defun completion-table-case-fold (table string pred action)
>   (let ((completion-ignore-case t))
>     (complete-with-action action table string pred)))
>
> [...]
>    (let ((newtable
>           (apply-partially #'completion-table-case-fold table)))
>      [...])
>
> where completion-table-case-fold is an auxiliary function which
> (c|sh)ould be added to minibuffer.el.

Hm, why not simply add a property :ignore-case to the PROPS a function
in `completion-at-point-functions' may return in addition to the
existing :predicate and :annotation-function?  Then
`completion-at-point' could simply bind `completion-ignore-case'
according to that property when calling `completion-in-region'.

Bye,
Tassilo

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to