* How to get current input string in predicate to completing-read
@ 2008-08-07 21:42 Lennart Borgman (gmail)
2008-08-07 21:55 ` Lennart Borgman (gmail)
2008-08-08 17:20 ` Stefan Monnier
0 siblings, 2 replies; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-07 21:42 UTC (permalink / raw
To: Emacs Devel
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to get current input string in predicate to completing-read
2008-08-07 21:42 How to get current input string in predicate to completing-read Lennart Borgman (gmail)
@ 2008-08-07 21:55 ` Lennart Borgman (gmail)
2008-08-07 22:33 ` Lennart Borgman (gmail)
2008-08-08 17:20 ` Stefan Monnier
1 sibling, 1 reply; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-07 21:55 UTC (permalink / raw
To: Emacs Devel
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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to get current input string in predicate to completing-read
2008-08-07 21:55 ` Lennart Borgman (gmail)
@ 2008-08-07 22:33 ` Lennart Borgman (gmail)
2008-08-07 23:13 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-07 22:33 UTC (permalink / raw
To: Emacs Devel
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 . )
In
(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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to get current input string in predicate to completing-read
2008-08-07 22:33 ` Lennart Borgman (gmail)
@ 2008-08-07 23:13 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-07 23:13 UTC (permalink / raw
To: Emacs Devel
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 . )
>
> In
>
> (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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to get current input string in predicate to completing-read
2008-08-07 21:42 How to get current input string in predicate to completing-read Lennart Borgman (gmail)
2008-08-07 21:55 ` Lennart Borgman (gmail)
@ 2008-08-08 17:20 ` Stefan Monnier
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2008-08-08 17:20 UTC (permalink / raw
To: Lennart Borgman (gmail); +Cc: Emacs Devel
> Is it possible to get the current input string from the prompt inside the
> PREDICATE function in completing-read?
No.
> It it is possible then you can for example use regexp matching using the
> input string as a regexp.
This can be done from completion-styles(-alist).
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-08 17:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-07 21:42 How to get current input string in predicate to completing-read Lennart Borgman (gmail)
2008-08-07 21:55 ` Lennart Borgman (gmail)
2008-08-07 22:33 ` Lennart Borgman (gmail)
2008-08-07 23:13 ` Lennart Borgman (gmail)
2008-08-08 17:20 ` Stefan Monnier
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.