On 12/12/2022 17:25, Ihor Radchenko wrote:
Max Nikulin writes:
I am afraid, requirement that loading should not cause side effects is
too strict and it will make usage inconvenient. Examples:
- ol-info calls `org-link-set-parameters'.
We have `org-modules' that can handle calling `org-link-set-parameters'.
Sorry, but I have not got your idea. Currently `org-modules' is just a
list of packages that should be loaded with org.el.
It is possible to introduce some convention either in Org or in Emacs to
add default action for a package. Then in addition to just loading a
package (with no side effects) a set of functions should be implemented
that loads and *activates* the package.
- org-protocol installs an advice for `server-visit-files'. (It should
not be necessary, but currently Emacs does not provide a better option.)
Can we ask Emacs devs to help us with this problem?
org-protocol may use approach similar to emacsclient-mail.desktop
without advice:
Exec=sh -c "exec emacsclient --alternate-editor=
--display=\\"\\$DISPLAY\\" --eval \\\\(message-mailto\\\\
\\\\\\"%u\\\\\\"\\\\)"
By adding another bunch of backslashes and a bit more complex shell
command it is possible to avoid at least obvious issues with the command
above.
Actually I have created
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59743
Implement `command-line-args-left' for emacsclient --eval expressions
but I was too late to the party. The discussion in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57752
28.1.91; emacsclient-mail.desktop doesn't work for me
was stalled with no outcome.