22
votes
Accepted
How do I insert text with a specific face?
There are some problem with the code:
put-text-property is applied to an object. In this case your string. You need to pass it as as the last parameter.
put-text-property starts counting at zero.
If ...
19
votes
Emacs Blue color too dark
Put the cursor on the blue word, and say C-u C-x =. Find the face entry and click on its value. Then click on customize this face and change the foreground value to e.g. Cyan1.
If you are in a ...
19
votes
Accepted
Emacs Blue color too dark
Add frame-background-mode to your init file:
(setq frame-background-mode 'dark)
15
votes
Disable enlarged org-mode header appearance
Okay I found a solution that worked for me.
(defun my/org-mode-hook ()
"Stop the org-level headers from increasing in height relative to the other text."
(dolist (face '(org-level-1
...
14
votes
Colors for different priorities in Org mode
You can customize org-priority-faces to give specific attributes for each priority.
From C-h v org-priority-faces,
Documentation:
Faces for specific Priorities.
This is a list of cons cells, ...
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 ...
12
votes
Accepted
How to make the region face take priority over the `show-paren-mode` face?
Customize option show-paren-priority to have a negative value, e.g., -50.
No, this is not documented anywhere. Yes, a bug was filed about that. No, the bug report was never responded to.
See Emacs ...
12
votes
Quickly Adjusting Text to DPI Changes
You can set the value of default-frame-alist, including its font parameter, conditionally, depending on the current monitor/display. (You can use function display-monitor-attributes-list to give you ...
12
votes
Accepted
How to get/read face attributes?
You can use face-attribute.
To match the example given, the following expression gets the trailing space background color:
(face-attribute 'whitespace-trailing :background)
face-attribute is a ...
11
votes
Emacs Blue color too dark
Faces in Emacs can have different values, depending on display attributes such as the number of colors supported or whether they're displayed on a light/dark background. Emacs can guess the latter ...
10
votes
Accepted
How to Strike out DONE items in org-mode?
If of use: I came across Sacha's post that talks about how to do this.
Based on the code in her post and on the feedback from the comments, I now use the code below (I have a light theme). You may ...
10
votes
Accepted
Cocoa Emacs 24.5 Font Issues (Inconsolata-dz)
Emacs doesn't allow fonts that have hyphens in them. I would rename the font to something that doesn't contain hyphens.
You can do this using ttx. For example, assuming you have a font named ...
10
votes
Accepted
How to change face in particular theme locally?
Use custom-theme-set-faces in a with-eval-after-load to easily customize a theme.
For example, this modifies ample-theme to have a lighter background and green keywords instead of the defaults.
(...
10
votes
Accepted
How can I find out what face I need to change in the mode-line?
M-x list-faces-display shows you all of the faces currently defined, including those with names mode-line*. It shows you the appearance of each face.
And it lets you customize any of them - just ...
9
votes
How do I change the color of the prompt in the mini-buffer?
It's not obvious how to find out what face it is. The usual way is to put your cursor on some text and then use C-u C-x = but that's harder to do in the minibuffer. The other way I know of is to use M-...
8
votes
Accepted
highlight-regexp in multiple buffers
Run M-x ibuffer to show all open buffers.
Press m to mark buffers of interest (or one of the other more interesting marking commands).
Press E to evaluate a lisp form in each marked buffer, for ...
8
votes
Accepted
I-search prompt font
This is because isearch does not use the minibuffer to read input from the user, rather it simply updates the echo area with the characters entered during isearch. Please note that the minibuffer and ...
8
votes
Accepted
Disable enlarged org-mode header appearance
Org headings are controlled by the faces org-level-1, org-level-2 etc. You can get to them via M-x customize-face. Unselecting the height attribute should set them to the default font size.
8
votes
Quickly Adjusting Text to DPI Changes
I'm using something similar to @gavenkoa (by pure coincidence also with a helper named my-dpi!) to make new frames get the right size, but calling on zoom-frm since I use that package anyway. It also ...
8
votes
Accepted
something changes the default face in my .emacs
"Who's playing behind my back?" with respect to the most common choice of installing the GTK gui version of Emacs.
The GTK build of Emacs supports GConf settings, which is what is causing the font ...
7
votes
Accepted
Distinguish between blank lines at end of buffer and bottom of window?
You can customize indicate-empty-lines to enable a fringe marker on lines after the end of the file, or call toggle-indicate-empty-lines to turn it on and off interactively.
There's a package on ...
7
votes
Accepted
org-block-background font not having effect
Turns out this is actually related to org-block-background face, which has been removed in org version 8.3.1 in commit f8b42e8, thus the bug. The rationale seems to be
it causes a bug with ps export
...
7
votes
Colors for different priorities in Org mode
Here a example of customization
(setq org-priority-faces '((?A . (:foreground "red" :weight 'bold))
(?B . (:foreground "yellow"))
(?C . (:...
7
votes
Accepted
Changing the Variable Pitch Font
It seems that function variable-pitch-mode hard-codes the use of face variable-pitch. I think your two choices (other than perhaps advising that function) are these:
Use face variable-pitch. Just ...
7
votes
Accepted
Highlight rectangle and non-rectangle selection at the same time
There’s no simple variable you can set to control this, but you can do it with some programming if you want.
There is a variable called redisplay-highlight-region-function whose value is a function to ...
6
votes
Accepted
Padding around modeline text?
You can customize the :box attribute of the mode-line-face. From the documentation (C-hset-face-attributeRET
`:box'
VALUE specifies whether characters in FACE should have a box drawn
around ...
6
votes
Accepted
How to set the foreground color of the cursor face?
Nope. M-x customize-option cursor shows you the doc string:
Basic face for the cursor color under X. Hide
Currently, only the :background attribute is meaningful; all
other attributes are ...
6
votes
Accepted
Echo Area font face?
Sure you can, (see this SO question) although it seems a bit heavy-handed.
(defun nadvice/message-color (old-fun &optional str &rest args)
(if (not str)
(funcall old-fun)
(funcall ...
6
votes
Accepted
How to preserve color in *Messages* buffer?
You can't with message. Having looked at the internals of message, only the raw char* is given to the function that actually logs the text, all text properties are lost.
You can hack your way around ...
6
votes
Accepted
Is there a way to easily see currently defined faces?
To see all faces currently defined: M-x list-faces-display. It does show a preview. It does not show the samples using the "default 'link' face".
The Emacs manual, as usual, is your friend. C-h r i ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
faces × 392org-mode × 68
themes × 44
fonts × 42
font-lock × 32
colors × 29
customize × 21
text-properties × 18
customize-face × 17
highlighting × 16
mode-line × 13
init-file × 9
org-agenda × 9
minibuffer × 9
region × 9
buffers × 8
auctex × 8
dired × 8
spacemacs × 7
syntax-highlighting × 7
fringe × 7
regular-expressions × 6
hooks × 6
terminal-emacs × 6
help × 6