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
0 votes
0 answers
11 views

Bug-hunter finds error but it shouldn't (false positive)

I suspect I'm doing something very stupid but I can't figure out what. I have some problems with Eshell, and I was advised to use Bug-hunter. I installed it through Elpa. When I launch it (M-x bug-...
user avatar
0 votes
1 answer
63 views

command-execute error with straight.el

I have just tried to setup magit using straight.el in my init file as follows: (use-package magit :straight t :bind ("C-x g" . magit-status) :commands (magit-status ...
user avatar
0 votes
1 answer
25 views

Emacs Social Sciences Starter Kit - Not Loading

I am trying to install Kieran Healy's Emacs Social Sciences Starter Kit. I think I followed the instructions meticulously (details below) but – to cut to the chase – when I launch emacs, I get vanilla ...
user avatar
0 votes
1 answer
43 views

Update emacs after changing init settings

Is it possible to update emacs after changing my init settings without having to fire another session?
user avatar
  • 107
0 votes
0 answers
76 views

How to prevent `desktop-save-mode` from opening multiple windows?

I want to restart Emacs at the same cursor position in the file (or buffer) I was just working on. In my Emacs config I have the following code to try and do this: (use-package desktop :straight ...
user avatar
1 vote
0 answers
43 views

Enabling helm interferes with R/ESS

I have helm enabled in an Org file that init.el calls. The code looks like the following: (use-package helm :config (require 'helm-config)) (global-set-key (kbd "M-x") #'helm-M-x) (...
user avatar
  • 153
0 votes
1 answer
49 views

Windows making my init.el file into a .txt file

I'm trying to do a basic setup of emacs on my Windows 10 machine. I've used emacs in the past on an Ubuntu system. When I try to make a init.el file in an emacs.d directory it turns my .el file into ...
user avatar
  • 1
1 vote
1 answer
58 views

Get current point position in elisp function

I want to make a logger that display line number of the point. In init.el I wrote the following function: (defun logger () "Print logger" (print (concat "print(\"" (what-...
user avatar
  • 27
3 votes
2 answers
326 views

Why does Emacs not load the init file when using sudo?

My Emacs init file works fine in general. But, if I am in my home directory and if I execute: pwd /home/pedro sudo emacs /etc/nixos/hosts.nix For some reason, this opens vanilla Emacs without ...
user avatar
0 votes
6 answers
107 views

Make `.emacs` more robust

I share an .emacs file on two machines. About once per month I find that Emacs on one machine or the other fails to load the file. Just today the error was: File error: https://melpa.org/packages/with-...
user avatar
1 vote
1 answer
20 views

general-create-definer and flycheck's "the function foo is not know to be defined"

In my init.el file, I use the package general and the following line (general-create-definer foo/leader-keys and then later (foo/leader-keys I use the package flycheck to lint the code in the init-...
user avatar
  • 111
1 vote
0 answers
32 views

Key Binding not Working

I have the following code as shown below for my .emacs file. For some reason the keybinding is not working nor are the extensions for deft I am pretty sure. Does anybody know why this is? (require '...
user avatar
0 votes
1 answer
59 views

Literate Emacs Configuration Exclusion

When using literate configuration, is there a way to exclude code blocks? Maybe tag the babel blocks to include or exclude? Any great ideas?;)
user avatar
0 votes
1 answer
126 views

lsp mode problems: not enabled, and clangd include file not found

I am trying to configure lsp-mode with clangd using emacs 28.1 (compiled from source), and encounter two problems that I do not manage to solve: First, `lsp-mode` is not started automatically when I ...
user avatar
  • 121
3 votes
2 answers
182 views

Obviate the need to specify every folder for a manual setup

I run all my Emacs packages manually without any package manager. My setup is a simple init.el file with this kind of direction: (add-to-list 'load-path "~/.emacs.d/packages/ace-window") (...
user avatar
  • 1,060
1 vote
1 answer
84 views

How does one fix the Warning (initialization): An error occurred while loading error?

What does this error mean: Warning (initialization): An error occurred while loading ‘/Users/brandomiranda/.emacs’: Wrong number of arguments: (3 . 4), 2 To ensure normal operation, you should ...
user avatar
0 votes
1 answer
69 views

"Invalid read syntax: . in wrong context"

I wanted to add a new display setting to init.el file, but didn't like it and removed the line. Now when I start emacs I get this error: Invalid read syntax: . in wrong context Here is the init.el ...
user avatar
1 vote
0 answers
43 views

~/.config/emacs and .emacs.d for config?

I've had just one single .emacs since the 1980s (not kidding). I feel like it's finally time to modernize, literatize, and put it in a modern place. I see that emacs now prefers ~/.config/emacs/init....
user avatar
  • 406
0 votes
2 answers
94 views

Tools for locating and debugging errors

I am getting the following error, but am finding it difficult to locate the problem. Are there any tools for debugging in such instances? Warning (initialization): An error occurred while loading ‘/...
user avatar
  • 159
1 vote
1 answer
36 views

second frame not using values from default-frame-alist

I'm just starting to customize emacs on RHEL8, the entirety of the .emacs file is this: (setq default-frame-alist '((width . 80) (height . 40) (menu-bar-lines . 1))) When starting Emacs this sets the ...
user avatar
1 vote
0 answers
23 views

Set a non-default font for latin characters

I want to display phonetic alphabet characters alongside general text in a somewhat coherent manner. My default font is JetBrains Mono, so at the very least, the characters of the phonetic alphabet ...
user avatar
1 vote
1 answer
47 views

Configure new commands in orgmode

I want to have custom commands for my documents in Org (which I export to Latex) for this I use \newcommand. I use a template that I load with #+setupfile, but if I define the new commands in that ...
user avatar
  • 21
0 votes
0 answers
29 views

How to setup GTK emacs to open files in its current instance instead of opening a popup window?

Spent a lot of time on this and tried various solutions on the internet. Please help. Using the following emacs version. Want to run it in GUI mode on an Ubuntu 20.04 server, same issue happens on ...
user avatar
  • 1
1 vote
2 answers
42 views

Is there a way to get the name of the current file being opened?

I'm trying to conditionally load configuration in my init.el. How can I get the filename (preferable the extension) of the current file being opened? For example, if I run emacs foo.rs, I'd like to ...
user avatar
1 vote
1 answer
78 views

How do I find the init.el file on windows?

I'm currently stuck with not finding the init.el file, how do I find it on Windows and how do I load it?
user avatar
  • 11
0 votes
0 answers
27 views

indent-region inconsistent with existing code that's indented more than python-indent-offset

Say I have an existing, simple block of code that uses an indent width of 4, as such def incDictValue(d, k): if not k in d: d[k] = 1 else: d[k] += 1 return and setup ...
user avatar
2 votes
1 answer
63 views

How can I change the default `init.el` file Emacs automatically searches for?

I am new to emacs. Following the instruction online, the default customization file is in my home directory and is under the name .emacs. I want to follow the tutorial I am currently going over and ...
user avatar
  • 131
4 votes
2 answers
80 views

How can I enable electric indentation for all modes except some?

I am trying to enable electric-indent-mode for all modes except fundamental-mode, where it is just annoying. In my init file, I have the following: (electric-indent-mode +1) (add-hook 'after-change-...
user avatar
  • 41
0 votes
1 answer
221 views

Error enabling flyspell in emacs - aspell MacOS

I am having some difficulty getting flyspell/aspell to run on emacs 27.2, MacOS 12.01. I think I need to install or enable a dictionary, but no ideas on how to do this. If I type 'M-x flyspell-mode' I ...
user avatar
1 vote
1 answer
46 views

Ivy minibuffer colums not left-justified with my setup

I am following System Crafters series on Emacs from Scratch on YouTube. With my configuration as I have set it up, Ivy doesn't appear in nice left-justified easy-to-read columns. I am trying to figure ...
user avatar
0 votes
1 answer
91 views

What to put into 'init.el' vs 'config.el' in Org-mode?

I'm using Org-mode to configure Emacs in a file 'config.el', which is really unstructured meanwhile. On the other hand, lots of configurations (for exemple the configs made with the menu) are in Emacs'...
user avatar
1 vote
0 answers
35 views

Cannot change font size in org-agenda in fresh emacs installation

After running this in my shell: $ sudo dnf -y remove emacs $ sudo dnf clean all $ rm -f ~/.emacs $ rm -r ~/.emacs.d $ sudo dnf -y install emacs $ emacs foo.org # existent file Then, within ...
user avatar
0 votes
1 answer
90 views

init-open-recentf with use-package

I want to use use-package for nearly everything in my init.el. I have set up recentf. And to make the recent-file buffer pop up when Emacs starts I also included the init-open-recentf package. But I ...
user avatar
  • 509
0 votes
1 answer
287 views

Problem loading packages with Emacs 28

I have installed Emacs 28 with snap from https://snapcraft.io/install/emacs-28. My init.el is configured using use-package. However, I get the following errors when I try to install and load custom ...
user avatar
0 votes
1 answer
272 views

symbol's function definition is void

My dotemacsfile looks like the following. (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) (package-initialize) ;load and activate ...
user avatar
0 votes
1 answer
28 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 ...
user avatar
0 votes
1 answer
49 views

error when trying to use custom made dotemacs file

I was getting an error when I did a (require 'auto-complete) in my init file. A comment suggested I check my load-path or alternatively use the package manager if I didn't want to do that manually. So ...
user avatar
1 vote
1 answer
27 views

Loading hi-lock patterns from .emacs or custom .el file

I'm trying to add syntax highlighting to specific file extensions (for example .foo). I can't have the Hi-lock patterns in the source code because I shouldn't be committing them. Is there a way of ...
user avatar
0 votes
0 answers
82 views

problem connecting to melpa packages

I'm new to emacs, and I'm having problems when trying to set up my init.el file to connect to the melpa packages site. I'm using MacOS Big Sur version 11.6, and Emacs version 26.2 (9.0) since there ...
user avatar
0 votes
0 answers
28 views

Set httpd-root as current work directory in init.el

I want to setup httpd-root variable as current emacs work directory in init.el. So I added below line in init.el. (setq httpd-root default-directory) This line works fine in linux, but in windows, it ...
user avatar
  • 1,016
1 vote
1 answer
27 views

How change name of file "projects" and set it in init.el?

Emacs 27.2 In ~/.emacs.d/projects This file content all my projects. press d But I need to change file name. E.g. projects-laptop. Is it possible and and set it name on init.el file? P.S. For ...
user avatar
  • 3,435
2 votes
2 answers
134 views

Different versions of bookmarks for home and office computer

Linux Mint 20.2 Emacs 27.2 I installed Emacs 27.2 on my home and office computer. Both computers on LInux Mint 20.2 I has the same init.el for both computers. And its very convenient. I push my init....
user avatar
  • 3,435
0 votes
1 answer
35 views

How to replace ascii codes with characters in custom settings or buffer?

I customized org-tag-alist using the built-in customization interface. This stored the values in ("tag") . <ascii key value>) pairs like this: ("ez" . 90) ("pin"...
user avatar
0 votes
1 answer
28 views

Lambda triggering error when executed

I'm setting up a mechanism that allows me to conveniently specify minor modes in a list that should not take up space in the modeline. At the bottom of the following code snippet, this list is ...
user avatar
  • 103
1 vote
1 answer
101 views

is it possible to execute a command on specific set of files upon exiting emacs

I use emacs as my editor with mutt. I would like to run a python code on the /tmp/mutt-* files upon exit (that is called email-process, and that is written and works). For instance, in the case of vim,...
user avatar
0 votes
1 answer
45 views

How to make csv-align-mode default in tsv-mode?

I'm editing tab separated file with Emacs and csv-mode.el. When the document is open, I can align the columns with M-x csv-align-mode. How to make it automatically aligned when I open the file? Both ~/...
user avatar
  • 111
0 votes
0 answers
21 views

How to configure ivy to create parent node when refiling if parent doesn't exist?

I set up ivy and it's working for finding files and refiling headlines. It just doesn't work when I try to refile and simultaneously create a new node. For example, if I wanted to refile a task, ...
user avatar
  • 113
0 votes
0 answers
29 views

Melpa List of Packages is not complete despite refreshing

I am trying to set up Emacs from scratch for Common Lisp, as I want to learn both Emacs and Common Lisp in my spare time. I am having an issue with Emacs, and have been wrestling with it for a few ...
user avatar
0 votes
0 answers
73 views

package-load-descriptor: End of file during parsing

I've encountered this error on an Arch Linux system running Emacs-27.2. I sync my Emacs ~/.config/emacs/init.el which calls a host of other files located under ~/.config/emacs/settings/*-settings.el ...
user avatar
  • 263
1 vote
1 answer
35 views

always show archived tasks in org-agenda

Good day! I have this line of code in my .emacs: (require 'org-agenda) (setq org-agenda-archives-mode t) Basically I want agenda items to be extracted from archive file. As soon as I start emacs and ...
user avatar
  • 25

1
2 3 4 5
15