emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] org-reload reloads unnecessary files


From: Ihor Radchenko
Subject: Re: [BUG] org-reload reloads unnecessary files
Date: Sat, 24 Jun 2023 12:54:33 +0000

Max Nikulin <manikulin@gmail.com> writes:

> `org-reload' reloads obarray and oclosure libraries that are unrelated 
> to org-babel and org-cite. I believe, the function should not do it.

Confirmed. The regexp used to match Org libraries is too inclusive.

> ... I suspect `org-reload' may have another issue 
> similar to the one that `package--list-loaded-files' had. If an .el.gz 
> is loaded for some reason instead of the corresponding .elc file than 
> `org-reload' may fail to detect it. I have not tried to test it though.

It should not, by accident.

(feats (delete-dups
                 (mapcar 'file-name-sans-extension
                         (mapcar 'file-name-nondirectory
                                 (delq nil
                                       (mapcar 'feature-file
                                               features))))))

`file-name-sans-extension' only strips the last extension in .el.gz.
Yet, (org-load-noerror-mustsuffix "foo.el") works the same way as
(org-load-noerror-mustsuffix "foo") when we pass UNCOMPILED argument to
`org-reload'.

We should still fix the case when the loaded file is ".el.gz" though.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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