Stack Exchange Network

Stack Exchange network consists of 175 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
3answers
990 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
350 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
245 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
71 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
292 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
69 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
165 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
54 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
402 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 ...
5
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
86 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
342 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
497 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
269 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-...
6
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
88 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
308 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
99 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:...
2
votes
2answers
726 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
248 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
192 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
119 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
451 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 ...
21
votes
1answer
1k 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
680 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
263 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
103 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
792 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:...
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
132 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
450 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
152 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
333 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
72 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
107 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-...
1
vote
1answer
319 views

Emacs bad indentation

So I've decided to try emacs, and I find it really good. However, I'm mostly writing Python, so the indentation is a crucial thing for me. After couple of failures in configuring I've finally reached ...
0
votes
1answer
176 views

How to turn on a minor mode in my init file?

I want to add global-semantic-idle-summary-mode in my .emacs file instead of calling everytime it by using M-x. I tried with (setq ...) but it doesn't work. What's the right way?
1
vote
1answer
86 views

how to upgrade packages if init file calls package function?

[Note to folks with itchy 'close' fingers: this is not a duplicate of Noninteractively upgrade all packages, since those answers rely on code or package in one's init.el, which would suffer from the ...
4
votes
2answers
389 views

How can I increase the spacing between the buffer and the top part of the frame?

I'd like to add a margin to the top of the window so that it's not so close to the top part of the frame. Here's what it looks like currently (arrow indicates where I'd like to add extra margin): ...
4
votes
2answers
1k views

Can't adjust font size anymore in emacs 25

I just upgraded Emacs to 25.1.1 (via the Arch Linux package manager pacman). Now I can't set the font size in my .emacs anymore. I am able to adjust it via C-x C-+ and C-x C--, and I can also use M-...
1
vote
1answer
581 views

Problem with init file with new Emacs 25.1 on OSX

After installing the new Emacs 25.1 (universal binary) on my Mac OSX 10.11.6 I got the following init error after starting with --debug-init. I don't know what to do. Can you help me? Debugger ...
0
votes
1answer
174 views

.emacs setq sets a wrong path for a variable

I put the following in my .emacs file to make sure that the "run-python" variable maps to the right path: (setq python-shell-interpreter "C:\\Users\\xxxx\\python.exe") When I restart emacs and do M-...
0
votes
1answer
369 views

enable show-paren-mode in init.el

I would like to enable show-paren-mode in my configuration file init.el, which is very convenient for debugging. As it is a minor mode as I've understood, I don't know how to proceed...Thank you very ...