Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [start-up]

About starting and initializing an Emacs session

Filter by
Sorted by
Tagged with
46 votes
3 answers
5k views

What can I do to speed up my start-up?

What are some basic things I could do to reduce the start-up time? Is there anything in particular I should pay attention to, for that matter? Note: Startup time can be mitigated by starting Emacs ...
caisah's user avatar
  • 4,096
36 votes
2 answers
11k views

package-initialize: wrong type argument : arrayp , nil

while going through the emacs as a c/c++ editor , I came across the following lines of code to include in my ~/.emacs file, to connect to melpa archives for package installation (require 'package) (...
lazarus's user avatar
  • 463
23 votes
1 answer
9k views

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

It says emacs/bin/emacs.exe. If it's not necesarily useful, I'd like to stop it from starting with emacs. The extra window is messing me up a bit.
Evan Adler's user avatar
23 votes
2 answers
7k views

Is there any downside to setting `gc-cons-threshold` very high and collecting garbage when idle?

I added the following two lines to the top of my init.el: (setq gc-cons-threshold (eval-when-compile (* 1024 1024 1024))) (run-with-idle-timer 2 t (lambda () (garbage-collect))) That means that ...
Nova's user avatar
  • 1,119
22 votes
2 answers
5k views

How can I improve startup time despite many packages?

TL;DR I have such a huge amount of packages that it's hurting my startup time. If you don't believe that could be the case, read on. My Emacs startup time is quite small. I don't use use-package, I ...
GDP2's user avatar
  • 1,350
20 votes
3 answers
5k views

replace splash screen with list of recentf

The splash screen is useful in the beginning, but now I want something more useful: I want to have list of recently opened files presented when starting emacs if there is no predefined file to open. ...
biocyberman's user avatar
14 votes
2 answers
6k views

Why does Emacs take longer to start on Windows than on Linux?

Configuration: One system OS Windows 10 as dual boot OS Ubuntu 15.10 as dual boot Emacs 25.0.1 with GUI I have one dot-emacs file and everything in my .emacs.d folder (the packages also are located ...
ReneFroger's user avatar
  • 3,880
11 votes
3 answers
667 views

How does Emacs manage to start instantaneously with many el-files?

As every Emacs'er will know, I'm currently suffering from my extensive dot-Emacs configuration. All my packages are within the containers of use-package, and I bytecompiled all of my .el-files. Even ...
ReneFroger's user avatar
  • 3,880
11 votes
1 answer
1k views

Emacs desktop-save-mode - only save desktop when previous desktop was fully restored

I have the following in my .emacs: (desktop-save-mode 1) (setq desktop-restore-eager 10) (setq desktop-save t) Often I have a lot of buffers open (100 or so), then this really helps - as emacs is ...
Christian Herenz's user avatar
9 votes
1 answer
10k views

require vs. package-initialize?

Ok, this is a noob question but I've digging into this enough that I think it's reasonable to ask :) My question: In one's .emacs / init.el file, can one use require to load packages that were ...
MikeTheTall's user avatar
8 votes
4 answers
8k views

Speed up Emacs start-up time

I have seen this thread but my problem is an order of magnitude larger. Also, a newbie, I did not understand much of what was being discussed there. So, this new question. I am running Emacs 25.2.2 ...
deshmukh's user avatar
  • 1,912
8 votes
2 answers
958 views

How to disable lisp-interaction when starting Emacs?

When I open Emacs, the *scratch* buffer is in Lisp Interaction mode, but I don't want that. How can I make the buffer have a text mode instead of Lisp Interaction?
new Q Open Wid's user avatar
8 votes
1 answer
2k views

How do I start a shell automatically after starting emacs

One of my main reasons for using Emacs is to get a powerful environment after sshing into a remote machine. The first thing I do after starting Emacs is to run M-x shell to get a command line. As it ...
TooTone's user avatar
  • 401
7 votes
2 answers
215 views

Why expression fails in init file, but works fine during session [duplicate]

I want to understand why an expression of the form (load-theme 'my-kewl-theme t) fails1 when run as the last expression in my init (~/.emacs) file, but works fine if I evaluate it as soon as soon as ...
kjo's user avatar
  • 3,247
7 votes
3 answers
3k views

Handle stale desktop lock files after emacs/system crash

If Emacs or the system crashes when desktop-save-mode is active, Emacs leaves a stale desktop lock file. The next time the desktop is loaded (from another Emacs process ID), loading is interrupted ...
Håkon Hægland's user avatar
7 votes
1 answer
2k views

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

When I start Emacs not from the command line on Windows 10 it creates two windows, not one. Is there any way to make the blue window go away? I usually need 4-5 instances of Emacs running so it ...
A_P's user avatar
  • 672
7 votes
1 answer
1k views

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

I have started seeing some strange X related behaviour in emacs. I have not been able to pin it down. It goes away when I run emacs -Q, but is still present when running emacs -q --no-init-file --...
Daniel Mahler's user avatar
7 votes
1 answer
411 views

Removing tool bar oddly slow

(tool-bar-mode 0) takes up 11% of my initialization time (about a third of a second). It's not that big of a deal; it's just strange. I've tried it on multiple computers. I've also tried disabling ...
Matthew Piziak's user avatar
7 votes
1 answer
2k views

emacs command-line-default-directory variable is not set correctly

I'm using Emacs on Windows. I also have a VirtualBox VM that I connect to using plink. But then, when I use the eshell, and I do cd <some folder> it tells me No such directory found via CDPATH ...
Jenia Ivanov's user avatar
6 votes
2 answers
4k views

How to load all .el files at start-up

Usually there are many .el files in the folders with the name lisp in the installation directory of Emacs. At start-up, Emacs doesn't load all these files, in consequence a command like M-x calendar-...
Name's user avatar
  • 7,881
6 votes
2 answers
2k views

Restore welcome screen buffer when closed

How do I open startup/splash/welcome screen/message buffer (*GNU Emacs*) when it's not listed in list-buffers ?
Paweł Audionysos's user avatar
6 votes
2 answers
5k views

How to lazy load init files to speedup Emacs startup?

My ~/.emacs.d/init.el file looks like this: (package-initialize) (require 'init-my-emacs-settings) (require 'init-my-emacs-performance) (require 'init-my-emacs-font) (require 'init-my-emacs-color-...
stardiviner's user avatar
  • 1,938
6 votes
1 answer
6k views

Programming of Initial-buffer-choice

I need to make a function that will choose an org mode file if emacs was called with no arguments, and basically go about its way otherwise. So far I have (defun personaltodo () (if (= 1 (...
Bronze's user avatar
  • 113
6 votes
1 answer
3k views

Is it possible to disable the startup screen only when emacs opens a file?

Whenever I issue $ emacs, I am greeted by the startup screen. I like this. However, when I issue $ emacs foo.txt, emacs opens foo.txt and the startup screen in a split screen. I do not like this. Is ...
Brian Fitzpatrick's user avatar
6 votes
1 answer
170 views

How can one restore buffers on startup in correct order?

I use desktop-save-mode in order to restore buffers on startup. However, the buffer which is visible immediately after startup is *scratch*, *Messages*, .bbdb, etc. I am not interested in those. Is ...
Torsten Bronger's user avatar
6 votes
1 answer
3k views

"Unable to activate package" when starting Emacs

I get the following message when starting Emacs: Warning (emacs): Unable to activate package `elpy'. Required package `highlight-indentation-0.5.0' is unavailable Warning (emacs): Unable to activate ...
Amelio Vazquez-Reina's user avatar
6 votes
1 answer
377 views

How to configure emacs to show the file I was working on when I open emacs?

I have save-place and save-visited-files installed however whenever I start emacs first a directory list shows (result of another setting in .emacs), I close it and then a few message buffers show up ...
Reza's user avatar
  • 211
5 votes
3 answers
6k views

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

I want to replace the welcome screen with the calendar. I've tried adding (calendar) to my .emacs but it opens calendar in addition to the welcome screen not instead of it. EDIT: I'm trying what is ...
Philip Kirkbride's user avatar
5 votes
2 answers
278 views

Incremental Search after opening file

Being fairly new to GNU Emacs and intend to use it as a replacement to vi/vim where possible, I came across an obstacle, I seem not be able to overcome. In vim (similar to less) you can provide a ...
Phoenix's user avatar
  • 351
5 votes
2 answers
505 views

How to load start up screen (*GNU Emacs*) f it hasn't already been created?

When you run Emacs in daemon mode and then connect to it with emacsclient it doesn't show the start screen (*GNU Emacs*) but instead puts you into the *scratch* buffer, which is normally fine. But if ...
HarryFromMarydelDE's user avatar
5 votes
5 answers
805 views

emacs starts in extremely tiny window

Emacs has been starting up in an extremely small window for some reason. The text size is normal, but the window is something like 3 lines tall x 10 chars wide. Of course I can use my mouse and just ...
xdavidliu's user avatar
  • 223
5 votes
2 answers
2k views

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

I upgraded to Emacs 26.2 on my Mac OSX Sierra instance via "brew". After the upgrade, the emacs command will not open a new "GUI window", i.e. it runs as if I passed the -nw args or ran it from an ...
user331465's user avatar
5 votes
1 answer
89 views

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

I have been trying to make the start-up times better. Almost all of my init.el is broken into use-package declarations like this: (use-package x ...) (use-package y ...) (use-package z ...) I want to ...
scribe's user avatar
  • 1,035
5 votes
1 answer
2k views

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

Running emacs with multiple files automatically opens the "Buffer List" split-window. eg: emacs -Q *.txt Opens a split window, one which contains a list of buffers. How can multiple files be ...
ideasman42's user avatar
  • 8,826
5 votes
2 answers
2k views

How to show startup screen instead of scratch, when no file is opened?

Like a lot of people I think I activated inhibit-startup-screen because it’s ugly and tedious to always have your emacs horizontally split when you open a file with half taken by an useless startup ...
galex-713's user avatar
  • 245
5 votes
1 answer
84 views

What mix of customisations are required to have org files always open exactly as they were closed?

org-customize has a node for startup folded, with options no fold, fold, content, and show everything. There doesn't seem to be an option for "remember last folded state". For such a customisable ...
sooheon's user avatar
  • 481
4 votes
3 answers
807 views

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

I'm trying to set a variable at load-time: # emacs --eval '(defvar myvar t)' Now, in this session, if I C-h v myvar RET I get a nice t. But if I put (message "MYVAR: %s" myvar) in my init file, I ...
yPhil's user avatar
  • 983
4 votes
2 answers
867 views

How to re-load a package?

The situation I have is this. First, I run (require 'prolog) ...which loads the system's default version of prolog.el, and makes the variable prolog-mode-version available. It has value "1.22". ...
kjo's user avatar
  • 3,247
4 votes
2 answers
1k views

Keep spacemacs from retrieving package archives at startup

I'm trying to figure out a way to speed up my spacemacs start time. The main offender at the moment is the refreshing of package archives at start. I was hoping that setting dotspacemacs-check-for-...
flooose's user avatar
  • 521
4 votes
2 answers
581 views

emacs -nw -q takes long time

emacs -nw -q or emacs -nw -Q takes more than 10 seconds to start in terminal, but the result of M-x emacs-init-time is 0.0 seconds, and the emacs takes shorter time (still more than 5s) than emacs -nw ...
CodyChan's user avatar
  • 2,649
4 votes
3 answers
1k views

Is it possible to install emacs 25.1 and emacs 24 on the same machine?

I currently have emacs 24.5.1 running on OSx el capitan. Since the first RC of emacs 25.1 released a few days ago, I am very curious to try it out. Can I have both versions installed on the same ...
Chakravarthy Raghunandan's user avatar
4 votes
1 answer
249 views

Is `loadup.el` hard-coded, such that `-nl` (aka --no-loadup) is futile?

I would like to create my own startup.el, and it seems that loadup.el is what causes startup to do its thing -- i.e., (load "startup"). I see that an option for starting Emacs is -nl or --no-loadup; ...
lawlist's user avatar
  • 19.2k
4 votes
2 answers
2k views

Portable Emacs: Remapping user-emacs-directory

The Problem I want to install Emacs on a USB Flash Drive in a portable fashion, that is, Emacs should be able to be run from the UFD, once plugged on a device, without predefined paths to its ...
antonio's user avatar
  • 1,822
4 votes
2 answers
137 views

Prevent TTY fallback when X fails

I frequently forget to start my X server before I fire up emacs. Obviously emacs will attempt to open an X window and fail. In older versions of emacs (I forget when this changed) the behavior was ...
ericx's user avatar
  • 283
4 votes
1 answer
383 views

How to improve autoloading of Magit's git-commit-mode and other minor modes

Aim I would like to arrange for Magit's minor mode git-commit-mode to be enabled whenever a relevant Git file (e.g. COMMIT_EDITMSG) is visited, from both within Emacs (e.g. magit-commit) and without (...
Basil's user avatar
  • 12.5k
4 votes
1 answer
281 views

How to detect if emacs starts with a file?

I would like to be able to implement the following logic. (if (developer-opened-file-with-emacs) (do nothing, get on with working as fast as possible) (load fancy splash screen that may take ...
ideasman42's user avatar
  • 8,826
4 votes
1 answer
2k views

How to init emacs with an option (such as `--debug-init`)

This might be a very silly question, and that's maybe why there's no answer on the internet. I'm using Windows 10. And I tried to click on properties, and then change the ending of the file's name ...
user10926715's user avatar
4 votes
0 answers
3k views

Extremely slow startup on Windows - How to debug?

I have a serious problem with an extremely slow spacemacs startup (emacs-init-time = ~200s). (The server works, but this is so slow I cannot debug some other problems that I am trying to fix) My ...
guest's user avatar
  • 41
3 votes
4 answers
2k views

How to replace the default contents of the scratch buffer with the contents of a file (if it exists)?

I would like emacs to check for a ~/emacs.d/scratch.txt and use it's contents instead of the default message when emacs starts. How can this be done?
ideasman42's user avatar
  • 8,826
3 votes
3 answers
3k views

How to make size of Emacs frame persistent?

When I start Emacs (by clicking on a desktop icon), its frame is too big for the screen, so the mode-line/mini-buffer area is not visible. It's not difficult to resize and reposition the frame, but ...
kjo's user avatar
  • 3,247