From d962dd7c41eebd239a066346f044f4d4c9397173 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 15 Jan 2023 16:57:25 +0000 Subject: [PATCH] trim outdated stuff --- musing.md | 39 ++++++++------------------------------- test/buffer.fnl | 8 ++++++++ 2 files changed, 16 insertions(+), 31 deletions(-) create mode 100644 test/buffer.fnl diff --git a/musing.md b/musing.md index 141a4a9..070c055 100644 --- a/musing.md +++ b/musing.md @@ -40,29 +40,10 @@ 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 +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. - - -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 } - -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? @@ -81,26 +62,22 @@ focus from entry to step through the completions then RET activates * [done] visit-location url defaults to current * [done] ESC to cancel interactive command * [done] C-g to cancel key sequence +* [done] display unbound key error +* [done] back binding +* [done] save url history, use it in completions * custom rendering for completions (e.g. buffer thumbnails) * less ugly default completions rendering * 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 +* bind event to echo-area click, ideally dependent on what's being shown + in there * in general, can we bind commands to widget events? -* display unbound key error * autocomplete command name * command to create new buffer * keyboard navigation of completions +* suppress "Return is undefined" message after a command executes + ---- - -I think we're misusing the commander to show url and error messages -and key prompts. It's OK to have that part of the screen be multipurpose -but philosophically those things are not related to the command system. - -- hide commander when inactive and replace it with echo area -- move it to bottom? - -commander can't hide itself, it needs to ask its parent to hide it diff --git a/test/buffer.fnl b/test/buffer.fnl new file mode 100644 index 0000000..3fc654c --- /dev/null +++ b/test/buffer.fnl @@ -0,0 +1,8 @@ +(local Buffer (require :buffer)) + +(let [_ (Buffer.new "first") + _ (Buffer.new "second") + _ (Buffer.new "third") + _ (Buffer.new "through") + _ (Buffer.new "throughput")] + (assert (= (# (Buffer.match "")) 5)))