42 votes

How to start Emacs without the cmd.exe window (on MS Windows)?

Instead of opening emacs.exe directly, open runemacs.exe. This will open Emacs without the extra window in the background.
Ryan's user avatar
  • 4,049
22 votes

replace splash screen with list of recentf

There's also a package on MELPA for this now: dashboard: https://github.com/rakanalh/emacs-dashboard. The package allows you to have a splash screen as in the image below: Here's the use-package ...
tirocinium's user avatar
17 votes
Accepted

How can I improve startup time despite many packages?

One of the design choices in package.el was to try and make things "simple". Part of this is that package-initialize searches for all the packages that are installed, then tries to figure out which ...
Stefan's user avatar
  • 26.4k
15 votes
Accepted

How to disable lisp-interaction when starting Emacs?

You can customize the value of initial-major-mode, which defaults to lisp-interaction-mode. Here's the variable's docstring: initial-major-mode is a variable defined in startup.el. Its value is ...
Dan's user avatar
  • 33k
14 votes

Speed up Emacs start-up time

Whatever your .emacs and its improvements, you also should consider running emacs as a server at your session's opening : emacs --daemon Now, running emacs with emacsclient -t or emacsclient -...
david's user avatar
  • 273
10 votes
Accepted

How to auto-toggle NeoTree on startup?

neotree-mode is a major mode for the neotree buffer, and major mode functions do not take any arguments, so calling (neotree-mode t) is an error. You wouldn't want to invoke that mode yourself, ...
phils's user avatar
  • 51.1k
10 votes
Accepted

Replace welcome screen (aka "splash" screen) with calendar?

You can customize option initial-buffer-choice (using M-x customize-option). The value can be a buffer name (the name of your calendar buffer, if it exists - e.g. "*Calendar*") or a function that ...
Drew's user avatar
  • 77.5k
10 votes
Accepted

How to prevent Emacs from creating two windows on startup Windows 10?

Instead of using the emacs command, use the runemacs command (which is provided in the Emacs distribution, in the same bin directory as emacs.exe. emacs is a command-line program that can run Emacs ...
Sue D. Nymme's user avatar
  • 1,456
9 votes
Accepted

What is the difference between `-Q` and `-q --no-init-file --nosplash`

Q also uses --no-site-lisp. See the Emacs manual, node Initial Options. For information about X resources, see node Resources. Learn to ask Emacs: C-h r, then i and type some text to match an ...
Drew's user avatar
  • 77.5k
8 votes

Speed up Emacs start-up time

1) I have found esup to be a very convenient for Emacs startup profiling. You just run M-x esup and get back list of all expressions in your init.el sorted by the time they took to execute. You don't ...
Zaript's user avatar
  • 81
7 votes
Accepted

How to customize a lazy-loaded variable?

Replace '(progn ...) with (progn ...) By putting the quote there you are specifically telling emacs NOT to evaluate the code in your progn. In fact you don't need progn at all. It looks like you are ...
Jordon Biondo's user avatar
7 votes
Accepted

How to re-load a package?

