Questions tagged [init-file]

for questions about initialization files `.emacs` or `init.el. DO NOT USE this tag if you assume answers require tweaking initialization files because many solutions do not involve directly manipulating initialization files.

Filter by
Sorted by
Tagged with
1
vote
1answer
9 views

What is the difference between emacs -Q -u [my-user] and emacs -Q -l [my-init-file.el]

I have all my emacs config in .emacs.d/init.el. The first command in that file is: (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) When I ...
0
votes
0answers
19 views

(org-babel-load-file (expand-file-name “~/.emacs.d/config.org”)) behaves strangely on Windows 7

In my initialization file the line (when (file-readable-p "~/.emacs.d/config.org") (org-babel-load-file (expand-file-name "~/.emacs.d/config.org"))) give me the error: *Warning (...
0
votes
1answer
21 views

Auctex change default comment style for latex-mode

I want a double %% to start my comments in latex documents. I'have found two solutions suggested ;; solution 1 (add-hook 'latex-mode-hook '(lambda() (setq comment-start "%% "))) ;; ...
3
votes
1answer
49 views

setq require-final-newline not working when setq-default does

I want all my files to end with only one newline, while trimming trailing whitespaces on regular lines. Like so : ($ is newline face) text$ $ last_line$ I use whitespace-cleanup in my init file, like ...
0
votes
0answers
72 views

No such file or directory: dash

Since few days I am getting this error but I don't remember changing anything in my configuration. I have dash installed on my system. I was thinking then it needs dash Emacs package, but after ...
5
votes
1answer
49 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 ...
0
votes
2answers
29 views

How to remove second row of menu entries (or is it a toolbar)?

I have installed OpenSuse Tumbleweed and later Emacs. If I start Emacs from the shell, $ emacs -Q I have a double row of menu entries File - Edit - Options - ... - Help New File - Open - Open ...
1
vote
1answer
17 views

How do I use global-unset-key for non ASCII characters?

I am using QWERTZ with Czech layout and to write certain characters like { and } I have to press down option, however in my emacs (using the emacsformacosx version) the option key is bound to the Meta ...
0
votes
1answer
49 views

How to configure lsp-cmake lsp server in vanilla emacs

I want to setup lsp-cmake lsp server in my vanilla emacs. I just installed lsp server using pip install cmake-language-server. I don't know how to configure in my emacs init.el to use the lsp server. ...
0
votes
0answers
60 views

From stock Emacs to Emacs Doom - Issues with Key Bindings and de-activating Evil-mode - ORG-MODE use

I have migrated to emacs-Doom and wish to keep the emacs vanilla key-bindings. I also use emacs exclusively for org-mode I have amended the init.el file to remove the evil and removed any attributes ...
0
votes
1answer
43 views

What is the system-wide location for init.el?

Is there a way to have a common init.el for several system users? /etc/emacs.d/init.el for example?
0
votes
0answers
41 views

Getting uninstall packages offer after package updates

Each time I call up list-package and update, I get this message after the updates Operation finished. Packages that are no longer needed: 43. Type ‘M-x package-autoremove’ to remove them Below is ...
0
votes
1answer
41 views

User emacs has no home directory

I am an emacs newbie running emacs doom on Linux. I am learning how to use traditional emacs in my free time and have an emacs config file that I want to test out. I launch my traditional emacs by ...
0
votes
1answer
59 views

Different folder for .emacs (not HOME)

My company's I.T. department has assigned our HOME directory to a network server. With the COVID-19 pandemic we are now using VPN to connect to the company's network. Having to to go through VPN to ...
1
vote
1answer
47 views

org-babel-tangle error

I am experiencing a very unusual (concerning) error with my org-mode installation, and I am afraid that something might be broken. First, I have this setup in my .emacs file ;; Use my org-mode file as ...
1
vote
1answer
19 views

How to investigate defmacro* (with asterisk) error on an old emacs package

I'm trying to load the defhook package without success. The code defines a macro using defmacro* (with the asterisk at the end), and I can't find any info about it. (The fact that the '*' is ignored ...
1
vote
2answers
104 views

(load-theme) at the bottom of .emacs, or manually renders a different screen

Adding this line at the very end of the .emacs file, that loads a default theme coming with the Emacs package, (load-theme 'tsdh-dark) the (main) screen looks like Note the black-on-dark text, the ...
0
votes
1answer
45 views

Show only headers in outline mode when I open my dot emacs

I use outline-minor-mode to organize my .emacs file. I have this code at the end to activate it in the file: ;;; Local Variables: ;;; eval: (outline-minor-mode 1) ;;; eval: (hide-body) ;;; outline-...
0
votes
0answers
31 views

Emacs tries to read init.el from remote machine during start-up

I have a very weird issue since a few days without being aware of any change in my set-up. I run Emacs 27.1 (on macOS installed via macports) on my laptop and on my desktop computer with a very ...
0
votes
0answers
72 views

Disable package refreshing when starting emacs

I have bad internet connection. Starting spacemacs takes a long time because of the "refreshing package archive melpa or gnu or others...". or "installing package: ...". When i ...
0
votes
1answer
37 views

Idiomatic way to store and access custom LaTeX code

I have some latex classes or bunch of packages I use and that I'd like to move out of my init.el because it keeps on growing and I want them to be standalone. How can I make them accessible from my ...
2
votes
1answer
31 views

storing string in variable fails to work in `early-init.el`

Putting the following code in my early-init.el causes my emacs not to startup. (require 'cl-lib) (defvar void-initial-frame-font (cl-find-if (lambda (font) (find-font (font-spec :name font))) ...
0
votes
0answers
77 views

Configure x-export-frames to take svg screenshots (Mac/OSX)

Using this reddit post as inspiration, I am trying to create a screenshot-svg command using the following config: (defun screenshot-svg () "Save a screenshot of the current frame as an SVG ...
1
vote
3answers
88 views

How to prevent M-x package-install from editing my ~/.emacs file?

When I install packages with M-x package-install, it edits the ~/.emacs file and adds the following content: (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by ...
2
votes
0answers
91 views

Installing quelpa-use-package from use-package

Currently I have the following init file to install and use use-package: ;; Package.el (require 'package) (package-initialize) (setq package-enable-at-startup nil) (add-to-list 'package-archives '(&...
0
votes
1answer
24 views

I need a key binding of: “M-x compile” then in Compile commant type the “Compile command: love2d /home/huseyin/Documents/Programming/Lua/”

I need a key binding of: M-x compile then in compile command type like Compile command: love2d /home/huseyin/Documents/Programming/Lua/ I am tired of doing that again and again.
1
vote
1answer
57 views

Initializing forge-alist

I am trying to initialize Magit Forge's forge-alist programatically. Therefore I put together my first couple of emacs-lisp code. It looks like the following: (let ((gitlab-install (lambda (host) (...
1
vote
2answers
42 views

How to prevent emacs from converting short form quote ( ' ) to literal “quote” in custom set variables, etc?

I usually use Emacs 27.1, but on a particular remote machine, it has Emacs 26.3 installed instead. After cloning my dotfiles repository onto this remote machine, all of the "custom set variables&...
1
vote
0answers
48 views

Can't access elpa when initializing

I'm trying to install exwm on NixOS 20.09. I use emacs 27.1. My init file: (require 'package) (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") ...
0
votes
2answers
64 views

Cannot open .gpg file in emacs after upgrading to 27.1

I was upgraded from RHEL 7.6 to 7.8 last week. After upgrade my emacs (v25.3) was broken and I got the following error: error while loading shared libraries: libMagickWand.so.5: cannot open shared ...
0
votes
1answer
44 views

org-mode-hook is always evaluated

I'd like org-mode to use a particular theme. To this end, I've put the following in my init.el: ;; Setup org-mode theme (defun org_setup() "Setup org-mode" (load-theme 'doom-laserwave) ...
1
vote
1answer
132 views

Emacs can't connect to GNU archive

I'm having a very basic problem with getting my emacs to talk to the GNU package repository. The contents of my .emacs are (require 'package) (package-initialize) (package-refresh-contents) When I ...
0
votes
1answer
77 views

Issue while trying to use chemacs

I am currently trying to use chemacs on my computer, following the instructions given on github, but I do not seem to be able to make it work properly. My goal would be to be able to use both Emacs 24....
1
vote
1answer
34 views

Only run a function if it is a new session

In my init.el file, I have a hook to setup my workspace when I open a particular type file. Specifically, when I open an R file (i.e., *.R) and ESS-mode starts, a couple of other windows open with ...
0
votes
0answers
18 views

Calendar: symbols-function-definition is void: “appt-make-list”

When in the "calendar", typing "d", which runs (diary-view-entries), gives me an error Symbols-function-definition is void: "appt-make-list". It shows the (one) entry for ...
0
votes
1answer
63 views

Why isn't org-agenda skipping DONE tasks?

I'm trying to set up a planning process for the day (like in http://newartisans.com/2007/08/using-org-mode-as-a-day-planner/), but my org-agenda keeps showing DONE tasks, even though I set org-agenda-...
2
votes
1answer
48 views

Some commands in init.el don't run on startup, but others seem to run fine

I am having a very weird issue with my init.el file. At startup, some of the commands in it run fine (so I know Emacs is able to pick the correct file), but others only run when I manually load the ...
0
votes
2answers
87 views

macos environment variables?

I'd like to set things up so that I can use emacs on multiple computers, with the .emacs.d directory shared amongst them (via DropBox). My solution so far has been to use environment variables which ...
0
votes
2answers
44 views

Face setting doesn't work for client sessions

I wanted to change the colours of Anzu's counter, taking the foreground from the Isearch match background and the background from the fringes, like this So I evaluated (face-spec-set 'anzu-mode-line `...
0
votes
0answers
65 views

