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
142 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....
9
votes
2answers
2k 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
725 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
77 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
124 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
425 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
1k 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
210 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
218 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
521 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
453 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
143 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
168 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
1k 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
81 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
124 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
874 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
634 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
223 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
271 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 ...
12
votes
2answers
579 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 ...
6
votes
2answers
1k 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
461 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
173 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
1k 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 ...
11
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
251 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
273 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
493 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
586 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
118 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: ...
1
vote
1answer
143 views

Why can't I use a variable when defining the color to draw a box with

I have defined 2 variables as such: (defconst zenburn/bg-1 "#2B2B2B" "Zenburn palette: bg-1.") (defconst me/helm-header-color zenburn/bg-1 "Custom palette: helm headers.") (set-face-attribute 'helm-...
5
votes
1answer
469 views

Why are leading spaces colored before comments in makefile-mode?

In Makefile mode, leading spaces are fontified in makefile-space face (bright pink without customization), when there is no other text on the line. It seems to indicate incomplete lines, and makes ...
1
vote
2answers
337 views

Trying to refactor the code where I customize faces

I'm trying to switch to another Emacs theme, and I noticed I had several hard coded color strings which I used with my previous theme. I'm looking for a way to use :inherit and thus have those hard ...
4
votes
2answers
2k views

How to modify-face for a specific buffer?

I work with a lot of tabular data files and use stripe-buffer.el make them easier to read. But I also work with more than one, so I'd like to make it easier to distinguish among them as well and want ...
0
votes
2answers
558 views

Nice TTY window borders in 24.4

I've seen snippets like this: (set-display-table-slot standard-display-table 'vertical-border (make-glyph-code ?┃)) That claim to make emacs use a prettier window divider character. However, ...
2
votes
1answer
627 views

How to use the highlight-chars.el package?

How can I use the highlight-chars.el package mentioned here (and here's its code) to highlight custom characters? Specifically, I'd like to highlight the unicode directional formatting characters for ...
9
votes
1answer
399 views

Underlining in org-mode links with multiline descriptions?

Q: How can I stop underlining through the left "margin" in links that extend over more than one line? The face org-link inherits from the face link, which has the underline attribute set to t (or at ...
6
votes
2answers
2k views

How can I determine the width of characters on the screen?

Specifically, I'm interested in the width of characters in the default font assuming that the default font is mono-spaced. From reading the documentation, I got the impression that this should give ...
1
vote
1answer
184 views

Different results using color-theme-select versus color-theme-<theme-name>

I am using the color-theme package to manage the colors in Emacs 24.3.1. I used the command color-theme-select to try different color themes until I found one that I liked. In this case I found the ...
7
votes
1answer
200 views

How does AucTeX display superscripts?

latex-mode is has a nice display of superscripts and subscripts. Not only are they reduced in size, but they are respectively raised and lowered a bit relative to the current line. Q: How can I make ...
6
votes
1answer
156 views

How to block highlighting of certain nicks in ERC?

Some people in IRC channels I frequent have elected to use extremely common words for their nicks, including "a" and "me". I use erc-hl-nicks, and was able to block those particular nicks from getting ...
4
votes
2answers
554 views

How to make mode-line text look like a link/button on hover

What face/text/other property should I use to have mode-line text look like a button/link/stuff to click on while I am hovering over it with the cursor? Some examples: different background, 3D-like ...
2
votes
3answers
487 views

Persistent effects on overwriting faces

Using Emacs 24.4 with projectile and helm I am trying to customize some faces of the grep results. ;; Helm face customization (M-x helm-colors) (set-face-underline-p 'helm-selection nil) (set-face-...
3
votes
1answer
594 views

Override syntax highlighting with color of hex code.

From EmacsWiki: Hex Colour, it is explained how to get in-line syntax highlighting of hex code, and other formats of color. For instance with (defvar hexcolour-keywords '(("#[abcdef[:digit:]]\\{6\\}...
10
votes
1answer
1k views

How to customize syntax highlight for just a given mode

I would like to change the syntax highlighting in my lua-mode.el without affecting other major modes. Just as an example, I would like "key words" like if, then, else to be in bold and blue typeface ...
6
votes
5answers
922 views

Highlight \n and %s “inside” strings

Is it possible for Emacs to highlight backslash escape (e.g. \n) and format keyword (e.g. %s) inside string, without messing up current modes' faces? Like this:
5
votes
1answer
290 views

In table-mode, how do I change the face used for cells?

If I make a table (with M-x table-insert), the background color is a dark blue, and the text color is a light grey. I'd like to make the face different, but I'm not sure what face I need to change. ...
6
votes
1answer
616 views

How can I set face for echo-area message

When I print messages using (message (propertize "text" 'face 'some-face)) properties get printed as text: #("text" 0 4 (face some-face)) How can I have faces displayed properly?