Open jingkaimori opened 1 year ago
This is an excellent idea. I think we don't need to add much to improve a lot the user experience.
The following would already be great:
We can already download files from an url, but we can't unzip on all platforms. A minimal library like libzip
could work well.
Additional information on why loading a plugin has failed would also be great, but I don't know if there is a mechanism to retrieve this.
Where is plugins stored on users' device
On linux and macOS, the path will be changed. Currently, we are using $HOME/.Xmacs
which is not a good place to install plugins.
For Linux, a subdirectory of $XDG_DATA_HOME
(or $HOME/.local/share
if not defined) would be suitable.
If a plugin is implemented in C++/Rust/... which could be compiled to wasm, we should deliver the binary in wasm but not one for Unix, another for Windows.
XDA_DATA_HOME
to me feels more like a directory for persistent data, while downloaded plugins can be safely deleted. Making an analog to Emacs' elpa, we can store downloaded plugins in ~/.Xmacs/tspa
(TeXmacs Scheme Plugin Archive), and add some mechanism like site-lisp
to allow users to load plugins (possibly and other scm files) from directories they want.
Users should open a gui from mogan, which lists all plugins available for mogan, all plugins installed at local storage, and status of these plugins. Then users select plugin to install, update, remove or modify its setting.
When a plugin is detected, mogan should let user decide whether to activate the plugin. After activating plugin, mogan should tell user information and errors encountered in plugin execution.
Design of this tool should be discussed:
%APPDATA%
$HOME/.local/share
if not defined)