Description
A dispatcher will interpret calls to actions before actions exist. This saves us from having to create actions. It can also solve interesting coordination problems.
#+begin_src elisp
(message "I am first")
#+end_src
#+attr_dslide_macro: [111 105 97 119 106 101 102 32 32 84 104 105 115 32 105 115 32 97 32 109 97 99
114 111]
In the current Dslide, these will occur out of order if you order the actions incorrectly. There is no way to have them in order going both forwards and backwards because actions are called in reverse order when going backwards.
Keyword Registry vs Longer Keywords
To simplify markup and only hydrate actions as needed, the dispatcher just needs to be configured with an affiliated keyword registry. Propertize would use #+attr_dslide_propertize:
and images would use #+attr_dslide_image:
etc.
The alternative is to use
#dslide: action-class :config-1 value :config-2 value '(remaining stuff like keyboard macros) '(and other data as needed)
Where This was decided against because actions would have to read the value into a plist instead of just looking at the keyword when deciding which elements to map over.action-class
is letting us know what to dispatch to already.
Quoting & Evaluation
Function calls may be encoded in the configuration line. To support this, we would want to require quoting of lists. Vectors also differentiate lists of data versus intent to evaluate an expression at runtime.
Indeed, babel does evaluate quoted expressions for parameters. It seems we are to treat unquoted forms in org as liable to be evaluated (a bad idea if you ask me, but it is what it is).
The Slide is the Dispatcher?
Just like how the babel blocks are labelled with directions and called in order, the dispatcher should be able to alternate between actions, selecting the right action when going the right direction, to encode the forwards-backwards ordering in a decidable way.
The slide class might just become the dispatcher. It would make sense because slide's live on top of their actions. Currently, the slide is the dispatcher, just a rather limited one. Because state in dslide is anticipated to go away when slides go away, this design would completely make sense.
Activity