22 votes

Word wrap line option by default

JeanPierre's answer will work fine if you want to use different word wrapping per type of document. If you want all your documents word-wrapped, use the following: (global-visual-line-mode t) in ...
Jeff Spaulding's user avatar
14 votes

Is there a way to change color of active window's fringe?

Since you want "To better distinguish between focused window", you can use other ways to do that instead of just changing the active window's fringe color. I combine three ways to better distinguish ...
CodyChan's user avatar
  • 2,609
11 votes
Accepted

How can I change where the customize puts custom-set-variables

Set the custom-file variable in your init file. C-hv custom-file RET
phils's user avatar
  • 49.7k
11 votes
Accepted

How to use .dir-locals.el with Projectile?

.dir-locals.el does not care about the meaning of the variables that it sets, nor does it assume their values are lists (they do not have to be.) So it does not perform any merge or other processing. ...
Yuri Steinschreiber's user avatar
10 votes

How can I change where the customize puts custom-set-variables

Example of exact text you may want to place in your init.el: (setq custom-file (concat user-emacs-directory "custom.el")) (load custom-file 'noerror)
ideasman42's user avatar
  • 8,556
9 votes
Accepted

Word wrap line option by default

As you noticed, the menu entry says "Line Wrapping in This Buffer" so this is not something that is saved by "Save Options". To enable visual-line-mode in all your latex documents, add the following ...
JeanPierre's user avatar
  • 7,363
9 votes

Set column widths in `ibuffer`

If what you care about is seeing the entire buffer-name column, specifically, you can do it without "customising" anything, by using ibuffer-switch-format, bound to ` within ibuffer. The function ...
aplaice's user avatar
  • 2,146
9 votes
Accepted

Customize ??? in which-func-mode

??? is displayed if which-func-mode (or which-function-mode in Emacs 25) can't determine the name of the current function. To customize it, modify the variable which-func-unknown, which is the "String ...
Wieland's user avatar
  • 555
9 votes
Accepted

Is it possible to organize the capture templates selection screen?

There are a couple of options for this, to me the easiest way is grouping templates using the built-in mechanism. My way to use capture templates is based in memory muscle rather than digging a long ...
Muihlinn's user avatar
  • 2,594
8 votes
Accepted

Display all setq possibilities

For best results and to avoid gotchas, do not use setq to set option values. Get in the habit of doing one of the following instead: Use M-x customize OPTION, where OPTION is the option name. Change ...
Drew's user avatar
  • 76.4k
7 votes
Accepted

On monkey-patching a third-party function

For variety, here's a solution using the :around advice. Copy the below test snippet to the *scratch* buffer and evaluate the progn form. (progn (defvar last-enabled-foo nil) (setq last-enabled-...
Kaushal Modi's user avatar
  • 25.4k
7 votes

How can I get undo behavior in Evil similar to Vim's?

According to the variable description (see C-h v evil-want-fine-undo) the value fine is not supported any more due to inconsistent behaviour. As I use undo to undo typos or the mentioned setting ...
Jörn Reimerdes's user avatar
7 votes

Is it possible to change the font size in specific buffers?

Yes, you can use a hook: (add-hook 'term-mode-hook (lambda () (text-scale-decrease 1)))
djangoliv's user avatar
  • 3,179
7 votes
Accepted

How to know which packages have been installed?

Packages installed with package-install are stored under .emacs.d/elpa/ directory. You can remove a package by deleting its directory e.g. evil-20170802.1333 ;) Check out use-package package. It ...
mmajcher's user avatar
6 votes

detecting obsolete/deprecated settings in elisp files, particularly .emacs

Others will no doubt add more info to help answer this. I'll mention a few things that come to mind. `M-x customize-changed' shows you a Customize buffer that tells you about stuff that has changed ...
Drew's user avatar
  • 76.4k
6 votes
Accepted

What happens if variable changed through customize is later changed by package maintainers?

The answer to your question is: Yes, you won't hear about the new and exciting modules. But you can write: (setq foo (remq 'c foo)) to remove c from foo. Or clone the repository and use standard ...
scbagley's user avatar
  • 609
