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
1answer
653 views

Gray-out preprocessor conditionals

Is there a package that will gray out or hide the false portion of a c preprocessor macro? #define ENABLE 1 #if ENABLE bool hide = false; #else bool hide = true; #endif In the above example, ...
3
votes
1answer
2k views

How do I change the color of the prompt in the mini-buffer?

I am using the zenburn theme and my mini-buffer prompt is unreadable (image attached). Please help me. I am just learning emacs.
1
vote
0answers
63 views

Equivalent of add-face-text-property for overlays?

add-face-text-property is very convenient for adjusting the face of text based on text properties (Changing Text Properties). Q: Is there an existing equivalent to add-face-text-property to add face ...
2
votes
1answer
92 views

Why isn't face-remapping-alist permanent-local by default?

text-scale-mode uses a buffer-local face-remapping-alist to scale the buffer's text, adding values like (:height 1.2). It stores a "cookie" with the scaling it has applied in another local variable, ...
2
votes
1answer
138 views

How to set face to different property by detecting the background-mode

(set-face-attribute 'hl-line nil (cl-case (alist-get 'background-mode (frame-parameters)) ('light ; darker percent 5% :background ...
1
vote
0answers
142 views

Icicles showing user-error message in echo area during TAB-completion

i have a strange behaviour of my emacs (25.1.1) running in cygwin within a terminal window (mintty 2.7.3). Every time when doing TAB-competion (eg. M-x describe-func) I got following messages in the ...
0
votes
2answers
71 views

Size of default face from environment variable

I'd like the size of the default face be read in an environment variable. Currently my .emacs reads the frame size from the EMACS_HEIGHT var thanks to the following code in the (custom-set-variables ....
2
votes
1answer
499 views

how to change the font of only the minor-modes list in the mode line?

My main font doesn't render the minor modes glyphs correctly, they are smaller, so I wanted to force the glyphs of the minor modes list to use the default source code pro font which renders them at ...
2
votes
1answer
732 views

How to customize org-agenda-* faces in .emacs file?

I am trying to customize org-agenda-* faces such as org-agenda-date, org-agenda-date-today, and org-agenda-date-weekend in my .emacs file. Normally, I install the use-package package to lazily load ...
0
votes
1answer
86 views

Face of org-mode source block changes when returning from edit buffer

A strange thing happens when editing source blocks within an extra buffer with C-c ': the face of just this source block changes upon returning, i.e. the face settings are not used any more. I'm ...
2
votes
0answers
176 views

Faces not set immediately after load-theme

I'm trying to set the faces of highlight-indent-guides automatically whenever a new theme is loaded by making small adjustments to the background color of the default face. I have everything working ...
1
vote
2answers
318 views

text-scale for all faces in buffer

I often use text scaling, but it only seems to work on the default face. This is a problem, for instance, when I write text that also has italics (e.g., markdown, org text). The text scale commands ...
1
vote
0answers
35 views

Displaying adjacent boxed text (Zero-length/invisible delimiters for text properties?)

I'm interested in displaying adjacent boxed text using the :box t face property in the following manner for adjacent text: Is there an accepted convention for delimiting/isolating text properties ...
1
vote
1answer
2k views

How to get/read face attributes?

The following Emacs Lisp you can set the background color of face whitespace-trailing: (set-face-attribute 'whitespace-trailing nil :background "#ff0000" :foreground nil)) How can a face attribute ...
1
vote
1answer
554 views

How to overwrite properly a face for a particular theme

I use the monokai theme by default in my Emacs configurations. But sometimes I use other themes too, particularly light themes like leuven if the light in the room is more suitable for that. But I don'...
4
votes
2answers
475 views

How to make buffer name in mode-line be bold when its window is selected? [duplicate]

In Emacs, on the modeline: I would like the name of the currently focused buffer to be bold, but only when its window is selected. My modeline looks something like this: (setq mode-line-format (...
3
votes
0answers
280 views

Misc-Fixed fonts and font height

I use the Misc-Fixed fonts because I enjoy non-antialiased fonts. They are designed per height, and tolerate shrinking badly. For instance, in the following example, the default font is set to 9x15 ...
8
votes
3answers
2k views

Quickly Adjusting Text to DPI Changes

My laptop has a 4K screen therefore a very high DPI, much higher than my external monitors. So when I switch from using external monitors to the builtin laptop screen I would like to quickly scale the ...
2
votes
0answers
192 views

Faces vs. font-lock faces

What is the relationship between the "basic" faces defined in faces.el and "font-lock" faces in font-lock.el? My initial impression was that basic faces, like bold and fixed-pitch, are based on style ...
2
votes
0answers
22 views

Is it possible to highlight the region uniformly across different sizes/fonts?

Highlighting the region when it includes text with different heights/fonts shows gaps and different highlighting heights as follows: Is there any way of highlighting continuously (no gaps) and ...
5
votes
1answer
2k views

Changing the Variable Pitch Font

Is there a way to change the font associated with the variable-pitch-mode? On my emacs installation enabling variable-pitch-mode changes the font to a sans-serif font; I would like to use a serif font ...
2
votes
3answers
401 views

How do I change the cursor face per buffer?

I have a custom emacs major-mode which I specified the background and foreground colors for. However, the default cursor color clashes with the background and you can't see it. 'set-cursor-color' ...
1
vote
1answer
215 views

Is there a way to easily see currently defined faces?

I often find that I need to define faces for custom commands. I prefer to inherit from faces defined by the current theme, to keep things visually consistent. M-x list-faces-display lists the faces, ...
1
vote
0answers
162 views

How can I stop an overlay from inheriting the properties of underlying text?

I'm using an overlay to display additional information next to Dired candidates, because modifying the Dired buffer directly prevents Dired from working properly. I'm displaying the text using a ...
3
votes
1answer
402 views

Use one face's attributes in another

What is the idiomatic way to make one face the same as another? Basically, I would like vertical-border to be exactly the same as default. Preferably, if default changes, so does vertical-border. I'...
8
votes
1answer
283 views

Coloring mu4e headers based on title content

I'd like to color the messages in my *mu4e-headers* view, depending on which mailing list they come from. I'm rather new to emacs face alterations, and I didn't see anything that looked relevant for ...
1
vote
1answer
684 views

Variable-pitch face breaking indentation in org mode

I want to use a variable pitch face when using org mode (for composing articles, prose, etc.) The emacs wiki suggested using buffer face mode with a hook to set the face for org mode buffers: ;; Use ...
0
votes
2answers
160 views

How to change the mark (*) color in dired mode

I am using the cyberpunk-theme, the * are show in light green and is not visible in hightlighted line. I tried to set dired-mark-face to white. Is there other variables I can set?
2
votes
0answers
322 views

Changing linum-mode face background uniformly

I've been trying to change my line numbers background to be a different colour other than the background colour of my frames and it ended up looking like so :- How can I change the line numbers ...
0
votes
1answer
324 views

Change mode-line size without changing header line

There are several posts and information around for changing the mode-line face properties, like size. I tried them for a smaller mode-line, using: (set-face-attribute 'mode-line nil :height 100) ...
1
vote
1answer
150 views

How to set the color for whitespace in isearch failures

I have my isearch failure face set like so: (custom-set-faces ... '(isearch-fail ((t (:background "#660c00")))) ... ) It works for the most part, highlighting text which doesn't match in that ...
3
votes
0answers
62 views

Loading a theme and fontifying in batch mode

Loading a theme in batch mode seems to not set face attributes: $ emacs -Q --eval "(load-theme 'tango t)" \ --eval "(prin1 (face-attribute 'font-lock-keyword-face :foreground)))" "#346604" ...
0
votes
0answers
165 views

Change the background color with region text as color code

I have many color variables defined in my css - LESS file, whose background color i like to highlight on text selection and running this elisp block. (add-text-properties (region-beginning) (region-...
5
votes
2answers
197 views

Change size of wavy underlines for HiDPI displays

I'm running emacs on Linux with HiDPI display and all X environment I successfully tuned to support it, but in emacs wavy underlines are still looking extremely thin (relatively to font size). I've ...
13
votes
3answers
2k views

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

To better distinguish between focused window and rest that are not I would love to change this window's fringe color. Discovering customize with fringe keyword I found only how to change its bg color ...
2
votes
1answer
241 views

Helm find-file foreground face for interactive current directory in minibuffer

I'm using Spacemacs with $ emacs --version > GNU Emacs 24.5.1 On OSX 10.10.5 Using C-x C-f to find files shows a minibuffer like: I have been able to get rid of the ugly green foreground ...
0
votes
0answers
173 views

How do I get curly quotation marks to show in Emacs on OS X?

EDIT: My problem has been fixed or, more precisely, worked around, thanks to help in the comments below. Never figured out what exactly the issue was as it wasn't a problem with my Emacs configuration ...
1
vote
1answer
37 views

Modify face by its string name

In my config file i have the following lines to fix faces for Scala-mode: (make-face-bold scala-font-lock:lazy-face) (make-face-bold scala-font-lock:final-face) (make-face-bold scala-font-lock:...
0
votes
1answer
765 views

Changing mode-line face when evil state changes

I'm trying to change the mode-line face box attribute to be the same color as the evil emacs state face, obviously updating it each time the mode changes. I've seen some things about using a post-...
8
votes
3answers
5k views

Disable enlarged Org mode header appearance

I am using Org mode on Macintosh GNU Emacs version 24.5.1 in GUI mode and the headers are enlarged. I would like to disable this feature so they rendered in the default font size. I have tried this... ...
3
votes
4answers
98 views

How do I find the variable or lisp code controlling a face at a particular column?

For the longest time I have been ignoring a face change at column 80 in my Java code. The text switches to a pinkish color as shown below. Now it is sufficiently bothersome that I would like to ...
4
votes
0answers
285 views

“Invalid face reference: linum” even load linum after make frame

I want to have line number at buffer, but when I use Emacs server, the Message buffer display the following error: Invalid face reference: font-lock-comment-delimiter-face [2 times] Invalid face ...
5
votes
3answers
722 views

How can I find out what face I need to change in the mode-line?

I have a UI element in my mode-line provided by which-func-mode. I also have it in my header-line, pictured below (the blue "render" text): How can I find out which face this is so I can style it to ...
1
vote
1answer
361 views

Powerline not rendering after adding another face

I am using this powerline and have trouble modifying the theme. This is my config for powerline: ;; My theme and setting for powerline ;; include original powerline (require 'powerline) ;; theme ;; ...
5
votes
1answer
165 views

Can you describe a face color in terms of an inherited face color?

Specifically, I want tags in org mode to be a variant of the color of the corresponding heading (e.g. less saturated or lighter). Each org mode heading level is a different color, so I can't just ...
6
votes
1answer
289 views

How to preserve color in *Messages* buffer?

When running (C-x C-e) the following snippet and doing M-x mes, I see text written in red in the minibuffer area, but the text in the *Messages* buffer is stripped of all formatting. (defun mes () "...
6
votes
1answer
245 views

Echo Area font face?

Is there any way to set a custom face for the echo area (and, by extension, the Isearch input text)? So far my searching hasn't turned up anything, except that it seems like there isn't a way to ...
6
votes
1answer
690 views

Unset inherited face attribute

Suppose I want the face helm-match to have an unset foreground. Unfortunately, helm-match inherits from match so, if I try to unset the foreground normally: (set-face-foreground 'helm-match nil) The ...
3
votes
1answer
838 views

What's the difference between `set-face-background` and `custom-set-faces`?

I get an error, Invalid face: helm-selection, using dotspacemacs/user-config: (set-face-background 'helm-selection "#EEAD0E") It runs fine if I manually enter it using helm-M-x. However, I get no ...
2
votes
0answers
65 views

Changing background color based on first character on line

How can I change the font background based on the first character on a given line? Take for example: (set-face-attribute 'marker-2 nil :background some_function) where some_function returns "blue" ...