Error: Symbol's function definition is void: which-key-mode

My init-which-key.el contains the following code, (require 'package) (defun my/which-key-setup () "Startup configuration for which-key." (unless (package-installed-p 'which-key) (...
1
vote
1answer
51 views

Emacs keybinding for switching tab via number

In Emacs 27.1, using tabbar. Trying to switch to tabs using numbers. Editing ~/.emacs with following lines doesn't switch tabs using C-1. Produces C-u 1 and so on. What is missing here? Any other ...
1
vote
1answer
46 views

How to enable mode for all files

What do I put in my init to enable a mode for all files? Say I want to have auto-fill-mode enabled at all times. I've seen this post and some others, but all are focused on a specific task. I'd like ...
0
votes
0answers
36 views

Is it safe to comment out the “custom-set-variables” part in your init file?

Recently I had some font lock mess with auctex (similar to this). To solve the problem I commented out my init file part for part and realized that the problem is inside the custom-set-variables ...
1
vote
0answers
83 views

Cannot figure out why vc-git.elc is always loaded on startup

This is more a curiosity, than a necessity. I'm playing around with startup times, and to have something to compare with, I wanted to see how fast emacs could start up pure. Running emacs -Q, emacs-...
1
vote
1answer
49 views

unescaped character literals detection error

When I reload my init file I get an error (or warning) saying unescaped character literals `?(', `?)', `?[', `?]' detected! What does this error (warning) mean and how can one fix it?
0
votes
1answer
48 views

Change location for straight.el working directories?

I’d like to put my dotConfig files into DropBox, including my .emacs.d folder. I’d like to use these across computers and across OS’s. I’ve split out part of my init.el into per-computer files (...
0
votes
1answer
109 views

Emacs company-css, where is the completion of css values?

Company-mode completion seems a little weak in emacs. Is it my configuration? Property completion seems simple enough: strong { color: red; /* <= color is the property */ } Where red is the ...
0
votes
1answer
55 views

Change `standard-indent` for 1 specific major mode

I author web apps with the web-mode in GNU Emacs, and I use 2 spaces for indentation. After I examined the web-mode source, I found out that the mode defaults to the standard-indent variable, which in ...
0
votes
1answer
143 views

Byte compilation error with use-package

The beginning of my ~/.emacs.d/init.el file looks like this: ;; MELPA (require 'package) (setq package-enable-at-startup nil) (setq package-check-signature nil) (add-to-list 'package-archives '("...
1
vote
3answers
2k views

How can I find my Emacs init file?

I have read the guide found here: How Emacs Finds Your Init File I cannot find any .emacs directory in my home directory. I have show hidden files selected. I also cannot find the init.el file in ...

1
2 3 4 5
13