[Top][All Lists]

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

Re: How to get current input string in predicate to completing-read

From: Lennart Borgman (gmail)
Subject: Re: How to get current input string in predicate to completing-read
Date: Fri, 08 Aug 2008 01:13:23 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071031 Thunderbird/ Mnenhy/

Lennart Borgman (gmail) wrote:
Lennart Borgman (gmail) wrote:
Lennart Borgman (gmail) wrote:
Is it possible to get the current input string from the prompt inside the PREDICATE function in completing-read?

It it is possible then you can for example use regexp matching using the input string as a regexp.

If this is not possible then I suggest to add this functionality.

Eh, I believe I found it: (minibuffer-contents)

But ...

The completion function I use in programmed completion get called with FLAG equal to

  (boundaries . )


  (info "(elisp) Programmed Completion")

this value of FLAG is not mentioned. The values mentioned for FLAG are:

  t nil 'lambda

Am I misunderstanding something or is there something missing on that info page?

Another try to do what I want: I tried completion-table-dynamic with something like the code below. This also fails, but now because when showing the completions there seems to be a requirement that the minibuffer contents matches the alternative in another way then the completion-table-dynamic function did.

This makes it rather unusable. Am I missing something here? Please run the function below and try to complete with the input

  Test selection: group TAB

The message buffer will show that the return of completion-fun2 is ok, but there is no completion window.

Am I missing something or is this a bug?

reply via email to

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