we are amused
This commit is contained in:
parent
e639e4c73d
commit
bdd4507692
63
musing.md
63
musing.md
@ -1,41 +1,10 @@
|
|||||||
what if ... a web browser, but tabs were more like emacs buffers?
|
# Braindump
|
||||||
|
|
||||||
buffer attributes:
|
This is a combination of a thinking-out-loud document and a TODO list.
|
||||||
- url
|
It is not a document of record. You should not expect to derive value
|
||||||
- viewport (this is a departure from the emacs buffer)
|
from reading it
|
||||||
|
|
||||||
## commands
|
tl;dr what if ... a web browser, but tabs were more like emacs buffers?
|
||||||
|
|
||||||
A command is a description of a function that may be invoked
|
|
||||||
interactively, and the parameters it expects.
|
|
||||||
|
|
||||||
```fennel
|
|
||||||
(define-command "visit-location"
|
|
||||||
visit-location
|
|
||||||
{:url Type.Url input-from-minibuffer})
|
|
||||||
|
|
||||||
;; hit "g" and then enter the location in the minibuffer
|
|
||||||
(bind-key "g" (command "visit-location"))
|
|
||||||
;; hit "h" to go straight to your home page
|
|
||||||
(bind-key "h" (command "visit-location")
|
|
||||||
{:url (Type.Url "https://home.example.com")})
|
|
||||||
;; left mouse click on minibuffer hit "h" to go straight to your home page
|
|
||||||
(bind-event Dunlin.minibuffer :button-1-click (command "visit-location"))
|
|
||||||
```
|
|
||||||
|
|
||||||
when it is run from the command prompt, each parameter is
|
|
||||||
prompted, with appropriate defaults.
|
|
||||||
|
|
||||||
when it is bound to a key chord/sequence, the binding may specify
|
|
||||||
where it gets its parameters from - otherise
|
|
||||||
|
|
||||||
visit-location
|
|
||||||
visit-location-in-new-buffer
|
|
||||||
run-command
|
|
||||||
back
|
|
||||||
switch-to-buffer
|
|
||||||
save-file
|
|
||||||
save-link
|
|
||||||
|
|
||||||
## objects/data types
|
## objects/data types
|
||||||
|
|
||||||
@ -47,6 +16,8 @@ buffer
|
|||||||
add some kind of webview reuse so that invisible and old buffers
|
add some kind of webview reuse so that invisible and old buffers
|
||||||
don't need to have a webview until needed.
|
don't need to have a webview until needed.
|
||||||
|
|
||||||
|
I seem to be using "buffer" and "tab" mostly synonymously
|
||||||
|
|
||||||
frame
|
frame
|
||||||
Frame.the-frame
|
Frame.the-frame
|
||||||
frame.set-buffer (buffer)
|
frame.set-buffer (buffer)
|
||||||
@ -54,15 +25,25 @@ frame
|
|||||||
frame.commander - text entry widget
|
frame.commander - text entry widget
|
||||||
frame.actions - container of toolbar buttons
|
frame.actions - container of toolbar buttons
|
||||||
|
|
||||||
|
in future we may be able to split a frame into multiple windows
|
||||||
|
which show different buffers
|
||||||
|
|
||||||
location (url)
|
location (url)
|
||||||
document
|
document
|
||||||
document element(?)
|
document element(?)
|
||||||
webview
|
webview
|
||||||
lua's standard types
|
lua's standard types
|
||||||
|
|
||||||
|
## next steps
|
||||||
|
|
||||||
# getting started
|
* change define-command so that the parameters are ordered
|
||||||
|
* display unbound key error
|
||||||
gtk stuffz for frame/commander/initial buffer
|
* ESC to cancel interactive command
|
||||||
command parser hooked to commander
|
* autocomplete command name
|
||||||
visit-location command
|
* parameters with non-string values (e.g. buffer)
|
||||||
|
* show current url when command inactive
|
||||||
|
* show prompts for parameter
|
||||||
|
* multiple buffers
|
||||||
|
- create buffer
|
||||||
|
- list buffers (where does the output go?)
|
||||||
|
- find and switch to buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user