clean up the spew file a bit

main
Daniel Barlow 2023-01-01 00:15:26 +00:00
parent 64d4dfe2ff
commit 862780878c
1 changed files with 45 additions and 38 deletions

View File

@ -34,54 +34,61 @@ document element(?)
webview
lua's standard types
## next steps
-----
* [done] change define-command so that the parameters are ordered
* display unbound key error
* ESC to cancel interactive command
* autocomplete command name
* parameters with non-string values (e.g. buffer)
* show current url when command inactive
* [done] show prompts for parameter
* multiple buffers
- create buffer
- list buffers (where does the output go?)
- find and switch to buffer
a consideration we haven't touched on yet: in emacs, not all buffers
are files - e.g. the buffer list, or the process list, or the magit
status buffer - there is a well-used affordance for elisp to put
semi-persistent interactable content onscreen - do we need such a
thing here or is it ok to say "just call gtk" to command authors
----
when input widget is active for a parameter, show the completions
flowbox
while typing, use the typed input to get a completions list. each
completion is an acceptable value: convert to a gtk widget by calling
(to-label value) and add to flowbox.
how do we do the buffer list thing?
- generate html, or
- use native widgets
if the value is a table
if :to-label key present, use it as-is
else Gtk.Label { :label value.value }
else (assume it's a string)
Gtk.Label { :label value }
native widgets seems neater
- how do we permit commands to insert widgets into the frame?
- how do we get rid of them?
on RET, check there is a completion value whose stringification
matches the input string. Hide the flowbox
we could have an "output overlay" inserted underneath the commander.
could we use the same thing for completions? we haven't addressed
non-string parameters yet, really
to activate a rendered completion, the callback needs to perform the
same action as RET would on the chosen value
M-x switch-to-buffer
Buffer mai_
is there a role for TAB?
+------+ +---------+
| main | | mailing |
+------+ +---------+
- in the shell it activates completion or shows options: we don't need that if we're updating them automatically
- we could use it to cycle through the available completions: switch
focus from entry to step through the completions then RET activates
-----
so there are two things going on here
# TODO
1) how to implement switch-to-buffer with appropriate autocomplete
on the buffer name - perhaps involving showing buffer thumbnails etc
* [done] show loading progress
* [done] show url when the commander is inactive
* [done] visit-location url defaults to current
2) in emacs, not all buffers are files - e.g. the buffer list, or the
process list, or the magit status buffer - there is a well-used
affordance for elisp to put semi-persistent interactable content
onscreen - do we need such a thing here or is it ok to say "just call
gtk" to command authors
are these the same problem or are they separate problems? do we have
the second problem? What I will do is address the first one and
see if it's generalisable once I've done it.
* custom rendering for completions (e.g. buffer thumbnails)
* buffer name is often going to be useless. find buffers
by url/title
still need some 1:1 mapping between the buffer object and
a text-representable form of same
* click in commander widget activates visit-location
* display unbound key error
* ESC to cancel interactive command
* autocomplete command name
* multiple buffers
- create buffer
- list buffers (do we need this if we have thumbnails?)