6 votes
Accepted

No colors for eshell?

Eshell is an independent command interpreter implemented in Elisp, so by default it should have nothing to do with your other dotfiles, such as ~/.bashrc. The custom prompt function you list works ...
Basil's user avatar
  • 12.2k
6 votes
Accepted

How can I get some environment variables into init.el to construct file paths?

(substitute-in-file-name "~/.emacs.d/${USER}_${HOST}_custom.el") Should give you what you want. substitute-in-file-name is a built-in function in C source code. (substitute-in-file-name FILENAME)...
wvxvw's user avatar
  • 11.3k
5 votes

Detecting variable changed outside customize

Emacs version 26.1 and higher allows you to trigger the debugger when a variable changes. Place the following code near the beginning of your init.el: (debug-on-variable-change 'semantic-lex-c-...
Programator2's user avatar
5 votes
Accepted

emacsclient directly start eshell command command line

Surprisingly (at least to me), the -f flag means different things to emacs and emacsclient. To emacs, it means: -f FUNCTION --funcall=FUNCTION Call Lisp function FUNCTION. If it is an ...
Tyler's user avatar
  • 21.9k
5 votes
Accepted

loading tramp overrides tramp-remote-path customization back to default value

Short answer: Don't edit custom-set-variables form by hand. Tramp must be loaded for custom-set-variables to work. Either load tramp before custom-set-variables: (require 'tramp) (custom-set-...
Clément's user avatar
  • 3,973
5 votes

Separating Customize settings from other Init-file settings

Set variable custom-file. If defined, that is the file the Customize uses, to save and update your custom settings, instead of using your init file (e.g. ~/.emacs). Just add this to your init file: ...
Drew's user avatar
  • 76.4k
5 votes
Accepted

How do I move custom- commands into a separate file and include them in .spacemacs?

You should take the whole text of your first code snippet and stuff it into the custom.el file as it is. After you have done this, put your second code snippet in place of the previously copied stuff (...
jue's user avatar
  • 4,501
5 votes

How to know which packages have been installed?

M-x package-list-packages At the end of the list are installed packages (printed in red).
Pierre ALBARÈDE's user avatar
5 votes
Accepted

How to customize emacs toolbar?

I have created an image corresponding to the pepper.xpm in the below example. In emacs25.3 use 22x22 pixel image. I just copied one of the xpm image files in the /usr/share/emacs/25.3/etc/images (in ...
manandearth's user avatar
  • 2,108
5 votes

Customize eshell redirection to buffer

To redirect to a buffer, use #<buffer buffer-name>, since Emacs 24.4, you can also use the shorthand #<buffer-name>. For example, echo hello >>> #<buffer *scratch*> echo ...
xuchunyang's user avatar
  • 14.4k
5 votes
Accepted

Separate customizations according to modes

It seems to be possible with an extra package. Initsplit Initsplit (initially written by John Wiegley — one of the co-maintainers of Emacs) was designed for exactly this purpose. Unfortunately, it ...
aplaice's user avatar
  • 2,146
5 votes
Accepted

Change color of org-mode checkboxes

@Drew was right: in some other part of my init.el, I had overwritten org-todo with custom-set-faces: (custom-set-faces '(org-todo ((t (:overline t))))) This seems to reset the :foreground property....
Timm's user avatar
  • 1,569
5 votes
Accepted

tramp-default-method has no effect

With Tramp 2.3 / Emacs 26.1, Tramp's syntax has changed. It requires now the method name mandatory. If you want the shorter version of Tramp file names (without the method), you must change the syntax ...
Michael Albinus's user avatar
4 votes

describe-face character not under / unreachable by the cursor

Turns out you can indeed use the mouse (I think this may be exactly what you were looking for): ;; based on: https://emacs.stackexchange.com/a/19585/13444 (defun brds/describe-char-at-mouse-click ...
Braham Snyder's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible