commit 862780878c2daa4cdc1fb4a62774587d988b1480
parent 64d4dfe2ffff075dc216787480390bc48e4e22dd
Author: Daniel Barlow <dan@telent.net>
Date: Sun, 1 Jan 2023 00:15:26 +0000
clean up the spew file a bit
Diffstat:
| M | musing.md | | | 83 | +++++++++++++++++++++++++++++++++++++++++++------------------------------------ |
1 file changed, 45 insertions(+), 38 deletions(-)
diff --git a/musing.md b/musing.md
@@ -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
+----
-how do we do the buffer list thing?
-- generate html, or
-- use native widgets
+when input widget is active for a parameter, show the completions
+flowbox
-native widgets seems neater
-- how do we permit commands to insert widgets into the frame?
-- how do we get rid of them?
+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.
-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
-M-x switch-to-buffer
- Buffer mai_
+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 }
- +------+ +---------+
- | main | | mailing |
- +------+ +---------+
+on RET, check there is a completion value whose stringification
+matches the input string. Hide the flowbox
+to activate a rendered completion, the callback needs to perform the
+same action as RET would on the chosen value
------
+is there a role for TAB?
+
+- in the shell it activates completion or shows options: we don't need that if we're updating them automatically
-so there are two things going on here
+- we could use it to cycle through the available completions: switch
+focus from entry to step through the completions then RET activates
-1) how to implement switch-to-buffer with appropriate autocomplete
-on the buffer name - perhaps involving showing buffer thumbnails etc
-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
+-----
+
+# TODO
-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.
+* [done] show loading progress
+* [done] show url when the commander is inactive
+* [done] visit-location url defaults to current
+
+* 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?)