51
votes
Accepted
How to change the cursor type and color?
In order to change your cursor or caret, what you want to do is:
Open your .emacs file and this line of code:
(setq-default cursor-type 'bar)
And to change the color:
(set-cursor-color "#ffffff") ...
38
votes
Accepted
How to Change size of split screen emacs windows?
C-x- (shrink-window-if-larger-than-buffer) to shrink a window to fit its content.
C-x+ (balance-windows) to make windows the same heights and widths.
C-x^ (enlarge-window) to increase height by 1 ...
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 ...
19
votes
Accepted
Set column widths in `ibuffer`
As @Sigma's answer mentions, you need to customize ibuffer-formats. The docstring gives a lot of details about how to modify it by hand, and also notes that you can use the customize machinery to ...

Dan♦
- 31k
15
votes
Create a file link in org-mode that accepts spaces in the text
If you put the links in a file using org-mode (e.g. ending in .org), you can create links like this by:
[[file:d:/path/to/filename with spaces]]
I'm assuming you are on Windows, and this works for ...
14
votes
How can I get undo behavior in Evil similar to Vim's?
Since @shosti pointed out that Evil considers deviation from Vim behavior as bugs, I filed a bug and one of the authors of Evil added a new possible value for evil-want-fine-undo:
(setq evil-want-...
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 ...
13
votes
How to change the cursor type and color?
Cursor type can be set for a given buffer (using buffer-local variable cursor-type), as indicated in the answer by @King. (That answer uses setq-default to set the default value for all buffers.)
Or ...
12
votes
Accepted
How can I make customize use single quote for quotation?
Whether Lisp objects are printed using ' and #' is controlled by print-quoted.
See section Output Variables of the Emacs Lisp manual.
So,
(advice-add 'custom-save-all :around
(lambda (...
11
votes
Accepted
describe-face character not under / unreachable by the cursor
I do not know about using the mouse, but I've often found it's easiest for me to run list-faces-display and then just i-search for what the face is likely called or visually scan for text that looks ...
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
10
votes
describe-face character not under / unreachable by the cursor
There are 4 regions where text may be displayed in Emacs, here is what
you can do to inspect each of them.
The mode-line: See the value of mode-line-format.
The header-line: See the value of header-...
10
votes
Accepted
How can I prevent GNU Emacs from splitting windows on startup?
You want the following in your init file:
(setq inhibit-startup-screen t)
or, equivalently, say
M-x customize-variable RET inhibit-startup-screen RET
10
votes
Accepted
Emacs always ask to trust colour theme at startup
Your init.el file probably contains a snippet like this:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your ...
10
votes
Accepted
How can I add a new colon-command to Evil?
The official way of doing this is demonstrated in evil-maps.el.
Therefore, creating a new ex command is very simple:
(evil-ex-define-cmd "b[utterfly]" 'butterfly)
You'll want to either use this ...
9
votes
Accepted
How to customize syntax highlight for just a given mode
Faces are global so changing its attributes anywhere changes it
everywhere, as you've noticed. To change it locally, make a copy of
the face, change the attributes in the copy and then use a mode ...
9
votes
Make Buffer List take focus?
You can replace the command list-buffers which is run with C-x C-b to a function that does what you want. In this case buffer-menu-other-window opens the buffers list in another window with focus. ...
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 ...
9
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. ...
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 ...
8
votes
Make Buffer List take focus?
An alternative is to switch to ibuffer, which does not share this problem.
ibuffer is part of GNU Emacs, so on recent versions of Emacs you should just need to add
(global-set-key (kbd "C-x C-b") '...
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 ...
7
votes
How to Change size of split screen emacs windows?
I would also recommend checking out either the windresize package from ELPA, or the windsize package from MELPA.
With windresize, you can do M-x windresize and then use the arrow keys to move window ...
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 ...
7
votes
Accepted
What does customize: Set for Current Session do?
Any change to the variable is equivalent here, so just M-x set-variable or (setq THE-VAR A-NEW-VALUE) is sufficient.
The function called when you click Set for Current Session is custom-variable-set. ...
7
votes
Accepted
Enable any outline mode for markdown
If I understand the question, you are looking for a way to edit markdown files where you can show or hide sections, navigate by headings and so on.
I've never used allout-mode but it does look like ...
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-...
7
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)
7
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 ...
6
votes
Dired: only reuse buffer for directories
If you get used to the fact that a replaces the current (dired) buffer with the selected file/directory, then you're not limited by a default approach; you just use the option you want at the time.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
customize × 213init-file × 29
org-mode × 26
faces × 20
defcustom × 14
themes × 12
customization × 10
buffers × 7
colors × 7
variables × 7
latex × 6
org-agenda × 5
fonts × 5
minor-mode × 5
spacemacs × 4
evil × 4
package × 4
window × 4
frames × 4
start-up × 4
custom × 4
dired × 3
tramp × 3
hooks × 3
font-lock × 3