Closed alphapapa closed 5 years ago
Thank you for your comments.
I meant this package to be an implementation of something like petri nets for Emacs (but it is not strictly a petri net). A prototype corresponds to a place/task, and an action to a transition/routing. Actions are specific to a context (i.e. prototype/frame) and can be defined during work but can be persisted. An action can be used like a keyboard macro, but it is a Lisp sexp/command and defined for a particular kind of frame. Actions are available via completing-read
interface in the frame (frame-workflow-select-action
) but also can be assigned a keybinding like in a Hydra (frame-workflow-action-map
).
For example, I am thinking of defining the following prototypes for myself:
home
prototype with an org-agenda as an actionemacs-lisp
prototype with a mode purpose for writing Emacs Lisp packageI definitely need to add examples of prototype configuration. I will create a Wiki and add some example to it.
Yes, protototypes and actions are like objected-oriented. They are saved to the custom file. I didn't consider using EIEIO, because I don't know how to use it. Is it easy to serialize EIEIO objects? I plan to add several features to frame-workflow, but I have to build a clean core before it is developed. Any contribution is welcome.
EIEIO can be confusing at first, but it's actually very simple to use. All you need is defclass
and defmethod
to start. I haven't experimented with serialization myself, but Emacs has eieio-persistent built-in: https://www.gnu.org/software/emacs/manual/html_node/eieio/eieio_002dpersistent.html
I might be interested in contributing in the future, after I grok the project. I'll be looking forward to the examples. :) Thanks.
BTW, if you start using EIEIO, you might find this useful: https://github.com/alphapapa/elexandria/blob/master/elexandria.el#L38 You can see an example of using it here (where it's named matrix-defclass
): https://github.com/jgkamat/matrix-client-el/blob/client-ng/matrix-api-r0.3.0.el#L114
Thank you. I will check it soon.
Hey,
This looks very cool! It's always fun to see another package that integrates with one you made. Here are a couple of suggestions:
I read through the readme, and I think I sort of understand what it means, but it would help to have some examples of "prototypes" and "actions". IOW, I'm not sure what I would actually use this package to do in Emacs.
The talk of prototypes and actions and methods sounds object-oriented. Have you considered using EIEIO? :)
Thanks for sharing your work.