Questions tagged [faces]

A 'face' in Emacs is the visual presentation of text using fonts and highlighting. A default face, for example, specifies both the font and the foreground and background colors.

Filter by
Sorted by
Tagged with
2
votes
0answers
1k views

How can I correct an “Invalid face” error?

Issuing M-x org-html-htmlize-generate-css gives the error Invalid face: font-lock-string What does this error mean and how can I correct it? Issuing $ grep -r "font-lock-string[^-]" ~/.emacs.d/ ...
7
votes
1answer
510 views

How to change face in particular theme locally?

The title says it all. How to change face in specific color theme locally, in my configuration?
2
votes
2answers
188 views

face vs overlays, can face ever win?

Some of my modes use overlays for contextual information. However, I have a face that I'd like to always be shown despite any overlays on top of it. Is there any way to have such a "super face"?
7
votes
1answer
700 views

How to set the foreground color of the cursor face?

I tried to set the foreground color of the cursor face, but it does not seem to work. Setting the background color works fine, but setting the foreground color does not have any effect. I would like ...
0
votes
1answer
105 views

Remapping several faces for use in minor mode

I'm using face-remap-add-relative in a tiny minor mode which, when activated, increases the size of the org-level-1 face. This function is perfect for that because when evaluated it returns a cookie ...
2
votes
1answer
677 views

How to disable underlining of highlighted matching brackets?

I want to have no underlining on highlighted matching brackets. I've done the following to achieve that: M-x customize-face show-paren-match And there I deactivated the underlining of matching ...
0
votes
0answers
60 views

Change keywords faces in AUCTeX

I want to change keywords colors of the AUCTeX package. I found the variable font-latex-built-in-keyword-classes that could help me. If me assume I want to display the keyword "newpage" with the face ...
5
votes
2answers
605 views

Set face of outline ellipsis?

Q: how do I change the face of the outline ellipsis? When working with outlines, the (customizable) ellipsis indicates when a section is folded and there is hidden text, eg: * A heading... ** A ...
8
votes
4answers
227 views

Is there a way to determine the face at frame x / y (mouse position)?

When trying to theme certain modes, it's not possible to place the point on the themed item (e.g. to do C-u C-x =) and identify the face used. My thought is to use the mouse to identify the face used,...
10
votes
2answers
2k views

Colors for different priorities in Org mode

