Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
2answers
429 views

Emacs won't write to .emacs

I already checked around the stack exchange and internet for a while to why this issue is occurring, but I can't seem to find the solution. Whenever I try to enable a disabled command in Emacs, it ...
4
votes
1answer
438 views

Help me install the development version of org-mode from Github repo

I want to install org-mode from Github repository and override that from ELPA. My emacs configuration runs from an org-file, these are the lines relevant to package management and org-mode load path: ...
1
vote
0answers
141 views

Remove all custom key bindings/Reset key bindings to default

I don't know Lisp unfortunately. I have a friend, and I really liked his color scheme/default Emacs setup. However, I hate his hotkeys and I am used to the ones that come as default with Emacs. Is ...
1
vote
0answers
731 views

Company Mode in All Buffers

I'm trying to configure company-mode to activate in all buffers, with the appropriate back-ends depending on file-type. To that end, I've added the following to my init.el file. However, regardless of ...
3
votes
1answer
80 views

Debugging in elisp

I am having a fairly big .emacs file with lots of stuff inside, parts of which I have copied from somewhere else. At some point in the file I am setting the font size to some value but this setting ...
2
votes
1answer
479 views

How to customize org-agenda-* faces in .emacs file?

I am trying to customize org-agenda-* faces such as org-agenda-date, org-agenda-date-today, and org-agenda-date-weekend in my .emacs file. Normally, I install the use-package package to lazily load ...
1
vote
3answers
916 views

two different config files for Emacs

I am looking for method to use two different config files - init files. First config: when I am coding in full Emacs windows (open file as emacs namefile this define ~/.emacs_conf2) Second: when I ...
5
votes
1answer
323 views

Under Windows, Emacs cannot handle encodings correctly for subprocesses, can it?

