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.

2
votes
1answer
149 views

lsp-mode: How to use built-in clangd client?

I'm trying to use lsp-mode (together with company-lsp) for auto completion in C++. According to the docs[0], recent lsp-mode includes clangd support, so I should be all set when I do (require 'lsp-...
0
votes
2answers
145 views

Emacs not loading org-agenda-files on startup

So i've put this in my emacs.org: (setq org-agenda-files (list "~/todo.org")) But whenever i close and reopen Emacs, my org-agenda is empty until i reload my config-File. Is there anything ...
1
vote
1answer
38 views

%%j and %%S in format string for frame-title-format

In my cobbled-together init.el, my frame-title-format variable has these %-sequences in it: %%j and %%S Does anyone recognize these specific sequences? They come up blank in my frame title. Here's ...
0
votes
1answer
23 views

highlight-indent-guides-mode

I'm trying to activate highlight-indent-guides-mode by default but it is not working. If i do M-x highlight-indent-guides-mode it works fine but adding (highlight-indent-guides-mode 1) to my .emacs ...
0
votes
1answer
29 views

Eval Buffer works on .emacs but loading when emacs starts

I know there are some other questions like this on the site, but none of them seem to work. I am trying to enable relative line numbers with a package, and when I do M-x eval-buffer, the mode is ...
0
votes
1answer
17 views

Set auto-fill when opening an .md file [duplicate]

Sadly, my Emacs is too old (and not mine to upgrade) and so I can't run markdown-mode. I'd like to set a buffer to fill mode when I open an .md file. Is there a simple way to do this? The whole ...
1
vote
1answer
145 views

Themes in emacs-nox displaying bottom part of frame black instead of background color

Edit: I tried many themes and it was an issue for all of them so this is not a Zenburn specific issue. Edit: Docker is not part of the issue as there is the same behavior when this is done using just ...
1
vote
1answer
82 views

No org-babel execute function for go

#+Begin_SRC go package main import ("fmt") func main(){ fmt.Println("emacs") } #+End_Src ~/.emacs.d/init.el: (when (memq window-system '(mac ns)) (exec-path-from-shell-initialize) (exec-path-...
-1
votes
0answers
18 views

Agenda view instead of adding an Attachment

When pressing C-c a the attachment dialog opens instead of the agenda view. I already inserted the list from How to enable agenda view in org mode in my .emacs file. Any suggestions? Thanks in ...
1
vote
1answer
31 views

How to use `column-marker-1` with every buffer?

Question may be very dumb, but I can't find the answer on the web : I have a command C-u 80 M-x column-marker-1, and I want it to be launched automatically on every buffer I open. What should I add ...
53
votes
10answers
19k views

How to start emacs with a custom user-emacs-directory

I'm working on a custom and small Emacs configuration that I want to share with some friends as a git repository for them to use as a baseline for their own future configurations. For this I need ...
0
votes
1answer
133 views

My emacs does not use the LaTeX-includegraphics-extensions option in my .emacs file

