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

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.

0
votes
0answers
31 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
0answers
22 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
44 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
0answers
34 views

Debugger entered--Lisp error: (wrong-number-of-arguments (2 . 4) 0)

Please excuse my low-level terminology. I had been using my desktop that runs Ubuntu to run Emacs. My configuration was set up to load an org init file containing my packages. It was loaded from my ...
0
votes
2answers
40 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
21 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
16 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
56 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 (...
0
votes
0answers
45 views

How to change the face of org latex fragments

I'm using org to take notes with mathematical expressions. I can not seem to change the foreground color of the rendered expressions when overlaying the latex fragments with images using org-toggle-...
0
votes
1answer
27 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
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) ...
0
votes
0answers
50 views

Unable to load .emacs after upgrading from Emacs 24 to Emacs 26

I just upgraded my Emacs from 24 to 26 on macOS High Sierra. Unfortunately, this seems to have broken my entire Emacs setup! The warnings I get are: Warning (initialization): An error occurred ...
0
votes
0answers
50 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).
0
votes
0answers
17 views

How to get rid of the vertical bar separating two adjecent buffers (left / right) in Emacs? [duplicate]

I wish to be able to remove completely or at least hide the scroll bar and window divider (actually I'm not even sure what exacly it is called) in Emacs. My purpose is: when I have two adjecent ...
1
vote
1answer
156 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
24 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
17 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
33 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 ...
0
votes
2answers
72 views

How to tweak `org-emphasis-alist' to put, e.g., neon-yellow over bold (or italic, underscole…) text?

I read here that I could colorize the markup in my org-mode configuration, so I searched, and here I found an example. The problem is when I append this code, as the answer suggests, to my .emacs: (...
2
votes
1answer
60 views

proper file for spacemacs configuration: init.el vs. .spacemacs

I'm setting some personal preferences to my spacemacs. Some of them are in init.el file, some other in .spacemacs file. If I recall correctly that's because some of the settings did not work other ...
0
votes
0answers
40 views

Using Emacs as a daemon (emacsclient) exhibiting weird behavior

Whenever I use Emacs as a daemon it seems like my init file isn't being fully loaded. My keybindings in particular are acting very odd. I use some unorthodox keybinds; for example: Ctrl+u = ...
3
votes
2answers
52 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, ...
0
votes
1answer
52 views

Interpreter discrepancy in org-babel-python and python-mode

(Emacs version 26.1, Org version 9.1.9) I have tried numerous solutions to get working in org-mode source blocks. This solution works to change python-mode to utilize the Python3 interpreter, which I ...
0
votes
1answer
25 views

require 'modename vs require 'modename-install

I hope to use org files for my configuration. And I found some use (require 'org-install), and some use (require 'org). Any differences?
2
votes
1answer
38 views

Emacs doesn't seem to recognize .emacs.d on the latest Windows Insider Preview

I was able to use Emacs normally on Windows until the latest update to Build 17711.rs_prerelease.180703-1539. Now, whenever I start Emacs, it just shows the default welcome page, even though .emacs.d ...
1
vote
1answer
85 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 ...
1
vote
1answer
74 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 ...
1
vote
0answers
27 views

Not successful to enter mmm-jinja2 mode after installation using MELPA

So what I have tried is to first install the package by using MELPA: M-x package-install RET mmm-jinja2 I looked up where the package have been installed and found it to be at "~/.emacs.d/elpa/mmm-...
0
votes
1answer
104 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 '(...
0
votes
0answers
24 views

LSP with PHP not working

I am trying to setup php with lsp and can get it working. I followed what have been posted here: https://www.reddit.com/r/emacs/comments/7xz6bd/im_having_the_worst_time_trying_to_get_php/ Nothing ...
1
vote
2answers
52 views

How can I rebind C-n from evil-paste-pop

I am trying to bind C-n and C-p to call next-buffer and previous-buffer. They seem to conflict with some evil-mode key bindings and I don't seem to be able to overwrite them. When I press them I get ...
0
votes
1answer
197 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 ...
0
votes
0answers
40 views

full screen on windows 10

This gnu emacs 25.3.1 is installed on windows 10 pro laptop. I like it to open in full screen. Current windows Display settings: Change Size of Text, Apps and Other items: 125% Recommended ...
1
vote
0answers
26 views

Open new frame when switching between projects in projectile

Regularly I am working in several projects at the same time, projectile has been great for helping me with all the mess, but now, I would like to open a different frame per project, i.e., If I switch ...
0
votes
1answer
13 views

Testing if emacs was invoked with a file to visit

I'd like to configure emacs to enable desktop-save-mode at startup, but only if it is not invoked with a file to edit. That is, I want to use desktop-save-mode when I call emacs, but not when I call ...
0
votes
1answer
59 views

emacs finds one package, not another

WHAT WORKS FINE. When I compile a .tex file with C-c C-c, emacs knows that it should use pdflatex. I don't really know how, because I don't see pdflatex in my .emacs nor init.el (I can't find an ....
0
votes
1answer
31 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
1answer
39 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 ...
1
vote
1answer
35 views

Determining major mode for proper comment character insertion

I currently have a function like so in my .emacs file: (defun insert-todo () (interactive) (insert "// TODO(map) : ") ) It is bound to my key combination of "C-t". This will work for me if I'...
0
votes
1answer
28 views

How to change setting for all modes except one?

How can I chance an Emacs config setting (let's say "highlighting of current line") that I set in .emacs as (global-hl-line-mode +1), to work for all modes except one. For example, I want ...
2
votes
1answer
248 views

Persistently setting display-line-numbers to relative in emacs init file

I am attempting to set up the new emacs 26.1 display-line-numbers-mode as described in this comment: hybrid line number mode in emacs? I have added this to my .emacs file: (setq display-line-numbers ...
2
votes
1answer
57 views

M-x menu display like spacemacs

For some reason, I am not getting spacemacs. But I need the feature that when I do M-x, it displays the column of menu of commands, which I can select from using direction keys (Up and Down) and ...
0
votes
1answer
21 views

Can not set font family in init file in Windows

In my .emacs file I have the following: (setq default_font "Office Code Pro D") (when (member default_font (font-family-list)) (set-face-attribute 'default nil :family ...
0
votes
0answers
82 views

Disabling recentf mode?

I try to disable this via (recentf-mode -1) (setq recentf-mode nil) ;; mysteriously switches to t after some time but it keeps automatically turning on after some time and is causing problems for ...
0
votes
0answers
37 views

Migrate my init.el to spacemacs

Running emacs 25.2.2. Currently I am trying out spacemacs, primarily because I found the keybindings more intuitive. I needed some stuff from my init.el to move to .spacemacs before I can start using ...
0
votes
0answers
73 views

No Such File or Directory, Global, Error with Company Mode

I'm currently following this guide to expanding my emacs configuration on my Mac OS X system. However, every time I (save-buffer) with C-x C-s, I get the following error message: apply: Searching ...
0
votes
0answers
24 views

How to enable SHIFT+TAB for multi line code region unindentation?

I have found this code which enables both TAB and SHIFT+TAB for code region indentation and unindentation. The problem is SHIFT+TAB doesn't work on multi line codes and also we have to place the ...
2
votes
1answer
38 views

Define a function to execute multiple commands

Here is part of my init.el: (defun xx-devanagari-script () (interactive) (save-excursion (face-remap-add-relative 'default :family "Lohit Devanagari") (text-scale-increase) (text-...
3
votes
1answer
242 views

How to reload .emacs.d/ configuration without restart

When I change any custom configuration file in the .emacs.d/elisp/ directory, I have to quit Emacs and then start it again in order to get my changes applied. Is there any better way?
1
vote
2answers
84 views

How to unbind a key from a command in general.el?

I am using emacs with evil, and space is my leader key, however, space is bind to dired-next-line in dired-mode. So, how can I unbind space, so I can still use it as my leader key in dired-mode, and ...