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
650 views

Monospace font for calendar buffer and tables (in org-mode), proportional font in main buffer for text paragraphs

I like having a proportional font in main buffer for writing plain text paragraphs (e.g. Georgia), but calendar buffer (M-x calendar) in org-mode looks funny (not properly aligned) if the font isn't ...
4
votes
1answer
46 views

How do I tell how many lines of a specific face fit in a window?

I'm making a presentation mode where I want to vertically center some text in the window, which is the only window in the frame. I'm using a custom face so I can control how large the font is. To ...
1
vote
1answer
127 views

Change the color of the wrap around arrow

So I would like to change the color of the arrow that shows the text is being wrapped. Specifically the red arrow shown here: I have tried searching myself and the closest I came is finding out the ...
2
votes
0answers
28 views

“Catch-all” rule for faces in theme definition

I am writing my own custom Emacs theme and I would like to express "if a face isn't explicitly listed above, don't color it". Many modes have their own custom faces (e.g., Tuareg or Erlang mode) and ...
0
votes
1answer
25 views

Apply a background to code with font-lock

I have a command file that uses syntax such as -TAG <ARGS> -TAG- to pass arguments to a sub program. I want to Highlight everything between the opening and closing tags with specific background ...
2
votes
1answer
198 views

How to syntax-colour py.test output?

In compilation-mode (or some similar mode), how can I make the default py.test output be colourized? I'm not talking about clickable links, but about just 'syntax' colouring the various parts of the ...
2
votes
1answer
716 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
67 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
99 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
161 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
146 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
73 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
524 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
868 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
89 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
196 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
343 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
37 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
657 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
550 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
290 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 ...
9
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
200 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
458 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
256 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
188 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 ...
4
votes
1answer
461 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
335 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
816 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
185 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
355 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
371 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
163 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
64 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
207 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
213 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 ...
14
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
275 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
180 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
813 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
99 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
306 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
902 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
379 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 ;; ...