issue392: define_webjump completer cannot use $get_value

Priority: bug Status: chatting
Messages
msg990 (view) Author: retroj Date: 2012-02-04.08:50:27
define_webjump can of course provide a completer, but the full range of sophistication of the completions
system is not available to webjumps because define_webjump does not provide access to related mechanisms
like $match_required.  $match_required must be used if one wants to use the completer keyword $get_value
to transform the result item.  The current best workaround is probably to provide a handler function for
the webjump which performs the transformation.

issue231 may possibly be a specific instance of this problem.
msg991 (view) Author: retroj Date: 2012-02-04.08:58:03
We don't necessarily need to add a $match_required keyword to define_webjump, if we could examine the
completer and see if it has a $get_value procedure.  The presence of $get_value could decide whether
we pass $match_required to minibuffer.read.
msg992 (view) Author: retroj Date: 2012-02-04.08:59:39
The current implementation of completers is quite opaque, and does not give us a way to inspect it to see
if $get_value was given.
msg994 (view) Author: retroj Date: 2012-02-05.19:24:40
Tangentially related to this issue is the patch of 2009-05-07/2009-11-18
that gave completers the ability to set the match_required flag
dynamically during the read.

http://repo.or.cz/w/conkeror.git/commit/2005f2e5f2ec809f8733886714b61a389cf2b10b

It is related because that patch was also addressing the need for
match_required to be set with webjump completers.  In that case, it was
for webjumps that have a finite set of useful completions, for example,
the "bookmark" webjump or the index-webjumps.  But the patch has the wrong
design, it breaks proper abstraction in a subtle way: whether or not a
match is required is no business of a completer --- a completer is
basically just a function that takes an input string and returns a list of
completions for it --- what to do with this list is the business of the
caller, not the completer.

The match_required property should therefore be a property of the webjump,
not its completer, and we need a route other than the completions object
to tell the completions system when match_required is in effect for a
nested completer.
History
Date User Action Args
2012-02-05 19:24:40retrojsetmessages: + msg994
2012-02-04 08:59:39retrojsetmessages: + msg992
2012-02-04 08:58:03retrojsetstatus: unread -> chatting
messages: + msg991
2012-02-04 08:51:18retrojsetpriority: feature -> bug
2012-02-04 08:50:27retrojcreate