[Top][All Lists]

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

Re: About early-init right use.

From: tomas
Subject: Re: About early-init right use.
Date: Tue, 2 Apr 2019 08:39:00 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Apr 02, 2019 at 01:54:36AM +0200, Ergus wrote:
> Hi guys,
> Maybe this is a dumb question, but I am trying to update my setup to use
> the newer early-init file. I made similar questions some days ago, but
> it is still not clear to me (and I don't find a explicit documentation
> about this yet).
> What's the main advantage for the new early-init file and what are the
> variables or portion of the configuration that should (or you recommend)
> to moved there?

Here's a quote from the 27.0.50 manual (Node "Customization > Init File >
Early Init File"):

    49.4.6 The Early Init File
    Most customizations for Emacs should be put in the normal init
    file, ‘.emacs’ or ‘~/.emacs.d/init.el’.  However, it is sometimes
    desirable to have customizations that take effect during Emacs
    startup earlier than the normal init file is processed.  Such
    customizations can be put in the early init file,
    ‘~/.emacs.d/early-init.el’.  This file is loaded before the
    package system and GUI is initialized, so in it you can customize
    variables that affect frame appearance as well as the package
    initialization process, such as ‘package-enable-at-startup’,
    ‘package-load-list’, and ‘package-user-dir’.  Note that variables
    like ‘package-archives’ which only affect the installation of new
    packages, and not the process of making already-installed packages
    available, may be customized in the regular init file.
    *NotPackage Installation::.
       We do not recommend that you move into ‘early-init.el’
    customizations that can be left in the normal init files.  That is
    because the early init file is read before the GUI is initialized,
    so customizations related to GUI features will not work reliably
    in ‘early-init.el’.  By contrast, the normal init files are read
    after the GUI is initialized.  If you must have customizations in
    the early init file that rely on GUI features, make them run off
    hooks provided by the Emacs startup, such as ‘window-setup-hook’
    or ‘tty-setup-hook’.  *Note Hooks::.
       For more information on the early init file, *note (elisp)Init

(Sorry: I'm too stupid to find an online version of a 27-ish manual.
There /must/ be such a thing, I'm sure).

Paraphrasing it, I'd say: "don't touch early-init.el unless you know
what you're doing" ;-)

-- tomás

Attachment: signature.asc
Description: Digital signature

reply via email to

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