I like this better actually than pcomplete. It's impleer to implement
and integrates with my setup (I use company-mode).
Changing the default keybinding to completion-at-point for TAB.
- Add pcomplete structure to complete against the following list
- Bind the TAB key to is in twister-post-mode
- enable it with the hook (this should probably not be done by default)
delete-window will give an error if the window is the sole window in its
frame. In my emacs confige i use popup-like 'capture' frames for
denting, twisting, etc.
On cancelling or posting, the delete-window would fail, so a test for a
parent window prevents this.
- twister-create-post:
Creates an empty window in which post can be written, \C-c\C-c
posts the buffer.
- twister-close-post:
Hides and kill the twister post buffer, typically used in an advice.
This method encapsulates the connection and closes it too, so there
won't be processes left behind.
Performance wise, this is probably not the smartest thing to do, but
that is of no concern at this time.