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.

Filter by
Sorted by
Tagged with
1
vote
1answer
69 views

Emacs can not see mode.el in site-lisp

I installed Smalltalk from source which comes with its own mode. The files smalltalk-mode.el and smalltalk-mode.elc are placed in /usr/local/share/emacs/site-lisp/ and this path is in my load-path but ...
2
votes
1answer
371 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
4answers
2k views

Configure Hack as default font in .emacs.d/init.el

I would like to configure the default Emacs font in my init.el (as opposed to using M-x customize that a lot of other questions here on Emacs Stack Exchange has already explained). I have tried the ...
1
vote
1answer
1k views

Error (use-package): Failed to install magit: Package `magit-' is unavailable

I am starting to build up a .emacs file to be used as a development environment within Docker containers. I get this error when starting emacs-nox in a Docker container. Error (use-package): Failed ...
10
votes
2answers
6k views

error: Package `use-package-' is unavailable

I am starting to build up a .emacs file to be used as a development environment within Docker containers. I get this error when starting emacs-nox in a Docker container. Warning (initialization): An ...
0
votes
1answer
432 views

Kill initial buffers

I want to kill some buffers created by default, such as the GNU Emacs, but putting: (kill-buffer "*GNU Emacs*") On the .emacs doesn't work. I guess this code is called before the initial buffers are ...
2
votes
1answer
612 views

Symbol’s value as variable is void: Info-default-directory-list

I am getting this error when I start my emacs. It happens even if I comment out my init.el but not when I use the --no-init-file option. Any thoughts on how to debug this issue? If this is a an ...
0
votes
0answers
306 views

Auctex not displaying pdf correctly using pdftools

I am using pdftools with AUCTEX so that I can display output within emacs. I am using a windows system with emacs 25.3. However after compilation I get the following: %PDF-1.5 % 3 0 obj << /...
0
votes
0answers
324 views

Not able to load a color theme from 'init.el' or using 'M-x color-theme-select'

