Questions tagged [start-up]

About starting and initializing an Emacs session

Filter by
Sorted by
Tagged with
41
votes
3answers
3k 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 ...
30
votes
2answers
8k 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) (...
19
votes
2answers
3k 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 ...
18
votes
3answers
3k 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. ...
17
votes
1answer
2k 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 ...
14
votes
2answers
4k 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 ...
11
votes
3answers
403 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 ...
10
votes
1answer
965 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 ...
9
votes
1answer
4k 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.
8
votes
1answer
1k 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 ...
7
votes
2answers
177 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 ...
7
votes
1answer
236 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 ...
6
votes
4answers
2k 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 ...
6
votes
1answer
429 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?
6
votes
1answer
576 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 --...
6
votes
1answer
103 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 ...
6
votes
1answer
2k 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 ...
6
votes
1answer
1k 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 ...
5
votes
2answers
819 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 ?
5
votes
2answers
193 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 ...
5
votes
2answers
81 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 ...
5
votes
2answers
2k 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-...
5
votes
2answers
1k 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 ...
5
votes
1answer
71 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 ...
5
votes
1answer
175 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 ...
4
votes
2answers
399 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". ...
4
votes
2answers
1k 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 ...
4
votes
3answers
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 ...
4
votes
1answer
145 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; ...
4
votes
1answer
644 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 ...
4
votes
1answer
2k 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 (...
4
votes
2answers
82 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 ...
4
votes
1answer
3k 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 ...
4
votes
2answers
1k 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 ...
3
votes
1answer
3k views

How to auto-toggle NeoTree on startup?

I would like to have NeoTree automatically toggle-open upon Emacs start up. I have tried adding: (neotree-mode t) under my: (require 'neotree) line in ~/.spacemacs (and yes, I am using Spacemacs ...
3
votes
2answers
2k views

How to detect Windows XP vs Windows 7 in startup file?

Presently, I'm testing for windows like this in my startup for Emacs v23.1.1: (if (eq system-type 'windows-nt) (load-library "visual-basic-mode")) However, this is true for both Windows 7 and ...
3
votes
1answer
603 views

How to customize a lazy-loaded variable?

In Spacemacs, how can I customize a variable used in a layer that's loaded lazily? Specifically, I'm trying to use Zathura and Synctex with Spacemacs' Latex layer. I have the following code in my ...
3
votes
2answers
419 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 ...
3
votes
3answers
454 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?
3
votes
1answer
240 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 needs 4-5 instances of Emacs running so it ...
3
votes
1answer
74 views

Was Emacs launched with a filename argument?

Suppose I want Emacs to be configured differently depending on whether or not it was launched with a filename as an argument. Is there a way I can deduce this as part of my init file? One way is to ...
3
votes
1answer
893 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 ...
3
votes
2answers
367 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-...
3
votes
1answer
223 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 (...
3
votes
1answer
1k 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 ...
3
votes
1answer
1k views

How can I override initial-buffer-choice if I specify a filename at command line?

In my .emacs file I have the following line in custom-set-variables: '(initial-buffer-choice "~/Programming/C++/<some project I'm working on>") This works great. However, I use emacs to edit ...
3
votes
0answers
408 views

Startup Emacs Daemon With Elfeed (RSS Feed Reader) Buffer

What I would like to accomplish is this: Allow emacs daemon to start with my start up applications like normal When I open an emacs frame I would like only the first one to start with my rss news ...
3
votes
0answers
76 views

Emacs Trunk: How to prevent creation of home directories in `load-path`

In the Emacs Trunk build -- i.e., built --with-ns, I have the following entries that get added automatically to my load-path when launching without any user configuration: "." "./Applications" "./...
2
votes
2answers
2k 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-...
2
votes
3answers
1k 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 ...