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.

4
votes
2answers
199 views

Dired+ hangs emacs in -no window mode

I have this in my init.el file: (use-package dired :init (progn ;; Details toggling is bound to "(" in `dired-mode' by default (setq diredp-hide-details-initially-flag nil)) :config ...
1
vote
0answers
53 views

Unable to tweak theme settings unless I start a new session

I have this code in my init.el file, mainly to apply the theme correctly when running emacs server: ;; This will make sure the theme loads well in emacs daemon (setq myGraphicModeHash (make-...
1
vote
0answers
138 views

How to debug a(n) .emacs that doesn't work correctly, but also doesn't throw any errors? [closed]

I currently have an Emacs/AucTeX setup where emacs --debug-init doesn't throw any errors, but things still don't work as expected. This being the case, I don't really know how to debug my .emacs file ...
2
votes
1answer
99 views

Is there a way to configure default window split positions when interacting with commands?

I always enjoyed horizontal splits when interacting with C-h k or a magit commit window, or anything like that. Now I'm seeing vertical splits when I interact with those commands. Is there a way to ...
0
votes
2answers
120 views

use-package does not execute `:config`

When loading auto-complete via auto-complete-config with use-package, then :config is not executed and local keymap is not set. (See example below) Why that and how to solve this? Example: save ...
4
votes
2answers
619 views

Spacemacs - Change font size based on system name

I use one synced dotfiles repository for all of my computers, with some system-specific customization built-in. I've got a new high-DPI display on one of my computers, and would like to increase Emacs'...
0
votes
1answer
163 views

Why is my use-package not installing packages properly? (Using org-mode init file and babel)

I'm new to emacs and I'm trying to setup my init file using a .org file with org-babel-load-file. I've read that it's a good idea to use package use-package to configure packages and to make sure they ...
0
votes
0answers
51 views

desktop-save-mode and neotree crashing layout

So I am trying to open neotree automatically and I encountered the following error. I have this for automatically toggling neotree (add-hook 'after-init-hook #'neotree-toggle) After putting this in ...
1
vote
2answers
124 views

why is add-hook in use-package not erroring for function that does not exist

I have added a (add-hook 'js2-mode-hook 'my-js2-mode-setup) the following hook to a use-package init section: (use-package js2-mode :ensure t :interpreter (("node" . js2-mode)) :mode "\\.\\(js\\...
1
vote
1answer
243 views

SumatraPDF.exe as default PDF viewer

I'm using emacs (GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-09-17), and trying to define SumatraPDF as my default PDF-viewer for LaTeX. After some trials, nothing happens, and I have no idea why... ...
1
vote
0answers
293 views

Emacs c++ cannot use semantic and company-semantic to complete <string> library function

system: linux mint 18.1 Eamcs version: 25.2 semantic configuration: (global-semanticdb-minor-mode 1) (global-semantic-idle-scheduler-mode 1) (semantic-mode 1) create a cpp file and include vector,...
5
votes
1answer
89 views

Why isn't this variable being set although it is set in my .emacs?

In my init.el file I have the following line (setq js2-basic-offset 2) The last line in my .init.el file is (add-hook 'after-init-hook (lambda () (message "Welcome home %s" (user-...
0
votes
0answers
93 views

hide specific holidays in agenda

Even though I have this on my init file: (setq holiday-hebrew-holidays nil) (setq holiday-bahai-holidays nil) I keep seeing Hebrew and Bahai holidays in my agenda view. How to make them disappear? ...
0
votes
1answer
968 views

how to hide scratch buffer when starting emacs while opening a file?

emacs-25 GUI on Debian. I set up emacs so that it shows the scratch buffer at startup. However, when I open a file via a file manager with right-click -> open with -> emacs, emacs starts up with a ...
0
votes
1answer
179 views

Setting Exec-Path When Using Zsh and Tmux

I am using Emacs 25.2 with Zsh; and I have added the following to my init.el file to set both the Path and exec-path. ;; Set shell path (defun set-shell-path () (let ((shell-path (shell-command-to-...
3
votes
1answer
160 views

should I gitignore my elpa/gnupg directory?

I keep ~/.emacs.d/ under version control with git. I used to gitignore the elpa/ directory, but recently started including it in case I ever want to rollback a package upgrade. I just noticed an ...
1
vote
1answer
98 views

about setting up rust-playground

I have a problem with setting up rust-playground on Emacs. I installed rust-playground on Emacs 25.0.93 of Macbook Pro. When I run rust-playground, the following error happens. rustc /Users/...
0
votes
1answer
80 views

Json-Mode / Puppet-Mode unset common functions when installed with use-package

I'm facing a weird issue in my init.el. Installing packages such as json-mode or puppet-mode (from MELPA Stable) with use-package unsets common functions like forward-word or backward-kill-word. The ...
0
votes
2answers
103 views

Picking different config file [closed]

C-h v user-init-file shows ~/.emacs but I want this user-init-file point to ~/emacs.d/init.el Requirement is to be able to switch between .emacs and .emacs.d/init.el and .emacs.el anytime, ...
0
votes
0answers
451 views

use spaces over tabs everywhere

How do I use spaces instead of tabs everywhere? I noticed that web-mode was using tabs and could not figure out how to fix it. (Also, you may notice I was trying to set 2 tab spaces globally ...
1
vote
2answers
72 views

About the environmental variables on different systems

I've a problem with this statement: (setq org-mobile-directory "~/Dropbox/MobileOrg") It works in Linux (and maybe in OSX too), because the tilde is expanded in /home/<me>/Dropbox/MobileOrg. ...
0
votes
0answers
134 views

Globally disable scrollbar at startup

I execute EmacsClient with the following bash command: $ emacsclient -a "" -c In order to disable the scrollbar, I added the following line to the configuration file located at ~/.emacs: (scroll-...
1
vote
1answer
121 views

Magit function to push

Specially when editing my init.org file, I usually want to push every single change to origin. So I want to write a function to do this, I am almost there but still need some help. (defun cesco/...
0
votes
1answer
254 views

Cannot access user folder in emacs

Here are my settings: Windows 10 64bit GNU Emacs 25.2.1 (x86_64-w64-mingw32) of 2017-04-24 I want to keep the HOME environment variable to by user folder C:/User/chanyoungs for other programs but it ...
1
vote
2answers
166 views

Frame title - path to current file

In my config file, how do I set the frame title so that it shows: The buffer name If a file buffer, show the path to the file without the filename So something like this: .emacs.el -- D:\Dropbox\...
1
vote
1answer
165 views

“require ('org-journal')” creates “Symbol's value as variable is void: require”

I added require ('org-journal) to my .emacs. Now I get the error message: 'Symbol's value as variable is void: require', when emacs is started. Without require ('org-journal) there is no error message....
0
votes
1answer
288 views

OS X: run multiple instances of desktop emacs app with a separate dot file for each

Is it possible to run Emacs.app with ~/.emacs.d/init.el and Emacs2.app with another init.el file that's placed somewhere else? If so, how?
3
votes
0answers
421 views

error autoloading failed to define function when loading custom file

I recently decided rewrite my emacs configuration. I want to load my custom org configuration only in the case when I am opening a *.org file. Considering a minimalistic configuration of init.el (use-...
0
votes
1answer
439 views

Spaceline color issue

so the problem I am having is that my spaceline plugin will have little squares of miss color until I do powerline-reset. (Just like the github issue.) Problem is that I am having to do this every ...
1
vote
1answer
128 views

Emacs init.el warning

When I load up emacs for the first time I get this warning Warning (bytecomp): ‘font-lock-fontify-buffer’ is for interactive use only; use ‘font-lock-ensure’ or ‘font-lock-flush’ instead. [2 times] ...
3
votes
1answer
5k views

Symbol's function definition is void: use-package

I am unable to get the darcula theme working. I have a tried moving (package-initialize) and (require 'package) but I am unable to get it working. Here is my init.el file. ;; Added by Package.el. ...
3
votes
1answer
55 views

Conditional switch to file on startup

I'm using spacemacs and currently I'm using the following in my user-config to switch to the scratch buffer when emacs starts: (setq inhibit-splash-screen t) (switch-to-buffer "*scratch*") However, ...
2
votes
2answers
477 views

Defer loading packages with use-package and package manager

How can I defer loading a package when it is installed using package.el with use-package? Basically, I want the package I use to only be activated using use-package instead of package-initialize so ...
0
votes
0answers
50 views

Prevent emacs from loading the entire configuration file (.emacs) [duplicate]

I have a huge configuration file (.emacs) and I want to prevent emacs to load the bottom part of it without actually cutting (or commenting) the text. How do I achieve this? Example some ...
0
votes
1answer
46 views

void-variable dired-after-readin-hook in emacs 25

I've get emacs 25 build ppa taken from this ask ubuntu answer and I have this functions and macro: (defun remove-lambda-helper (list matcher) "function that remove lambda from a list if match the ...
1
vote
1answer
311 views

org-babel-load-file doesn't load entire file

In ~/.emacs.d/init.el I'm calling my annotated configurations file settings.org like so: (require 'ob-tangle) (org-babel-load-file (expand-file-name "~/.emacs.d/settings.org")) This generates ...
0
votes
0answers
102 views

Binding F12 to reload init.el with a lambda function

I'm trying to map F12 to reload my init.el from whatever buffer I might be in but can't get it to work. I have tried the following in my config and am really not sure why it's not working: (global-...
1
vote
1answer
896 views

Configure org-pdfview and pdf-tools to open at page [duplicate]

I would like to have emacsclient as my default application for opening pdf-files, when openning them from within Emacs, based on a similar post emacsclient opens a file and does eval simultaneously. ...
2
votes
1answer
1k views

Error running Emacs from a Terminal window: “Symbol's function definition is void: package-initialize”

After starting Emacs from a Terminal window, the following message is displayed: An error has occurred while loading '/Users/EvanAad/.emacs': Symbol's function definition is void: package-initialize ...
1
vote
2answers
216 views

Restarting emacs changes default font

I'm new to Emacs. Been a vim user. Using M-x customize-face, irrespective of what font I set it to, Emacs always ends up using Inconsolata-g for Powerline font. Default is DejaVu Sans Mono. I tried ...
0
votes
1answer
545 views

How can I set NeoTree to always show hidden files?

The only way i know to make NeoTree show hidden files is to use neotree-hidden-file-toggle, but this is meant to be used interactively when the NeoTree buffer is the active buffer. Is there a way to ...
1
vote
1answer
163 views

Set different fonts for different charsets

I'm new to Emacs, and would like to know how to append my init.el file to use specific fonts for different languages. Specifically, for English (and other Latin-based languages, I guess) I would like ...
2
votes
1answer
387 views

after-make-frame-functions does nothing for an otherwise working function

I am using workgroups and I have the following code in my init.el: (defun my-start-emacs (_) (interactive) (message "HI") (sleep-for 1) (if (daemonp) (progn (if (not (...
2
votes
0answers
68 views

How to increase the number of recent file listings in helm-mini?

Is there a way to configure the number of recent files that will be in the Recentf section of a helm-mini buffer?
0
votes
0answers
131 views

python-mode: set C-j to newline-and-indent

In python-mode, C-j adds a newline but does not indent, whereas RET does indent. I would like to swap this behaviour around as well as disable electric indentation. I have tried the following: (...
3
votes
3answers
1k views

Emacs 25.1 & Python 3.6.0 Integration [Newbie]

Preface: I've been dabbling with python programming for a mere few months now. Previously, I spent most of my programming time using C# with Visual Studio. In the Python world, I've been using ...
0
votes
1answer
245 views

How to configure new frame font using custom-set-faces?

I'd like to use a fractional font size throughout Emacs. I have been able to set my default font size on launch using custom-set-faces: (custom-set-faces '(default ((t (:inherit nil :stipple nil :...
1
vote
1answer
52 views

Complex multi machine init setup: suggestions on improving the Lisp code

I'm trying to configure my org based init file to work on 2 different machines where some of my org file would be accessed remotely. For example I want to define within the same config different org ...
0
votes
1answer
275 views

Exporting an `org` file to a personal LaTeX class

I have a personal LaTeX class called MyThesis, and I want to be able of exporting from org to LaTeX. Q: How can I call this class that is not in the main tree of texlive? I have this in my .emacs (...
2
votes
1answer
886 views

Symbol's function definition is void: insert-string

;; Specify the startup banner. Default value is `official', it displays ;; the official spacemacs logo. An integer value is the index of text ;; banner, `random' chooses a random text banner in `core/...