musing.md (2571B)
1 # Braindump 2 3 This is a combination of a thinking-out-loud document and a TODO list. 4 It is not a document of record. You should not expect to derive value 5 from reading it 6 7 tl;dr what if ... a web browser, but tabs were more like emacs buffers? 8 9 ## objects/data types 10 11 buffer 12 Buffer.find ;; by name, title, url 13 Buffer.by_name (maybe?) 14 15 buffer has-a webview but it is not shown by default. Later we may 16 add some kind of webview reuse so that invisible and old buffers 17 don't need to have a webview until needed. 18 19 I seem to be using "buffer" and "tab" mostly synonymously 20 21 frame 22 Frame.the-frame 23 frame.set-buffer (buffer) 24 frame.get-buffer => buffer 25 frame.commander - text entry widget 26 frame.actions - container of toolbar buttons 27 28 in future we may be able to split a frame into multiple windows 29 which show different buffers 30 31 location (url) 32 document 33 document element(?) 34 webview 35 lua's standard types 36 37 ----- 38 39 a consideration we haven't touched on yet: in emacs, not all buffers 40 are files - e.g. the buffer list, or the process list, or the magit 41 status buffer - there is a well-used affordance for elisp to put 42 semi-persistent interactable content onscreen - do we need such a 43 thing here or is it ok to say "just call gtk" to command authors? 44 45 ---- 46 47 48 is there a role for TAB? 49 50 - in the shell it activates completion or shows options: we don't need that if we're updating them automatically 51 52 - we could use it to cycle through the available completions: switch 53 focus from entry to step through the completions then RET activates 54 55 56 ----- 57 58 # TODO 59 60 * [done] show loading progress 61 * [done] show url when the commander is inactive 62 * [done] visit-location url defaults to current 63 * [done] ESC to cancel interactive command 64 * [done] C-g to cancel key sequence 65 * [done] display unbound key error 66 * [done] back binding 67 * [done] save url history, use it in completions 68 * [done] autocomplete command name 69 * [done] keyboard navigation of completions 70 71 * custom rendering for completions (e.g. buffer thumbnails) 72 * less ugly default completions rendering 73 * buffer name is often going to be useless. find buffers by url/title 74 still need some 1:1 mapping between the buffer object and 75 a text-representable form of same 76 * bind event to echo-area click, ideally dependent on what's being shown in there 77 * in general, can we bind commands to widget events? 78 * command to create new buffer 79 80 * suppress "Return is undefined" message after a command executes 81 82 ---- 83 84 can we increase the testability? e.g. for command processing, 85 define a command, feed in some keystrokes,