I am trying to get emacs(emacs24) to load with another colortheme (looking to have a 'dark' theme). In my init.el file I have the lines: (eval-after-load "color-theme" '(progn (color-theme-...
0
votes
1answer
142 views

ztree - use-package key bindings

I tried to set key bindings to ztree (dir and diff), but they are not working after the emacs startup (there is no errors). f8 and C-f8 works but not the navigation keys. Pleas help. When I eval my ...
1
vote
2answers
182 views

Proper way to bind multiple commands to the same key

I am curently redoing my Emacs config and I am switching from autocomplete to company-mode. I want to toggle company-complete with TAB. The issue is that when I do so all the other TAB commands do ...
2
votes
1answer
200 views

Problem evaluating a `sage-shell-mode` function through `ob-sagemath`

I'm trying to use sage-math within an org-mode file. So far I've been able to configure the sage-shell-mode package (I'm impressed that sagemath can be installed in Debian using the package manager), ...
3
votes
1answer
407 views

`#+NAME:` is ignored unless running Emacs with `-q`

I am trying to export an .org buffer with the following contents: #+CAPTION: My subgraph. #+NAME: fig:subgraph [[/tmp/image-4383FmT.png]] The following latex output is produced: % Created 2018-01-...
2
votes
1answer
553 views

Yasnippets: loading two major modes (`org-mode` and `LaTeX`)

I'm trying to load the yasnippets for the LaTeX mode every time I open an org file. Is it possible? How can this be achieved?
0
votes
3answers
1k 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 ...
5
votes
3answers
560 views

init.el - setq or defvar

I want to define a trash directory in my user-init-file but I don't know which way to do this is best or most correct. I currently have something like this: (defvar my-trash-dir (expand-file-name "....
1
vote
1answer
704 views

Loading ~/.emacs: cannot open load file, php-mode

GNU Emacs 24.5.1, installed MELPA, installed php-mode. The directory ~/.emacs.d/elpa/php-mode-20180105.541/ exists. I added the following lines to .emacs: (add-to-list 'load-path "~/.emacs.d/elpa") (...
0
votes
2answers
159 views

init.el: Run function only if no other buffers present

I currently have my *Org Agenda* opening on startup using the following in my init.el: (setq inhibit-splash-screen t) ;; no welcome screen (defun agendafocus() "Focus on agenda at Startup" (org-...
0
votes
1answer
66 views

In what order are Lisp files evaluated in this scenario?

Suppose I structure my Emacs (prelude) customizations like this guy: https://github.com/NicholasKirchner/prelude/tree/master/personal What is the load order of these files (for example)? gnus-init....
1
vote
1answer
335 views

Installed emacs by emacs-bootstrap, got cannot load error and buffer list not work

Using Mac Pro macOS 10.13.1 iTerm2 Has two problems: After installed emacs by emacs-bootstrap, got this error when start it: When try to open buffer list by C-x C-b, it shown this window at bottom ...
0
votes
1answer
124 views

Run keyboard macro after open file?

Is it possible to run a keyboard macro in Emacs right after opening a file? For example, when I open a text file I want to get information in buffer Hello world.
2
votes
1answer
270 views

How do I hide markup in Markdown mode with use-package?

I'd like to hide the markup in my Markdown buffers. I can do that manually using markdown-toggle-markup-hiding. However I'd like to configure this once and for all in my init.el so that I don't have ...
1
vote
0answers
130 views

Emacs really laggy on prog-mode

I noticed Emacs was really laggy on any mode derived from prog-mode two days ago. Before that, everything was fine. I can navigate on a 1000+ lines org-mode file without problem, but I can't even type ...
1
vote
1answer
177 views

Prevent creation of backup org file

Whenever I create an Org file, a ~ backup file is created. How can I prevent this behaviour?
0
votes
2answers
580 views

pdf-tools-install takes a long time on startup

I've installed pdf-tools through MELPA, and it works like a charm. Funnily, and as is documented in the readme, the command pdf-tools-install needs to be run each time if you want pdf-tools to be ...
0
votes
1answer
390 views

Open emacs in Dired mode

I would like to open emacs in dired mode . files and folders should be organised in most recent file first order. Moreover I would like to highlight the Org files for easy selection. Is this possible?
1
vote
1answer
239 views

My emacs installation does not initialise

I don't know what happened but now I cannot initialise my emacs installation. emacs --debug-init gives this answer: Debugger entered--Lisp error: (error "Unable to activate package ‘org-ac’. Required ...
1
vote
3answers
185 views

Putting emacs .org file options in .emacs file

I use a template for my work. It contains following options. Can I put those in .emacs file. #+OPTIONS: num:nil; p:t #+OPTIONS: toc:nil #+LATEXCLASS_OPTIONS: {10pt} #+LATEX_HEADER: \...
3
votes
1answer
355 views

Customize Xah Fly Keys

I am using Xah Fly Keys. How should I change the function one of Xah Fly Keys key bindings calls? For example when in Xah Fly Keys command mode space c . calls the find-file function but I would ...
1
vote
1answer
213 views

Verifying behaviour of featurep when checking if a package is installed

;; Install package.el for package management (require 'package) (setq package-enable-at-startup nil) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) (add-to-list 'package-...
0
votes
1answer
369 views

default directory is not working in Windows [duplicate]

I am trying to set the default directory to D:/ by (setq default-directory "D:/") but when I type c-x c-f, it is showing D:\software\emacs\bin, which is the installation directory.
0
votes
1answer
64 views

imenu list automatically toggled in new frame

I tried to run imenu-list-show in hook which is called after frame creation but it doesnt work as expected. It toggled the imenu-list in new frame but my keyboard arrows become unresponsive. Code is: ...
1
vote
1answer
224 views

Running emacs client: how do you know if the init files had errors loading

I use emacs 25, in nw mode, with "alias emacs='emacsclient -nw'" When I add something to my personal.el, I do brew services restart emacs My issue is, if I make a big blunder inside my personal.el ...
1
vote
1answer
236 views

Troubleshooting: changing default folder in .emacs not working

I am trying to make emacs start on the folder where all my orgfiles are saved. I achieved this in my windows machine by changing the "Start In" field of the shortcut properties, as suggested in this ...
0
votes
0answers
302 views

how to use multiple emacs distributions?

I'd like to use multiple emacs distributions e.g. spacemacs, prelude, starter-kit and my personal config for demonstration purposes. What would be some recommended ways to realize this?
0
votes
1answer
133 views

error: Package `xah-fly-keys-' is unavailable

I am setting up a .emacs file that I will be using in Docker containers. I want to include xah-fly-keys but I am getting this error message. Package `xah-fly-keys-' is unavailable When I start ...
0
votes
1answer
85 views

Strange regex behavior

I want to skip blank region under cursor, so I created this regex: \s+\w translated to emacs regex [:space:]+[:graph:] but it doesnt match what I want. It matches some random space somewhere! Whats ...
1
vote
1answer
114 views

Emacs triple click handler

What handler is called when I make triple click ? For me, it select whole line. I want this behavior to be binded to C-l, how to do it ? EDIT: I tried to bind this to key, but not works, how to fix ...
0
votes
1answer
71 views

Ignored keybinding

I have a problem with following key binding: (global-set-key (kbd "C-/") 'comment-or-uncomment-region) Actually, it is ignored by Emacs so undo is executed instead. I'm running Emacs in gui mode.
0
votes
2answers
253 views

how do you turn off smart brackets//parenthesis in prelude

I hate it when prelude auto adds the ending } when I type { (this is ruby mode) This is very common, for example typing ( auto adds a ) This is really annoying when trying to edit code, or a lot of ...
1
vote
0answers
273 views

osx - disable left option/command key, enable right option

I'm learning Emacs. On my Macbook, I have in keyboard settings: Capslock and Ctrl key swapped Option and Command key swapped Emacs commands like ctrl-r, ctrl-s work fine for me (obviously I use them ...
0
votes
2answers
98 views

Evil mode interacting with python.el (invoking skeletons)

Skeletons such as python-skeleton-if in python.el has been giving me problems - I never use them but they get invoked unexpectedly. If they are invoked, it is a pain to get out of it and also it ...
1
vote
1answer
105 views

Load elisp file only when file with specific extension is opened

I've been using SLIME mode with the quicklisp slime helper, and I load the package with the following code (in my .emacs): (load (expand-file-name slime-helper-path)) (setq inferior-lisp-program "...
2
votes
3answers
898 views

How to make Emacs start using the Xetex engine as default

I am using Emacs to edit all the stuff I'm writing. As I make extensive use of fontspec, I would like to configure my Emacs (running within OpenSuse Linux)so as to start using the xetex-engine without ...
0
votes
0answers
263 views

Emacs hung with Error running timer 'blink-cursor-start'

I just installed a fresh Ubuntu 17.10 on a Dell XPS 15, and then installed Emacs from the repos with apt-get in the normal way. The moment I start Emacs, I get the error message Error running timer '...
6
votes
2answers
1k 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 ...
2
votes
1answer
212 views

how to define a yasnippet in init file?

My init file (.emacs) is version-controlled, my packages are installed with use-package, so my Emacs config is self-contained. I don't want to add (and manage) specific snippet files into my ...
0
votes
0answers
68 views

C-x C-f Edit File As Root [duplicate]

Is there a way to open a local file for editing as a root? I need to make some changes to a config file located at ~/.emacs.d/init.el, but the Emacs tells me that the buffer is read-only.
0
votes
0answers
50 views

frame title as buffer file resets to default after some time

In my ~/.emacs I have the following: (setq frame-title-format '("" invocation-name ": " (:eval (if (buffer-file-name) (abbreviate-file-name (buffer-file-name)) ...
0
votes
0answers
440 views

Error when initializing Emacs

This is what I get when starting Emacs from terminal with emacs --debug-init. I don't know the reason why emacs suddenly started to not working. Debugger entered--Lisp error: (wrong-type-argument ...

1
3 4
5
6 7
13