You can unload the system prolog mode first, this unbinds all its variables, so that the new defvar init-forms will take effect: (require 'prolog) (when (version< prolog-mode-version "1.25") (...
npostavs's user avatar
  • 9,203
7 votes
Accepted

Emacs Mac OSX after upgrade to 26.2 launches only in `-nw` mode

You want to use the Homebrew cask for Emacs. That will install a "brewed" package of Emacs from https://emacsformacosx.com/. brew cask install emacs The "regular" Homebrew package for Emacs is built ...
nega's user avatar
  • 3,221
6 votes
Accepted

Loading addition org files along with default scratch buffer

Place two lines at the bottom of your .emacs file using find-file and adjust the path to the file locations. If you want them loaded in the background only, then use find-file-noselect instead of ...
lawlist's user avatar
  • 19.1k
6 votes
Accepted

Handle stale desktop lock files after emacs/system crash

You can check if the process is still alive using system command ps -p $PID, then delete the lock file if the process is not still alive. The following modification of init2.el above shows how this ...
Håkon Hægland's user avatar
6 votes

Handle stale desktop lock files after emacs/system crash

Building on the accepted answer, this two line solution loads for me without a locked prompt. (setq desktop-load-locked-desktop t) (call-interactively 'desktop-read t (vector "~/.emacs.d/desktops/" ...
בנימן הגלילי's user avatar
6 votes
Accepted

How can the start up log of Spacemac be viewed?

You should be able to see it in *Messages* buffer. You can use SPC w p m (Spacemacs specific) or C-x 4 b to visit that buffer in another window (or C-x b to visit it in the same window). (When ...
Enze Chi's user avatar
  • 1,470
6 votes

How can I improve startup time despite many packages?

The problem you describe about package-initialize taking so much time to load is a well known problem. It is also one of the problems that some emacs frameworks try to solve by loading the autoloads ...
UndeadKernel's user avatar
6 votes

Speed up Emacs start-up time

Side note, it is generally considered a good idea to have your startup code in ~/.emacs.d/init.el rather than ~/.emacs, one less hiden file in your home directory, a suffix so that other editors can ...
icarus's user avatar
  • 1,914
6 votes
Accepted

how to show latest xkcd in dashboard on startup?

xkcd-mode uses ~/.emacs.d/xkcd/ to cache the images, xkcd-cache-dir. So, you just need to set dashboard image variable, dashboard-banner-official-png, as the last cached image, xkcd-latest, and ...
adl's user avatar
  • 646
6 votes
Accepted

Is there an efficient way to tell which parts of my startup of Emacs take the longest to load?

This does it: (setq use-package-verbose t use-package-minimum-reported-time 0) We get in *Messages*: Loading package x...done (0.021s) Configuring package x...done (0.020s) Loading package y......
scribe's user avatar
  • 1,035
5 votes

Removing tool bar oddly slow

A slightly less general but simpler version of what tool-bar-mode does: (push '(tool-bar-lines . 0) default-frame-alist) The same can be done with menu-bar-mode and the menu-bar-lines frame ...
Basil's user avatar
  • 12.4k
5 votes
Accepted

Current directory of Emacs in batch mode

You can use command-line-default-directory, it is intended when using Emacs in batch mode, or when processing command line options: Default directory to use for command line arguments. This is ...
Lindydancer's user avatar
  • 6,160
5 votes

package-initialize: wrong type argument : arrayp , nil

I had the same problem and applied the following fix. This worked for me: Change the address for the melpa archive to: "http://melpa.org/packages" Delete the ~/.emacs.d/elpa/archives/melpa/archive-...
Thorkil Værge's user avatar
5 votes
Accepted

Restore welcome screen buffer when closed

M-: (fancy-about-screen), or call (fancy-about-screen) from your Lisp code. It shows this: This is GNU Emacs, one component of the GNU operating system. GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-...
Drew's user avatar
  • 77.5k
5 votes
Accepted

Set an Elisp var on the command line and read it in the init file

This doesn't work because command line options are processed after the init file. This allows the command line to refer to functions and variables defined or loaded in the init file, and allows the ...
xuchunyang's user avatar
  • 14.5k
5 votes
Accepted

How to open multiple files without automatically activating the "Buffer List" split?

The user option which determines whether a Buffer Menu is displayed is inhibit-startup-buffer-menu: inhibit-startup-buffer-menu is a variable defined in ‘startup.el’. Its value is nil Documentation: ...
Basil's user avatar
  • 12.4k
5 votes
Accepted

require vs. package-initialize?

You should be able to use require, yes, but only after running package-initialize (in Emacs≥27, this is done for you before the beginning of the .emacs file). Note that for 99% of the packages ...
Stefan's user avatar
  • 26.4k
5 votes

Why doesn't set-background-color work in my init file?

set-background-color does work in your init file! It's just that the setting is overridden later in Emacs's startup process, which goes (in part) something like this: load site init files load user ...
Sue D. Nymme's user avatar
  • 1,456

Only top scored, non community-wiki answers of a minimum length are eligible