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
0 votes
3 answers
2k views

use-package can't load package at startup

When I start Emacs I get the error message Error (use-package): Cannot load counsel But when I open init.el in a buffer and run eval-buffer everything works fine. What I'm doing wrong? My Emacs ...
5 votes
5 answers
803 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 ...
0 votes
1 answer
88 views

emacs opens from Windows start menu but not terminal

I upgraded a few months ago to Emacs 29.1. Everything appeared to work until I tried to open Emacs from a terminal. Here is the error message Warning: arch-independent data dir 'c:/Program Files/Emacs/...
1 vote
1 answer
118 views

where is emacs saving files to open after launch?

I am using Spacemacs but I think this shouldn't matter for this question. For some reason I am not able to find the place where Emacs is storing the files to reopen after launch. I've greped for a ...
1 vote
1 answer
357 views

Transition to emacs 29.1, "Eager macro-expansion failure" error at startup

On windows 10 at this time. Transitioning from emacs 27.2 -> 29.1 Emacs 27.2 starts up and runs the code in the .emacs and custom file ok. Downloaded emacs 29.1 to try it out. Emacs 29.1 errors out ...
3 votes
3 answers
5k views

Customize startup screen text

I want to add a string to the startup screen. I found this question and customized the fancy-startup-text variable, like this (add-to-list 'fancy-startup-text '("\nYou are running a customized ...
1 vote
1 answer
285 views

Slow start-up in MS Windows and relation to the Windows registry

I am using Doom in MS Windows with Emacs 27.2. I am experiencing some very slow start-up times (I included the output of benchmark-init/show-duration-tree at the end). Also, the first actions I ...
0 votes
2 answers
1k views

Elpa + Melpa Certificate information issue at startup

I hadn't used Emacs for a few weeks and when I started it up I discovered issues with certificate information for elpa, melpa and orgmode. When I launch Emacs I get the following message: The TLS ...
1 vote
1 answer
102 views

How do I start non-GUI Emacs on the commandline?

How do I start non-GUI Emacs on the commandline? emacs-no-x11 doesn't seem to be in recent Emacs versions.
0 votes
1 answer
1k views

Doom Emacs start-up problems

Running Doom Emacs 2.0.9 on Emacs 27.1. In my init.el I have org-roam enabled like so: :lang (org +roam +journal) In my config.el I also load org-habits, hide it in initial agenda view and set-up a ...
1 vote
1 answer
380 views

Setting position of initial frame from user defined values

I would like to set the frame position of the initial frame, by letting the user position the frame where he wants. I can then save the cons cell in a variable which will then be used for set-frame-...
0 votes
1 answer
21 views

Strange behavior of win desktop shortcut

The emacs installer puts a shortcut on the desktop that works perfectly. If I open the emacs/bin folder, choose emacs.exe an the "Send to desktop" it creates a different kind of shortcut. ...
0 votes
1 answer
94 views

why does emacs open an empty buffer named "BLANK" on startup?

When I start emacs, it opens an empty buffer named BLANK. I have no idea where this comes from and would like to not have it there, since there's nothing in it and it clutters up the buffer list. I do ...
0 votes
1 answer
73 views

How does startup.el work (on Debian 12)

I'm using the emacs/stable,stable,now 1:28.2+1-15 Debian package with Doom and am trying to change startup behavior. I made backups of startup.el.gz and startup.elc located at /usr/share/emacs/28.2/...
0 votes
1 answer
67 views

How can Emacs evaluate a variable before adding to a list?

I've seen a few similar questions, but I load this in my init.el and org-agenda-custom-commands is still empty when Emacs starts, so I have to evaluate this code block manually. I basically just want ...
0 votes
0 answers
111 views

AucTeX doesn't start properly

I just moved to an M2 Mac and simultaneously abandoned AquaMacs for Emacs 28.2. Everything more or less works, except that after installing AucTeX, it fails to start properly, giving me internal--...
0 votes
0 answers
25 views

How can I find out that an Org Agenda file had been opened with 'inhibited startup'?

My Emacs is opening the Agenda file in the background with org-agenda-inhibit-startup locally bound to t. When I switch to such a file, all trees are therefore displayed open (no folding). I would ...
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 ...
0 votes
2 answers
661 views

Kill initial buffers

I want to kill some buffers created by default, such as the GNU Emacs, but putting: (kill-buffer "*GNU Emacs*") On the .emacs doesn't work. I guess this code is called before the initial buffers are ...
1 vote
1 answer
86 views

Problem with packages when emacs is run as a daemon

I have a very odd problem when Emacs daemon is started by the system. Currently, I work on: Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-01-03 After ...
1 vote
3 answers
43 views

Load default.el configured by libraries but not the user's init.el

As far as I understand libraries can define a default.el file that will be loaded on startup. I would like to run librarie's default.el, but not the init file of the user (e.g. in .emacs/init.el). Is ...
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 ...
0 votes
0 answers
262 views

Prevent emacs from calling melpa/updating on startup

This is already the 2nd time I can't start emacs as one single package on a server can't be found. My current configuration works fine and I'd rather have a reliable system than one that is always up ...
2 votes
1 answer
48 views

FILE(s) Passed by Shell to Emacs to Visit

The FILE mentioned in the title, is what in $ emacs FILE or $ emacs -file FILE or something else similar. How do I know whether there’s a FILE / FILEs set for Emacs to visit at startup? If there’...
0 votes
0 answers
131 views

Emacs 28.2 does not open from finder/dock on OS X Monterey

I downloaded Emacs 28.2 (released 2022-09-12) for OS X from here. When I try to open it from Spotlight search or the dock, it sometimes bounces, sometimes hangs, but never opens. I can open it from ...
2 votes
1 answer
658 views

How do I hide the welcome screen if and only if one or more files are opened by emacs upon startup?

Right now, if I do "emacs foo1 foo2" emacs will open with foo1 and the welcome screen showing in two windows splitting the frame vertically. Instead, I want to be shown foo1 and foo2. ...
1 vote
0 answers
80 views

How to ignore (for recentf) files opened automatically during start-up

Some modes, on Emacs start-up, load a lot of files automatically. Example: Org-mode refreshes its agenda by reading every file configured to contain agenda items. But these "read the file ...
1 vote
2 answers
61 views

What variable holds filenames specified on Emacs command line?

What variable can Emacs Lisp access, to know the filenames specified on the command line that was used to invoke this Emacs session? The general command-line-args contains the remaining command-line ...
2 votes
3 answers
888 views

How to configure emacs to start in the middle of the screen, and not in the top left corner?

Currently have a GUI version of GNU Emacs v.26.3 (on MacOS Catalina, also have a similar version on Ubuntu 16.04), and because I'm just getting started with the editor, I have this question: how do I ...
0 votes
0 answers
75 views

lsp-pyright defer init until a .py file is open

Hey guys i'm improving my startup, Emacs version 28.2. I did a benchmark on init and I noticed that the thing that takes most of the time is lsp-pyright. That initializes lsp-mode. But I don't ...
0 votes
1 answer
59 views

Why is debug-on-error always enabled at startup?

Whenever I start up emacs, debug-on-error is enabled. I can't figure out why, there's nowhere where I explicitly enable it. Is there any way for me to figure out where it's coming from?
1 vote
1 answer
220 views

How can I make emacs load `environment modules`?

I keep packages organized on my laptop using environment modules (http://modules.sourceforge.net/). Hence if I need a particular version of python, I can do module load python39 etc. Now if I first ...
0 votes
1 answer
114 views

change starting buffer from *scratch* to recentf-open-files

I like the buffer that is opened when type M-x recentf-open-files. I'd love to have it as my starting buffer instead of scratch, but I don't know how. I've tried adding '(initial-buffer-choice '...
2 votes
1 answer
49 views

How to NOT connect to daemon?

When invoking emacs, is there a way to specify that it should not connect to any emacs daemon, but instead should run as an isolated instance?
1 vote
1 answer
103 views

Enabling --debug-init from within .emacs

Emacs can be started with the -debug-init command-line option. But how can I enable the command line option from within my .emacs file?
0 votes
1 answer
501 views

The latest Emacs initialization hook

I am currently running Emacs as a desktop with EXWM. And I am trying to run some apps on startup to see them in a EXWM's systemtray: (defun run-auto-start () (start-process-shell-command "...
0 votes
2 answers
92 views

How to open a startup file in view-mode?

I configured Emacs (28.1) to open an index file (index.org) at startup. Now I would like this file to be opened in view-mode. I tried (setq initial-buffer-choice "~/PATH/index.org") (view-...
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 ...
0 votes
1 answer
80 views

Trying to open Diary on startup but Emacs is launching in split screen, how can I stop it

I have (diary) setup in my .emacs file so that it will launch diary on launch but it always launches in horizontal split screen with fancy diary mode on bottom and Scratch on top. I've inhibited the ...
0 votes
0 answers
239 views

Mac terminal nw user: how do I start emacs in gui mode? My /Application folder of Mac doesn't have an emacs icon

how do I start emacs in gui mode? My /Application folder of Mac doesn't have an emacs icon I only need gui mode maybe a week, say when editing a html document with inline images. my-silica $ which ...
2 votes
2 answers
2k views

Where is the file for the Fancy Startup Screen

I'm trying to find where the contents of the *GNU Emacs* buffer, aka fancy startup screen, are located on my hard drive. M-x eval-expression buffer-file-name returns nil. The buffer-file-name ...
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 ...
1 vote
2 answers
546 views

How to make GNU Emacs start automatically right after booting and start with having much used files in buffers?

When I switch on my computer, 1st things I do: Open GNU Emacs, C-x C-f [file name A], Enter, C-x C-f [file name B], Enter, C-x b, Enter - in doing so going back to buffer of file A - C-x s, es - ...
0 votes
2 answers
140 views

How to use `initial-scratch-message` variable to display mutliple status informations after start

I want to use the scratch buffer to display some status informations after starting emacs. I read I can use initial-scratch-message variable for this. But I do not know how to set it up. Here you see ...
0 votes
1 answer
54 views

How can I remove more libs to reduce loading at startup?

When I view the number of commands or functions through M-x I notice so many that I never use. However I also didn't load them explicitly in my init.el either. I do use use-package and have ...
0 votes
0 answers
41 views

Emacs Not Running When I Try to Open a File (Windows)

I'm trying to upgrade my Emacs distribution from 25 to 27 (aspell no longer works... I use Emacs for org mode and LaTeX). When I select runemacs.exe, emacs starts just fine. It uses my init file. I ...
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 ...
0 votes
1 answer
91 views

Why not store all .el/.elc Elpa files inside the same directory to speed up Emacs startup?

Would it not be possible to modify Emacs package system to store all Emacs Lisp files installed from Elpa-compliant packages inside the same directory? That would dramatically reduce the number of ...
1 vote
1 answer
485 views

Why does setting use-package-always-ensure cause Emacs to contact package repositories at startup?

I have the following in my init.el: (setq use-package-always-ensure t) because I want packages referenced by use-package to be downloaded automatically if I don't have them. When I enable this ...
1 vote
0 answers
15 views

Release terminal filestreams on start

I want emacs to release (instead of grabbing) the parent terminal when started through the command line. Better if it is possible to send error messages to some temporary file. By that I mean ...