I tried to customize my .emacs file adding the options to the macro command \includegraphics. I use Emacs 25.3.1 on MacOS. My .emacsfile is as follows: (package-initialize) (custom-set-variables '(...
3
votes
2answers
391 views

Use several Emacs configurations/versions simultaneously

I want to use several emacs configurations/versions simultaneously so that no configuration disturbs each other, each with their own configuration directory and elpa repository. I heard about the ...
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 ...
3
votes
1answer
299 views

Use system-installed package with spacemacs that depends on MELPA packages

How can I include a package that is available locally on my system that depends on the string library s with spacemacs? I have an company internal package that adds functionality to magit available ...
0
votes
2answers
229 views

where to put .el files on Windows10 for loading at startup

I'm using emacs as a bog-standard program in Windows, and also from the command line in cygwin. They both use the same installation of emacs. I just grabbed yaml-mode.el off the net but I can't ...
9
votes
1answer
923 views

Coding System utf-8 on Mac - Which one and why as default?

I want to change my default encoding system from non defined to UTF-8 (I think that would be useful). Now I have seen many different UTF-8 coding systems: mule-utf-8 mule-utf-8-dos mule-utf-8-...
1
vote
2answers
255 views

Automatically toggling margin width on resizing

So I'm using Emacs in Windows (Emacs 24.5.1, Windows 10). I've set a default margin width of 20 on both sides for text-mode, but occasionally I like to resize the window in half (Windows+left or right ...
1
vote
1answer
102 views

Change permanently font size in Aquamacs

I have been looking on the web to the existing answers to this question, but non of them works for me. I would like to change the default font size for all frames in Aquamacs 3.3 GNU Emacs 25.1.1 (...
5
votes
3answers
60 views

How can I avoid accidentally editing installed packages while still being able to install new packages?

I end up looking at source files of packages I have installed fairly often and want to avoid accidentally editing them while I am viewing them. After looking at https://emacs.stackexchange.com/a/3681/...
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 (...
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 ...
0
votes
1answer
34 views

File-missing “No such file or directory” “c:/emacs-26.1-x86_64/bin/%HOMEDRIVE%%HOMEPATH%/”

I'm launching Emacs using runemacs on Windows 7, from the emacs directory (C:\emacs-26.1-x86_64\bin), using runemacs --debug-init. I get the following error text: Debugger entered--Lisp error: (file-...
0
votes
1answer
346 views

When to call package-refresh-contents in init.el

I have found the following lisp code in an init.el file. I am wondering if this code logic is correct. I am learning Elisp and have reviewed the documentation and searched Stack Overflow. If this is ...
2
votes
1answer
117 views

Configuring Prettify Symbols Mode

I've configured prettify-symbols-mode as below. However, only in the scratch buffer is any drawing performed. Further, lambda (λ) is the only multi-character token drawn as a unicode glyph. Is ...
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
1answer
146 views

M-x shell from MSYS2: cannot set terminal process group

I'm using MSYS2-x86_64, and whenever I do M-x shell I see the following: bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell ]0;~/.emacs.d ...
2
votes
1answer
61 views

Idiom to default a setting for most modes, except specific others?

I generally like show-trailing-whitespace. But it's distracting in shell/REPL modes, where for instance completion may leave a trailing space (e.g. ls foo TAB RET in shell-mode). Plus I'm not git- or ...
7
votes
2answers
604 views

Relative paths in init file

When loading things like themes from custom directories, is it possible to specify a path relative to the init.el file, rather than an absolute path? I ask because I want to be able to use the same ...
1
vote
1answer
710 views

Loading and executing .el file if it exists on startup

I am having trouble telling Emacs to load and evaluate an additional .el file which only contains some lisp code to load an org file ;; keep my personal settings not in the .emacs file ;; http://www....
0
votes
1answer
57 views

Weird behavior: GUI won't start, but terminal emacs will

As I said in the title, I'm having a problem with starting Emacs, whenever I try to start it with rofi, nothing happens, and when I try and start with terminal (using emacs), it returns "Args out of ...
2
votes
2answers
179 views

Setting Default Font in Emacs 26.1

I want to set a default font in my Emacs (version 26.1, running on Arch, using Xmonad). I have tried various options in my init.el file (under .emacs.d). None seemed to work or persist when I ...
1
vote
1answer
42 views

Why is emacs creating multiple nested bak/ folders?

I recently tried to back up and move my .emacs.d to another folder and got the error down below. Does anyone know why my system is generating all of these bak/ folders? Also, is it safe to delete ...
3
votes
2answers
74 views

Separate customizations according to modes

Using emacs 25.2.2 on Kubuntu 18.04. I have customized several variables using M-x customize-variable. So, there is a large custom-set-variables section at the very beginning of my init.el. Moreover, ...
1
vote
1answer
69 views

Setting C-p as helm-projectile-find-file

I put this at the very end of my config file: (global-set-key (kbd "C-p") 'helm-projectile-find-file) On Emacs start I can see that it is getting assigned using C-h k C-p. Then when I actually load ...
0
votes
0answers
43 views

Emacs doesn't seem to read the path

So, I'm trying to use ack from emacs. I've tried setting the path correctly in the following manner (setenv "PATH" (concat "/home/davor/bin/bin:" (getenv "PATH"))) (setq exec-path (...
0
votes
1answer
35 views

emacs hangs when loading csharp (.cs) file

Just upgraded to emacs 26.1 from 25.3 on windows (emacs-version = GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30). I downloaded the latest version of csharp-mode from melpa. Now when I'm ...
0
votes
0answers
42 views

Cannot enable visual line mode globally

I would like visual-line-mode to be always on. For this reason I put in the very end of my init.el file the following line of code (global-visual-line-mode 1) (as suggested here). Anyway, the above ...
0
votes
1answer
55 views

How to launch (start) emacs with a single window and choose the buffer of that window as default in the init.el file? [closed]

What statements in the init.el file can be added so that there is a single window shown as the default I have is split into 2 windows vertically aligned (equivalent to typing C-x 1)? Then once there ...
0
votes
2answers
53 views

package is installed but command not available under M-x

I installed darkroom via the package manager in my GNU Emacs 25.3.1 (x86_64-w64-mingw32). M-x package-list shows the package as installed and in fact are the files in the respective folder, the ...
1
vote
1answer
27 views

Unclear error message from a function call in my init file

With my Emacs 26.1 on my 10.13.6 Mac, I want Emacs to systemically open my file located at /Users/ewandelanoy/Documents/html_files/Printable/latinized_agreda2.txt with the mac-roman-mac encoding, ...
0
votes
1answer
18 views

init.el file loads, but not evaluating all of the expressions

for example (show-paren-mode t) not getting evaluated, I have to run this function every time even though it is in my init.el file and other
1
vote
0answers
30 views

Automatically download external packages

How can I configure my init.el download packages that are not in (M)Elpa and install them automatically (if not already installed)? Something like doing it with wget or with git (as you do in vim) ...
30
votes
6answers
5k views

Running spacemacs alongside regular emacs: how to keep a separate .emacs.d

I would like to try spacemacs. But I don't want to switch from my regular emacs configuration just yet, so I would like the configuration that's currently in my .emacs.d to be in one directory, and ...
0
votes
0answers
62 views

Kill *scratch* at startup not always works

I would like to avoid using buffer *scratch*, so I set up (kill-buffer "*scratch*") in my init.el but it doesn't always work (sometimes it kills the buffer, sometimes it doesn't).
1
vote
1answer
509 views

require vs. package-initialize?

Ok, this is a noob question but I've digging into this enough that I think it's reasonable to ask :) My question: In one's .emacs / init.el file, can one use require to load packages that were ...
4
votes
1answer
152 views

Are there any disadvantages to moving init.el to org-mode?

I've noticed some people have their init files in org-mode, using org-babel-load-file. Are there significant performance penalties or other disadvantages to doing this?
1
vote
1answer
90 views

ESS failed to run: ess-s-define-runners is void

After upgrading packages in emacs, I have the following error message when trying to run R (M-x R): Symbol's function definition is void: ess-s-define-runners. I can't find where the error is. Here's ...
0
votes
1answer
39 views

How to overwrite a defcustom of a package within the initfile?

I have an installed packages (say mypackage.el) in \.emacs.d\lisp\ directory. In that package there is (defcustom xyz "path1" "Path to the program" :group 'blablabla :type 'string) I would like ...
0
votes
1answer
22 views

error checking system type: wrong type argument gnu/linux

setting different config options depending on OS. When checking if gnu/linux I get a "wrong type argument char-or-string-p, gnu/linux" Tried so far: (string-equal (upcase system-type) "GNU/LINUX") ...