Max Nikulin writes:

> Thank you, such approach, unlike mine example, does not have code
> duplication. On the other hand it loads org-protocol on any remote
> command, not only for "files" representing org-protocol URIs. Maybe
> defadvice in org-protocol.el should be changed by newer advice-add with
> a function containing body of the old advice.

Yes, I replaced the original code with advice-add (not fully tested).

(advice-add 'server-execute :before
            (defun enable-org-protocol (&rest r)
              (unless (featurep 'org-protocol) (require 'org-protocol))))

--
Tianshu Wang

Reply via email to