emacs-devel
[Top][All Lists]
Advanced

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

Re: Lisp files that load cl-lib in problematical ways


From: Ihor Radchenko
Subject: Re: Lisp files that load cl-lib in problematical ways
Date: Tue, 24 Oct 2023 13:01:45 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> > What do you want to be customizable, and how?
>> 
>> What I have in mind is a custom list of packages to be dumped.
>
> You can easily edit lisp/loadup.el and add whatever you want.  So this
> possibility already exists.

Indeed, custom dump is already possible, as described in the article I
linked to.

I meant something more interactive that takes care about arranging all
the internal details like running batch Emacs, setting up load-path, and
loading the packages.

>> > Isn't that already available using dump-emacs-portable?  Or am I
>> > missing something?
>> 
>> (1) It does not work interactively.
>
> Doesn't M-: work?

Nope.

Debugger entered--Lisp error: (error "Dumping Emacs currently works only in 
batch mode.  If you’d like it to work interactively, please consider 
contributing a patch to Emacs.")
  (dump-emacs-portable "~/tmp/emacs-pdumped")
  (eval (dump-emacs-portable "~/tmp/emacs-pdumped") t)

>> (2) Even making it work non-interactively is not necessarily trivial.
>>     See 
>> https://archive.casouri.cat/note/2020/painless-transition-to-portable-dumper/index.html
>
> These are bugs we still need to find and fix.  But adding arbitrary
> Lisp packages to loadup.el is also likely to cause bugs, since
> dumping Emacs is a tricky business in any case.

That's my point. If we can carefully select built-in packages that can
be safely dumped, we can generate Emacs executable tailored for user
configs.

For example, imaginary M-x dump-emacs-portable-interactively might check
the loaded features, filter them according to built-in libraries known
to be safe for dumping, and generate Emacs image that will pre-load
these libraries. This way, Emacs startup time will be reduced while not
adding unnecessary bloat, with "unnecessary" defined by the user config
rather than general considerations that must apply to every possible
Emacs user.

-- 
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]