C-k is already bound to minibuffer-cmd_deleteToEndOfLine. Alternative suggestions welcome.
I have a working implementation of this feature, however there is a problem. Invalidating a buffer will
result in error from the completer, as it will access fields in the invalidated buffer when
'text_entry_minibuffer_state' attempts to update the completion list. The crux of the biscuit is that the
'data' field of the completer returned by all_word_completer() is calculated when the completer is
created, and can't be updated afterwards. I tried installing a new completer with up-to-date 'data',
however it would appear that coroutines in methods of 'text_entry_minibuffer_state' close around the
initial completer, which results in failure when they are resumed with a new completer.
I have added an optional $keymap argument to minibuffer.read_buffer() and minibuffer.read() which allows
custom keymaps (which ostensibly extend 'minibuffer_keymap') to be in used during minibuffer commands.
This seems generally useful for other commands which want custom keymaps for manipulating selected
minibuffer completions. (Indeed, retroj thought minibuffer keymap overlays were already implemented, but
it appears that 'minibuffer_keymap' is hard-coded in 'text_entry_minibuffer_state'.) My ideal
implementation adds a 'read_buffer_minibuffer_keymap' which is installed anytime minibuffer.read_buffer()
is called, thus exposing this kill functionality to any command that works with buffer lists via the
minibuffer (admittedly, by only two commands at the moment, 'switch-to-buffer' and 'kill-buffer', however
I find it likely that, as conkeror evolves, more commands will be added which manipulate the list of
buffers, and it seems desirable that these be able to re-use such features as this one via
'read_buffer_minibuffer_keymap').
I suspect that methods to update the completer and the list widget will need to be added for the ideal
implementation to work so that the minibuffer doesn't need to be destroyed and recreated.
|