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
1answer
26 views

use-package won't load

I use the same configuration of emacs on multiple machines, and I want to use use-package to keep the packages the same on all machines. I have an init file in each machine's home directory that ...
0
votes
0answers
16 views

Mac OSX and remote Emacs sessions, keybindings

I have questions regarding keybindings and cut & paste for Emacs and OSX v10.14.3. I'm hoping there are some Emacs users with similar configurations that can provide guidance as to be productive ...
-1
votes
1answer
29 views

How to make emms only show the name of the current file being played without the path

In the mode line, emms shows the full path to the file being played, how do I change that?
0
votes
0answers
21 views

Unable to call pyvenv-activate from init file

M-x pyvenv-activate <RET> ~/Documents/bitbucket-python-scripts/.env353 <RET> works fine. Elpy Config buffer confirms that. However with the following in ~/.emacs file (require 'package) ...
1
vote
1answer
30 views

Installation of Org-ref slows down start-up

I am super new to Emacs. I just followed the installation section of org-ref. I managed to get a simple citation working by adding bibliographystyle:plain to the file. This is one of the solution one ...
0
votes
1answer
28 views

use-package arguments without use-package

The guide I'm following for lsp-emacs wants me to set these options: ;; Enable scala-mode and sbt-mode (use-package scala-mode :mode "\\.s\\(cala\\|bt\\)$") (use-package sbt-mode :commands sbt-...
0
votes
1answer
61 views

Emacs 26.2 can't load init file from Emacs 25 [closed]

The title already says the question, i had Emacs 25 and compiled Emacs 26.2. Although my ./emacs directory and everything in it exists Emacs 26.2. starts complaining about packages which do not exist, ...
1
vote
1answer
26 views

How to define a function that calls two commands where the first one requires an arguments

I use emms to play music in emacs and I have this function to add a music directory and shuffle it. (defun my-emms-command() "Run `emms-add-directory' and `emms-...
1
vote
1answer
55 views

How to store an eshell alias in `init.el`?

I like to keep my configuration as self-contained as possible, and I'm wondering whether there's a way to manage eshell aliases in my .emacs file. Is it possible to set up aliases with a function call ...
3
votes
2answers
48 views

Problem with init

Windows 10/ emacs 27.0.50. I try to use <s with TAB to expand to a ‘src’ code block in org files. This doesn't work for me with my config. When I execute Emacs with -q (-no-init-file) and it ...
2
votes
0answers
27 views

Scroll bar area remains, blacked out, after launching with `scroll-bar-mode` disabled

I'm using Emacs in dwm window manager of suckless.org, with the following init.el: (menu-bar-mode 0) (scroll-bar-mode 0) (tool-bar-mode 0) When I launch Emacs, with the command $ emacs, my scroll ...
1
vote
0answers
42 views

How are unrelated modes enabled?

I've been an emacs user for about a year now and I use it for Haskell programming. I chose to go the vanilla emacs route and customized a plain init file as I went along. Over time, however, I ...
2
votes
1answer
57 views

If start with maximized frame, why do windows open top &bottom, not side by side?

I have the following in my .emacs: (add-to-list 'default-frame-alist '(fullscreen . maximized)) And (add-hook 'window-setup-hook (lambda () (find-file "FILE.org") (shell))) ...
0
votes
2answers
70 views

How to create a .emacs.d repository [closed]

I am trying to create a github repo of my .emacs.d/ for a group of students. Basically, I have two choices: A) simply take a "git snapshot" of my entire ~/.emacs.d/ including all the packages in elpa/,...
1
vote
1answer
37 views

LISP command won't work in init.el but works in *scratch*

I've executed the following lines in my scratch buffer (require 'expand-region) (global-set-key (kbd "C-=") 'er/expand-region) and everything worked without any problems, but if I add those same ...
1
vote
0answers
124 views

Remove scrollbar, faster

I like a clean interface. One without the clutter of scroll bars, or menu bars. So, to remove them, I have the following in my init.el (progn (menu-bar-mode -1) (scroll-bar-mode -1) (tooltip-...
2
votes
1answer
233 views

Confused about .emacs vs .emacs.d/init.el

I read somewhere the two files were interchangeable, so I cut/paste the content of the former, shown below, to the latter. But then Xreader was missing when I tried to view a document generated by ...
0
votes
1answer
53 views

On emacs26, is it possible to halt initializing and attach to running emacs-server with init.el?

I'm using emacs26 on macOS and using server-client for the fast initialization. However, it's a bit annoying that a new emacs instance is always spawning when I run "Emacs.app" with SpotLight instead ...
2
votes
1answer
30 views

Rewriting `defadvice' as `advice-add' makes advice ineffective

I am trying to make undo-tree auto compress the history save file. The document suggests adding the following advice (defadvice undo-tree-make-history-save-file-name (after undo-tree activate) (...
1
vote
1answer
21 views

“void-variable” error when adding advice to `kill-ring-save`

I am trying to add an advice to kill-ring-save and kill-region, so that when I call them with no active regions, instead of throwing an error, the line the point is currently on would be marked ...
1
vote
1answer
29 views

(require ) a certain file only when opening a particular file type

I've started using Emacs for Ocaml programming, and used opam for installing some Emacs scripts which enable IDE features. To use these, opam added the following line to my .emacs: (require 'opam-...
0
votes
1answer
69 views

Should I use “require” or “load” when writing my own configuration? [duplicate]

I am following this tutorial, and the author is doing something like this: ~/.emacs.d/init.el ;; add your modules path (add-to-list 'load-path "~/.emacs.d/custom/") ;; load your modules (require '...
1
vote
1answer
186 views

Error enabling flyspell mode in Emacs

I use flyspell hunspell for checking my spelling mistakes in Emacs. Recently, when I run M-x flyspell-mode in .org or .tex files I got the following error: Error enabling Flyspell mode: (hunspell ...
5
votes
1answer
54 views

How to postpone redrawing on startup?

On startup I can see the fonts and color scheme before my own are loaded in. Is it possible to drawing the interface until a certain moment when settings are loaded? Incase it's important: Linux, ...
0
votes
1answer
44 views

Need to load initial file every time when restart emacs

I'm a newbie in Emacs who just is familiar with basic key bindings. I'm trying to learn more. I just learned to create initial file ~/.emacs.d/init.el and how to evaluate. But I find I need to load ...
0
votes
2answers
98 views

Why doesn't set-background-color work in my init file?

I have an init file for Emacs located at /home/username/.emacs.d/init.el and it has the command (set-background-color "honeydew"). However, when I open Emacs the color has obviously not changed from ...
1
vote
1answer
50 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
134 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
65 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
22 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
43 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 ...
5
votes
3answers
65 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/...
3
votes
1answer
1k 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-...
2
votes
1answer
349 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
242 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-...
0
votes
1answer
96 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 ...
0
votes
1answer
83 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-...
3
votes
2answers
640 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 ...
0
votes
0answers
122 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 ...
1
vote
1answer
83 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
66 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
46 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
25 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
1answer
195 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 (...
2
votes
1answer
132 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 ...
1
vote
0answers
31 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) ...
2
votes
1answer
1k 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 ...
0
votes
1answer
117 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
27 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") ...
0
votes
1answer
102 views

set paths in init file taking OS into account

I use the same config file between my windows-linux-mac machines. But I'm having some trouble setting some org folders because of the different definition of paths per OS. For instance setting my ...