Hot answers tagged

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 ...
Lindydancer's user avatar
  • 6,065
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 ...
NickD's user avatar
  • 25.9k
19 votes
Accepted

Emacs Blue color too dark

Add frame-background-mode to your init file: (setq frame-background-mode 'dark)
Viesturs's user avatar
  • 755
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 ...
lookyhooky's user avatar
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, ...
Juancho's user avatar
  • 5,225
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,589
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 ...
Drew's user avatar
  • 74.6k
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 ...
Drew's user avatar
  • 74.6k
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 ...
Lindydancer's user avatar
  • 6,065
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 ...
wasamasa's user avatar
  • 21.7k
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 ...
Leo Ufimtsev's user avatar
  • 4,478
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 ...
sid-kap's user avatar
  • 534
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. (...
Jordon Biondo's user avatar
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 ...
Drew's user avatar
  • 74.6k
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-...
amitp's user avatar
  • 2,431
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 ...
Jimmy Five Bellies's user avatar
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 ...
Iqbal Ansari's user avatar
  • 7,438
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.
Tyler's user avatar
  • 21.4k
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 ...
unhammer's user avatar
  • 1,107
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 ...
npostavs's user avatar
  • 8,983
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 ...
glucas's user avatar
  • 20.1k
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 ...
xji's user avatar
  • 2,525
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 . (:...
djangoliv's user avatar
  • 3,159
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 ...
Drew's user avatar
  • 74.6k
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 ...
db48x's user avatar
  • 14.9k
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 ...
Iqbal Ansari's user avatar
  • 7,438
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 ...
Drew's user avatar
  • 74.6k
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 ...
PythonNut's user avatar
  • 10.2k
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 ...
Jordon Biondo's user avatar
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 ...
Drew's user avatar
  • 74.6k

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