I have two simple text files on my D: drive, as shown below. D:\我.txt I D:\你.txt You After I execute M-x diff and type the correct filenames (Yes, I can input Chinese and filename ...
4
votes
0answers
226 views

In Emacs, how do you force using a fallback font?

Font and encoding (in a broad sense, internationalization) are causing problems in many software scenarios, like web browser and editor. The Unicode U+201C and U+201D are double quotation marks. ...
1
vote
1answer
63 views

Generating file.el from file.org

I have an init file called settings.org (using #+BEGIN_SRC #+END_SRC blocks for elisp code) I would like to generate settings.el from it, so that I can load it inside init.el easily. How would I ...
1
vote
1answer
264 views

Auto generated code in the init file when updating packages

Every time I use the package manager it puts auto generated code in the init.el file: (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it ...
0
votes
1answer
67 views

What's missing here

I've got this from a YouTube video about Evil mode but I can't see the entire init file, so I think it's incomplete because it gives me an error. The idea is to disable Evil mode in some modes. This ...
1
vote
1answer
151 views

Separating Customize settings from other Init-file settings

Currently all my settings that come from the customize interface are placed in: (custom-set-variables '(menu-bar-mode nil) '(ivy-mode t) '(blink-cursor-mode nil) '(hl-line-mode nil) '(...
1
vote
2answers
52 views

emacs error on startup when i try and bind keys to wdired-mode-map

emacs gives me an error when i try the bind keys to wdired-mode-map: (define-key wdired-mode-map (kbd "TAB") 'my-mark-file-name-forward ) (define-key wdired-mode-map (kbd "-") 'my-mark-file-name-...
1
vote
1answer
381 views

Change C indent style for specific project?

I have in my ~/.emacs.d/init.el: (use-package google-c-style ;; provides the Google C/C++ coding style :ensure t :config (add-hook 'c-mode-common-hook 'google-set-c-style)) However, a ...
4
votes
1answer
1k views

Emacs inside Tmux problem

This might have an obvious answer but I've been trying to fix this issue with no luck. (I'm new to Emacs) Whenever I start Emacs within a Tmux pane, it ignores some of my .emacs settings. These are ...
1
vote
0answers
82 views

Does emacs have font-lock for constant values?

I am trying to customize a theme for myself, and now I am finding a way to change the highlight color of constant values such as 10 and 10.5677. For example, C mode in Vim highlights those constant ...
0
votes
1answer
323 views

How to debug emacs connection problems

I have a problem with emacs downloading packages and would appreciate some pointers on how this could be tracked/solved. disclaimers first: I'm a complete noob at emacs, so if something looks/sounds ...
1
vote
2answers
453 views

Org based init method slows down emacs startup DRAMATICLLY (6 minute startup)..help needed

So after a few months of frustration today i discovered the issue that's been bothering me for a long time..the REALLY slow emacs startup (sometimes 5 minutes or more). The cause is the org mode init ...
2
votes
1answer
266 views

Error at init.el and orgmode export

I reinstalled my whole system and after trying to load my previous Emacs config that works in the past, I always obtain an error: org-define-error and I follow de conflict line what is (require 'ox-...
5
votes
1answer
2k views

How to automatically install all packages loaded by my .emacs file in the minimum of lines?

My ~/.emacs (which you can find on GitHub) file loads several different Emacs packages and I would like them to be automatically installed as soon as Emacs starts up, if they are not already installed....
0
votes
0answers
86 views

any change in my init config delays emacs start by 90-150 seconds

weird issues. when i restart emacs it usually starts up pretty fast. BUT any small change i make to my config file makes emacs have a delay of 90-150 seconds each time. im using a org based config and ...
1
vote
2answers
1k views

Theme not loading on startup

I started using the graphical interface for emacs again after a bit. and I've run into some problems. On boot the theme I'm using Calmer-forest is not getting loaded. However the rest of my .emacs ...
1
vote
1answer
293 views

org-agenda-files not setting after update?

I recently upgraded to emacs 25.1.1 and noticed my org setup wasn't working as usual. in my init.el I have: (setq org-directory "~/Dropbox (Personal)/org") (setq org-archive-location "~/Dropbox (...
0
votes
1answer
95 views

Setting hl-line-mode for programming modes

In my init file I have this: (add-hook 'prog-mode-hook (lambda () (linum-mode 1))) So it shows line numbers only for programming modes. I tried to do the same with hl-line-mode, but it does not work:...
0
votes
0answers
169 views

having problems loading init.el

I recently installed emacs and I am trying to define some configurations on a init.el I received the following message after opening emacs --debug-init Debugger entered--Lisp error: (void-variable ...
2
votes
2answers
688 views

Manage same init file for Linux and Windows

I have an init file on a USB drive. I use this USB drive at home and at work for my init file. Until recently, my home and work computers were both Windows machines. I am now adding a Linux machine ...
1
vote
1answer
232 views

How to Customize Rainbow-Delimiter and Emacs-Color for a theme with Dark Background

I have installed rainbow-delimiter packages, and I tried to customize it based on the code written in this page. However, I found out that some generated colors are too dark when it is used with a ...
2
votes
1answer
167 views

How do I configure my own shortcuts in Auctex (Emacs)?

I have a problem that I could not solve with the help of google. a) How do I have to adjust the .emacs file in order to use the Windows-Key (Super-Key) for shortcuts. I am working on a Linux system ...
0
votes
1answer
117 views

matlab crashes when logged in via emacs

I have installed matlab-mode from the melpa repository. However when I do M-x: matlab-shell [RET] It gives me the following error. objc[4164]: Class JavaLaunchHelper is implemented in both /...
1
vote
1answer
1k views

Error on using org-babel-load-file

I am trying to write emacs init using Org-mode By using org-babel-load-file function in init.el. My init.el file is (require 'package) (add-to-list 'package-archives '("melpa" . "https:...
2
votes
1answer
432 views

What is the proper way to setup a package with Spacemacs?

I have been reading very good thing about Spacemacs, and decided to give it a try. Right now I am trying to port my (messy handwritten) configuration to it, and the Spacemacs way to do it is by ...
20
votes
1answer
995 views

How do I troubleshoot Emacs problems?

In a situation where Emacs is not behaving like I want, what can I do to troubleshoot the problem? What steps can I take to find and fix the problem myself? Or, failing that, how can I gather useful ...
3
votes
2answers
638 views

How can i start web-mode at a file's startup?

I want my emacs to start .php and others web files in web mode so i copied this code which is on the web-mode webpage: (require 'web-mode) (add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode)) (...
-2
votes
2answers
2k views

I can't find my emacs init.el file in the normal paths

I can't find the init.el file in the normal paths that is supposed to be, and I already try to search inside the emacs app and with the terminal. Apart from that I can write and save files. I made a ...
0
votes
2answers
248 views

Problems loading packages from repos in another emacs directory

I want to test a new configuration from emacs for that case I begin with this: emacs -q --load ".emacs.jesus.d/init.el" --debug-init it works and I load the emacs file, until I started to download ...
1
vote
2answers
98 views

Why does a package archive produce error “not an absolute file name”?

When starting an older Emacs (23.4, say) for testing, I get an error from package initialisation a certain package is not available for installation. list-packages also shows a failure but with no ...
1
vote
2answers
744 views

How to remove cause of an error in loading .emacs: Symbol's function definition is void: defvar-local

When starting Emacs 23.3.1 under Ubuntu 12.0.4.5 LTS, I get the following message: Warning (initialization): An error occurred while loading `/home/john/.emacs': Symbol's function definition is void:...
0
votes
0answers
36 views

init.el file is loosing customizations (but still working) after starting daemon

I have the following problem: I used to start emacs (version 24.5.1) from the GUI button. I customized it writing in the ~/.emacs.d/init.el file and everything worked well. Then I set up the daemon to ...
3
votes
2answers
1k 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-...
0
votes
1answer
130 views

Inconsistent Indentation for C/C++ Upon Loading File

Problem: When a C++ file is loaded, the indentation rules are not always what they should be, i.e. instead of indenting by 3, it will indent by 1 or 8 for that session. This occurs consistently ...
15
votes
4answers
3k views

How to get the same Emacs environment on a different computer?

I'm a beginner in Emacs (using it for about 2 weeks now and loving it). As I update and expand my ~/.emacs.d/init.el file, the things that I write in there depend on certain packages that I installed ...
1
vote
2answers
424 views

Emacs change window fringes (vertical padding)?

I have Emacs 24 running in Linux Mint 18 Xfce. As shown in the picture below by the red arrows, how can I decrease the width of the gray zones that are to the left/right of each Emacs window? The so-...
0
votes
1answer
149 views

global-set-key not working in terminal

I have the following line in my .emacs.d/init.el file (global-set-key [(control tab)] 'other-window) ;; remap f1 to undo (global-set-key (kbd "<f1>") 'undo) When I use the full X-window GUI ...
0
votes
1answer
59 views

different mode setting

I often use .c file and .txt file on the split emacs frame. I wrote a code such as the following to init.el. ;; change text-mode indent (add-hook 'text-mode-hook (lambda () (setq ...
0
votes
1answer
45 views

How to I use my init file to have another file automatically load in a buffer at start of emacs?

I want this file to show up in a buffer when I start emacs: E:\emacs\org\index.org What do I put in my init file?
2
votes
1answer
325 views

auto-complete Key binding doesn't work in one emacs mode

I have changed the keybindings for yasnippet and autocomplete so that I can use tab for indentation anywhere in a line without accidentally autocompleting or inserting a snippet. I have this in my ...
1
vote
1answer
71 views

How do I control the directory that emacs starts in?

M-x dired = defaults me to C:\emacs\bin/ C-x d = defaults me to C:\home\files\ My init file is in C:\home\ and seems to work. I have read the relevant manual sections several times, and I can't ...
6
votes
1answer
1k views

Since Emacs 25.1, package-list-packages modifies and writes my .emacs

I've just installed Emacs 25.1. My .emacs works well on Emacs 24.5. But now that I'm on Emacs 25.1, when I do M-x package-list-packages, Emacs modifies and write .emacs in the background with the ...
0
votes
1answer
102 views

Why is tab-width reset when I open a C++ file?

So I'm trying to setup default indentation in Emacs. Currently I have the following at the bottom of my .emacs file as per a number of tutorials I've found on the internet. (setq-default indent-tabs-...