emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [POLL] Should we accept breaking changes to get rid of Org libraries


From: Max Nikulin
Subject: Re: [POLL] Should we accept breaking changes to get rid of Org libraries that perform side effects when loading?
Date: Mon, 27 Mar 2023 22:14:01 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 26/03/2023 00:45, Ihor Radchenko wrote:
I am then CCing Bastien, as, despite the Elisp convention, following it
will break https://bzg.fr/en/the-software-maintainers-pledge/

I hope, it may be mitigated to some degree, e.g. loading of `org-modules' and `org-babel-load-languages' may include their activation. Perhaps `org-require-package' should activate the loaded package as well.

If it is possible to avoid user prompt in org-ctags then migration may be done in 2 steps separated by a year: add new require helper and do not activate by default. Unsure if it is possible to add some warnings on first step that activate function is not called.

(defun enable-feature (feature &optional filename noerror)
   "Load and enable FEATURE.
FILENAME and NOERROR arguments are the same as in `require'."
   (when (require feature filename noerror)
     (let ((enabler-cmd (intern (format "%s-enable-function" feature))))
       (and (fboundp enabler-cmd) (funcall enabler-cmd)))))

I would prefer activating on first call only, subsequent calls should be no op.

(defun disable-feature (feature)

I had a hope that existing `unload-feature' is enough.

My idea was something like `org-require' that is (require feature) and (feature-activate) or (feature-activate-function) *once*.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]