Questions tagged [emacs-faces]

A face in GNU Emacs is a text style.

A face can have various attributes, such as foreground and background colors, font, height, and weight. Faces are applied as text properties to characters in a string or buffer, or as overlay properties to buffer positions. Face attribute values can be inherited from one or more faces by another face.

96 questions
355
votes
17 answers

How to set the font size in Emacs?

I also want to save the font size in my .emacs file.
Juba
  • 4,105
  • 3
  • 23
  • 19
98
votes
6 answers

Get font face under cursor in Emacs

I've been developing my own custom color theme, and it'd be really useful if I could get a list of font-faces affecting the text under the cursor. Something like Textmate's show current scope command. That would save me the trouble of doing M-x…
thedz
  • 5,284
  • 2
  • 22
  • 28
36
votes
5 answers

Set Emacs defaut font face per-buffer/mode

How do you change the default face which Emacs uses to style text on a per-mode basis? For example, say that I am already happy with the face customizations that I have, which include a default fixed-width font. However, in one particular mode…
emax
24
votes
3 answers

what is custom-set-variables and faces in my .emacs?

this is in my .emacs can I mess with it or not? (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If…
rabidmachine9
  • 7,199
  • 10
  • 43
  • 58
20
votes
1 answer

In Emacs, how do I display a message in the minibuffer with font face properties?

I want to display a colored string of text in the minibuffer, but when I use the 'message' function, the text-properties of are stripped.
Aemon Cannon
  • 390
  • 2
  • 7
18
votes
2 answers

How do I stop npm's colored output from looking ugly in Emacs term-mode?

When using npm in M-x term, it generate color message like this (even with -q) : Information from what-cursor-position There are text properties here: font-lock-face (:foreground "red3" :background "black" :inverse-video nil) fontified …
Rangi Lin
  • 8,822
  • 4
  • 41
  • 69
13
votes
5 answers

Can't change cursor color in emacsclient

If I run emacs --daemon (in .xinitrc or later) and then emacsclient -c, newly created frame has black cursor color, regardless on colortheme or any other settings. More exactly, before I type anything, the cursor color is white (or other color), but…
modular
  • 1,051
  • 7
  • 22
12
votes
1 answer

In C/C++ mode in Emacs, change face of code in #if 0...#endif block to comment face

I'm trying to add functionality found in some other code editors to my Emacs configuration, whereby C/C++ code within #if 0...#endif blocks is automatically set to the comment face/font. Based on my testing, cpp-highlight-mode does something like…
pogopop77
  • 123
  • 8
12
votes
3 answers

Adjusting term faces in the new Emacs 24.3

How can I adjust the term face in the new Emacs to get the same control that was possible with ansi-term-color-vector? One of the new features in Emacs 24.3 seems to be that it revamps the mechanism to control the face of term buffers, i.e.: The…
Amelio Vazquez-Reina
  • 74,000
  • 116
  • 321
  • 514
10
votes
2 answers

emacsclient unable to load color "unspecified-bg"

I'm getting the error Unable to load color "unspecified-bg" [16 times] when using emacsclient -c. I've started up emacs using emacs --daemon. This seems to mean that my custom faces won't load. When starting emacs as usual, and then using M-x…
heuristicus
  • 1,090
  • 12
  • 31
9
votes
1 answer

Org-mode strike-through color

Strike-through texts (like this: +text+) in Org-mode are black by default. I want to make them gray. The problem is, I can't find the place to customize it. I've tried M=x describe-face, and the result is "default face", which is puzzling. Doesn't…
Betty
  • 362
  • 6
  • 15
8
votes
1 answer

Emacs font lock mode: provide a custom color instead of a face

On this page discussing font lock mode, an example is provided which highlights a custom pattern: (add-hook 'c-mode-hook (lambda () (font-lock-add-keywords nil '(("\\<\\(FIXME\\):" 1 font-lock-warning-face…
Alan Turing
  • 11,403
  • 14
  • 66
  • 114
8
votes
3 answers

Emacs: very slow scrolling with font-lock/syntax coloring

I'm trying to switch to Emacs from Vim for a few months and faced the strange problem: when font-lock is on, scrolling in emacs becomes very slow. Example of relevant part of config: (require 'vimpulse) (require 'font-lock) (require…
voidlizard
  • 795
  • 4
  • 10
8
votes
2 answers

How to refresh font setting without restart Emacs?

Problem solved I decided to use a scale customized font named Ricty. It was a easier way. -- I'm setting Emacs font size by using face-font-rescale-alist like followings. (create-fontset-from-ascii-font "Inconsolata-12:weight=normal:slant=normal"…
ironsand
  • 11,985
  • 16
  • 58
  • 145
8
votes
2 answers

How to set a buffer locally face attribute for a particular buffer?

I want to change the face attribute in Org-Agenda buffer only. So I need to change Org-Agenda face attribute buffer locally. Here is my code: (which is globally) (defun my-org-agenda-hl-line () (hl-line-mode) (set-face-attribute 'hl-line nil …
stardiviner
  • 870
  • 19
  • 29
1
2 3 4 5 6 7