I have configured Org mode with a face attribute for priorities with these lines in my init.el: (set-face-attribute 'org-priority nil :foreground "aquamarine1" ...
7
votes
2answers
408 views

How to make the region face take priority over the `show-paren-mode` face?

I'm using show-paren-mode with expression highlighting, changing the background face to just a shade lighter than the default background. I like it a lot. The problem is that when I have a mark, the ...
1
vote
1answer
228 views

AUCTeX: toggle sub- and superscript-fontification

Or: How to put face changes in a defun? I use AUCTeX to edit my LaTeX files and I like the way AUCTeX displays the sub- and superscripts (not only in formulas). Not only it shifts the sub- or ...
13
votes
1answer
844 views

How do I insert text with a specific face?

I have a face, created this way: (defface test-face '((t . (:height 2.0))) "A face for testing.") I'd like to insert some text with that face. But these ways insert the text without the face: (...
5
votes
1answer
166 views

I-search prompt font

I want my minibuffer prompt to be in bigger font, so I've added this to my .emacs: (defun my-minibuffer-setup () (set (make-local-variable 'face-remapping-alist) '((default :height 1.5)))) (...
9
votes
1answer
835 views

Cocoa Emacs 24.5 Font Issues (Inconsolata-dz)

I am trying to set [Inconsolata-dz][1] as my default font to Emacs. Regular Inconsolata works fine, but the dz version is not working properly. Most functions I use keep throwing this error (followed ...
6
votes
3answers
504 views

highlight-regexp in multiple buffers

highlight-regexp is pretty amazing, but when I run it manually by M-x highlight-regexp RET f?o RET 'someface it only applies the highlight to the current buffer. How can I apply a highlight to ...
4
votes
2answers
1k views

Padding around modeline text?

The text in my modeline fits exactly in the modeline, I would like to have some more padding above and below the text, couldn't find an option for it and don't know much about text properties in Emacs....
1
vote
0answers
349 views

org-mode fontification error

Since some time ago I've been having this message: org-mode fontification error whenever I initialize org-mode by opening an org buffer. The initialization process will just get stuck and I have to ...
2
votes
1answer
123 views

insert text with a particular font

When I do s-left-mouse-click, and select "Change Buffer font...", I get a pretty display of sample text showing me what the various fonts look like. I'd like to reproduce similar behavior in a buffer....
8
votes
2answers
1k views

org-block-background font not having effect

I use variable-pitch-mode with org buffers. Normally I set org-block to fixed-pitch and the code between #+BEGIN_SRC and #+END_SRC are properly rendered as fixed width fonts, also with proper syntax ...
3
votes
0answers
527 views

org-default face not having effect

I want to set a different font for org-mode contents. Strangely, setting '(org-level-1 ((t (:inherit variable-pitch)))) has the effect on headers as intended. However, setting '(org-default ((t (:...
2
votes
0answers
73 views

On using bitmapped fonts

I would like to make the bitmapped font Terminus the default font in all my "graphic"1 Emacs sessions. Since Terminus is bitmapped, I want to use it only in one of its "native" sizes, and I want to ...
1
vote
0answers
121 views

org src fontify won't highlight some multiline comments

The option org-src-fontify-natively doesn't care about some multi-line comments. See: As shown in the picture above, the html comment isn't highlighted correctly. I tried hacking through the code and ...
2
votes
1answer
347 views

Org Agenda faces do not appear after applying themes

In my Org Agenda all text except for priorities use the "default" face. Until recently I would see colourful text for say, todo status. I was playing around with custom themes, so I may have broken ...
7
votes
3answers
908 views

Distinguish between blank lines at end of buffer and bottom of window?

Q: how can I get a visual indicator distinguishing between the end of the buffer and the bottom of the window? Use case: I've got a buffer with some blank lines at the bottom. However, the bottom of ...
3
votes
2answers
181 views

How do I get org-mode heading faces in helm

When using commands like helm-in-buffer-headings, it would be much more readable to see output styled (and ideally even indented) like it is in the original document. Is there a way to do this?
2
votes
1answer
188 views

Setting faces is slow?

I'm seeing rather bizarre behavior. I have the following code: (defun set-mode-line-face () (let ((color (pcase (random 6) (`1 '("#586e75" . "#eee8d5")) (`2 '("#...
3
votes
2answers
429 views

Why does the background of the text not correspond to the background color of the frame?

If you look closely there is a background on the text that is different than the frame background. Does anybody know why this happens? According to the manual (if I read it correctly) it says that ...
2
votes
1answer
393 views

Make all text of a given face invisible

Is there a straightforward way to make all text with a given face invisible? I don't believe I can make invisibility be intrinsic to the face, but can I perhaps specify a minor mode that makes sure ...
3
votes
1answer
122 views

How to modify string height while keeping the face?

Here's a code that works for setting a string foreground: (defface test-face '((t (:height 1.2 :foreground "green"))) "doc.") (setq asdf (propertize "asdf" 'face 'test-face)) (add-face-text-...
2
votes
1answer
135 views

What face do I need to adjust to remove the gutters at the edges of my windows?

This is not urgent, but just wondering if an Emacs user could let me know which face I need to adjust to remove the faint gutters at the edge of my windows? I am using GUI GNU Emacs 25.0.50.1 X86_64-...
9
votes
1answer
951 views

Why does the font height change when bold?

It's so annoying... When any text on a line has its face changed so that the text is bold, the height of the line increases by (I assume) a single pixel. It's best shown with an image: Why is this? ...
2
votes
1answer
67 views

Where are face attributes defined for the `*Agenda Commands*` buffer?

I'm trying to modify some face attributes in the buffer that appears when the org-agenda command is called. This buffer displays *Agenda Commands* and Fundamental (mode) in the mode line. I've tried ...
1
vote
0answers
93 views

How do I make faces combine correctly?

Example: How do I make faces combine correctly? I am not opposed to providing a separate set of instructions for each combination (per theme), but do not know how to do that.
2
votes
1answer
758 views

Org-column face settings not coming through in org-mode column view

I'm trying to use a fixed width font when in org-mode's column view (I use variable width font otherwise). Customizing the org-column face attribute doesn't seem to do it. How can I get this to work? ...
3
votes
2answers
529 views

Get foreground color of face at point

I am writing a function to get the foreground color of the face at point and am thinking that Emacs may already provide a better method than the one I'm composing? I am going to be using this ...
1
vote
1answer
178 views

EmacsLisp : Can the pixel width of text in a proportional font be measured?

Given a face using a proportional font, can an accurate pixel width of a single row of text be measured in Emacs? Note: not monospaced text.
1
vote
1answer
232 views

Text is shown as bounding boxes when I switch to Arabic input method and use a certain font

I use this function in init.el file so that I can switch to Arabic language when writing code in Arabic and select an Arabic font for that: (defun arabic-input-font () "changes the set-input-method ...
11
votes
2answers
445 views

How to change faces of org-mode links depending on the link type?

Org-mode offers a variety of different link types ([http], [file], [bibtex], [magit]...). However, they all get the same look defined by the face value for org-link. Is it possible to e.g. change ...
5
votes
2answers
819 views

Emacs Ipython Notebook - What is determining inline plot background?

I have been trying to figure out what attribute is setting the background for inline plots in EIN. The background for the plot seems to always take the default background color for my color theme, ...
13
votes
1answer
1k views

How to Strike out DONE items in org-mode?

I saw some folks have a way to strike out DONE items in org-mode. How do you do that?
1
vote
1answer
414 views

How to regroup set-face-attribute calls

I find myself applying the same attributes to multiple faces quite often: (set-face-attribute 'sml/line-number nil :background zenburn/bg-1 :foreground zenburn/fg :weight 'unspecified) (set-face-...
5
votes
1answer
166 views

How can I fontify a symbol by regexp match group (as in a naming convention)?

I want to add better support for expl3 to AUCTeX. I have regular expressions that properly group according to the naming conventions for: functions (\\(?:__)?[a-z]+_)([a-z_]+)(:[nNpTFwcVvxof]*), ...
7
votes
0answers
982 views

How to better align tags in Org Mode using variable-width font

I prefer using variable-width fonts in Emacs whenever I can. That said, Org Mode tags are horribly aligned when headings use variable-width fonts, even if the tags themselves use fixed-width fonts. Is ...
9
votes
1answer
1k views

How can I override a pre-defined face for light and dark backgrounds?

I would like to use set-face-attribute to pick one of two colors for the foreground depending on whether the background of the current theme is light or dark. The expected behavior is that the ...
2
votes
1answer
214 views

Custom Major Mode - Regex to find word before equal sign and set font-lock-variable-name-face

I'm trying to create my own major mode. So far I've been able to set all the syntax highlighting that I need, but I'm struggling with this one. Basically I need to color any word before an equal sign....
2
votes
1answer
243 views

Elisp revert add-face-text-property

I start with this: (setq test (propertize "foobar" 'face 'font-lock-keyword-face)) ;;=> #("foobar" 0 6 (face font-lock-keyword-face)) (add-face-text-property 0 3 'font-lock-type-face nil test) ...
3
votes
2answers
389 views

Getting `:distant-foreground` face attribute to work

Emacs's faces let you set :distant-foreground, which according to the docs, "is like :foreground but the color is only used as a foreground when the background color is near to the foreground that ...
1
vote
3answers
395 views

How to determine where a face (as it appears on the screen) is defined?

I very much dislike the font faces I get for some modes. I know that I can customize them, but in some cases (e.g. org-mode) this would require customizing dozens of faces. Therefore, what I really ...
1
vote
1answer
100 views

Face color attribute incorrectly applied

I want to modify the region's foreground regardless of syntax highlighting. (set-face-attribute 'region nil :foreground "#656555") But this is what I get (see sample): C-u C-x = gives: ...