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
0
votes
0answers
15 views

Mercury mode colors

I cannot get colors to work in mercury-mode. Mercury is supported under prolog-mode and in the source of prolog-mode there is quite a bit of it defined(eg. see below). ;; Mercury specific ...
0
votes
0answers
14 views

Fontlock markup disappers when visual line is active

I have the following setting in my .emacs.d folder. (defface org-commentary '((t :foreground "tan1")) "Face for commentary text in org mode") (defface org-commentary-delimiter ...
0
votes
0answers
26 views

orgmode change face of headings depending on tag

I am adjusting the face of my current heading based on the tag like this: (defface org-tag-face2 '((nil :foreground "VioletRed3" :background "dark gray")) "org tag face&...
0
votes
0answers
40 views

Misusing small font size as subscript

For typing mathematical formulas in emacs I often run into the problem that certain characters are not available as subscript (or superscript) characters. Since I would like a simple solution without ...
1
vote
1answer
26 views

Replacing text with svg image via font lock

I've made small function to create SVG tags (see below) and I would like to use the image property of faces to replace some keywords. I'm not sure how to do that and if it is possible. For example, ...
0
votes
2answers
36 views

Face setting doesn't work for client sessions

I wanted to change the colours of Anzu's counter, taking the foreground from the Isearch match background and the background from the fringes, like this So I evaluated (face-spec-set 'anzu-mode-line `...
1
vote
0answers
9 views

Interactively customize theme-tied faces

M-x customize-face is great and custom-theme-set-faces is a great function. Can I have these two tied together easily so that I can interactively customize a face that will be tied to the currently ...
0
votes
2answers
33 views

How to get the merged face attributes at point?

The appearance of a given character is determined by faces from various sources and face-remapping-alist. How to determine the properties Emacs ultimately uses after taking all sources into account? ...
1
vote
1answer
22 views

How to add more default face highlight colors

Using (highlight-symbol-at-point) at some point the highlight start repeating colors. I find the variable that holds the default face highlight color values in Emacs is: hi-lock-face-defaults It ...
0
votes
0answers
19 views

changing faces for deadlines in org

Using this code (defcustom org-agenda-deadline-faces '((1.0 . org-warning) (0.5 . org-upcoming-deadline) (0.0 . org-upcoming-distant-deadline)) How do you replace "org-warning" ...
2
votes
0answers
47 views

replacement for `emacs -xrm Xft.embolden:true -fn Hack-13` for emacs 27.1

For last 2 years (2018-) I've been using emacs -xrm Xft.embolden:true -fn Hack-13 to start emacs w/ suitable sized and 'brightness'ed fonts for me in my systems. What that does gives extra boldness to ...
1
vote
2answers
166 views

Colored string in mode line

I have: (setq mode-line-end-spaces "string") That displays string in the mode-line. How can I get string in red there?
1
vote
0answers
17 views

Is it possible to have different color values for a font-lock face in a string?

My font-lock-warning-face has a red color. Which works well in almost all circumstances, it is very pronounced. The problem is, my font-lock-string-face has orange color. So warnings inside strings ...
0
votes
1answer
86 views

Display a horizontal underline on every line

I recently saw this image on r/unixporn. How can I recreate the 'notebook' effect: the broad line-height and underline of each line, but in Emacs (iiuc this is achieved using rxvt + pixmaps in Linux).
0
votes
1answer
64 views

Changing text size doesn't work on all fonts in org-mode

I have the following in my config: ;; set a non programming font for text (when (member "Lucida Sans Unicode" (font-family-list)) (set-face-attribute 'variable-pitch nil :font "...
1
vote
1answer
48 views

How to write a theme from all known faces?

I'd like to write a theme from all known faces (face colors and styles - as one would typically find in a theme). There is a way to write themes customize-create-theme, however it only writes some ...
2
votes
0answers
78 views

How do you set the line height when customizing a font face? (e.g. an org-drawer)

I specifically want my :NOTES: org drawer (and :end:) to be a smaller font size (say 0.5 relative to normal text). Ideally the drawer contents also (say 0.8). However, when I set the height property ...
0
votes
0answers
20 views

AUCTeX highlight contents of comment environment as a comment

I sometimes use comment environment in my LaTeX documents. Is there a way to make AUCTeX display contents of this environment as a comment?
0
votes
0answers
28 views

modify existing overlay

How do I modify an existing overlay, more specifically, in spacemacs I have and the overlays are covering the all the parenthesis. Note that the overlays move depending on what inner set of ...
0
votes
0answers
37 views

emacsclient spending a lot of time resetting faces

When I launch emacsclient or make a new frame it spends ~2s in: - make-frame 312 42% - frame-creation-function ...
1
vote
0answers
31 views

Is it possible to add visual padding around a character?

Is it possible to add visual padding around a variable width character (generally too, I suppose)? I've looked into using propertize and buffer-display-table to accomplish this, but every solution ...
1
vote
1answer
70 views

Is it possible to have different color in between a specific patterns?

I am using \begin{comment} hello world \end{comment} in order to comment out text in AucTex mode. In general I am using different color for comments but when I use \begin{comment} [text] \end{comment}...
0
votes
1answer
44 views

How to use faces to enhance text

I'm writing some very simple code to get data from a web api, i then parse the response and output the result in a buffer. By default this text is very flat, how can i add keyword highlighting that ...
1
vote
1answer
40 views

Connect open and close delimiters with a line

I wonder if emacs has something similar to this VSCode extension (Bracket Pair Colorizer 2) which does the following (screenshot below) which I find is a really helpful UI enhancement [ In the above ...
2
votes
0answers
46 views

org-table: hide grid lines

I like how org-mode allows me to quickly create and edit tables. However, I do not like the table's appearance and I would like to modify it. Customizing the face only lets me change foreground and ...
0
votes
0answers
14 views

Fix line height of special keyword lines (set face for logbook sum)

I would like to make the lines with special keywords less disturbing, so I reduced the height of org-special-keyword. But the lines have a lot of space. This is not the case for the source-lines, ...
2
votes
1answer
24 views

Giving faces compliant names

The description of defface in (info "(elisp) Defining Faces") says that the name of a face should not end in -face. But most faces declared in font-lock.el do use the suffix -face. How does this fit ...
1
vote
1answer
19 views

How can I refer to the system default (Windows) proportional font?

Let's say I want to write a package which uses proportional font. But I don't want to hardcode a specific font, because the user may not have it installed. How can I refer to the system default ...
0
votes
0answers
45 views

Unexpected face for `org-ellipsis`

Loading the following setting in an emacs -q session, and open the org file below, (custom-set-faces '(org-tag ((t (:background "gray95" :weight bold)))) '(org-ellipsis ((t nil)))) test.org #+...
2
votes
0answers
108 views

How to display only leading spaces in whitespace mode

I've been having trouble getting whitespace to visualize properly. Specifically for 'spaces' I'd like to only display leading spaces, but turning on space white space visualization includes all spaces,...
0
votes
1answer
23 views

Default face doesn't specify all attributes?

In the elisp manual, it says the default face must specify all face attributes. However, running #+BEGIN_SRC emacs-lisp :results pp (face-all-attributes 'default) #+END_SRC #+RESULTS: #+...
0
votes
0answers
27 views

applying an underlined font-lock-face style to source code

I'm trying to build an interactive query builder for tree-sitter in Emacs with highlight for matches as underlined text instead of overlays. So far I nailed most of the code to accomplish this, the ...
0
votes
0answers
10 views

Color coding for org-mode structure template breaks at three levels of embedment

As indicated by the title above, the color coding for org-mode structure templates breaks at three levels. Any way to fix this?
1
vote
0answers
43 views

Org-mode list item spacing?

In org-mode, is it possible to increase the spacing between items in a list while keeping the line spacing in paragraphs the same? The closest I have found is to increase the height of org-item-dt, ...
0
votes
1answer
135 views

How do I change the highlight color for selected texts on isearch?

When I search a text on isearch due highlighed color it is not readable. Following line does not have any affect on the main selected word on the isearch: (set-face-attribute 'lazy-highlight nil :...
1
vote
1answer
86 views

Change the color of ivy-current-match depending on the caller

When using ivy, say I want the current match to be red when calling counsel-M-x, but blue when calling counsel-find-file. Is there a simple way of changing ivy-current-match depending on the function ...
0
votes
0answers
41 views

How to make helm matching faces inherit from ivy?

I like Ivy face when matching better than helm for the particular theme I am using. When listing all faces: list-faces-display I see that I want helm matching to be exactly like: ivy-minibuffer-...
0
votes
1answer
20 views

Change font or point colour based on absolute path of the source file

This is a rare occasion when I need it, but I am trying to figure out a way to change colour of font/point based on the path of source file to easily distinguish which file I am editing when I am ...
1
vote
1answer
98 views

How to make highlights persistent?

I don't want themes. I use bold,italics, and highlights. I also use background colors per file, so the code as in for background need to be embedded inside file. But when I Edit->Text Properties-&...
0
votes
0answers
27 views

Force Org-Link to inherit a different face when placed in org-table?

I currently have (variable-pitch-mode +1) set on a hook when I start org-mode. I have customized my org-mode faces such that faces like org-link inherit from my variable-pitch face. This looks great ...
2
votes
1answer
80 views

cannot have a different default for font's height with emacs daemon

Following an article called Emacs, fonts and fontsets I was revising my font setup. I ended with the following code: (defun font-exists-p (font) "Comprueba si una tipografía existe. Sacado de https:...
0
votes
1answer
533 views

How do I change the font color of mode-line?

How do I change the font color of the mode-line to make it more visible?
0
votes
0answers
50 views

Retouching syntax highlight of major mode

I am writing a minor mode to complement haskell-mode, and I am trying to color subwords in camelCased identifiers with slightly different shades of the same color. Perhaps this can be done by "...
2
votes
2answers
95 views

Why in dired+ mode some text is strikethrough?

Windows 10, Emacs 26.1, Dired+ (download from here https://www.emacswiki.org/emacs/download/dired%2b.el) Open some directory: Here result: Why some text is strikethrough?
2
votes
2answers
64 views

image-dired: Change thickness of cursor

On a hires screen I find it really hard to see on which image the cursor currently is, because the rectangle around the image is very thin. Is it possible to increase the line width of that rectangle? ...
2
votes
0answers
67 views

Org-link font size in the heading

I often use org-links in headings, e.g.: *** Heading [[foo]] **** Subheading [[bar]] And I use different font-sizes for different levels. Now, I would like the face of the link to be of the same ...
0
votes
1answer
39 views

Org-mode define face for pandoc citation syntax

I would like to set a new face in org-mode for pandoc citation syntax which looks like this: [@bibtexkey{555-563}] Custom face: (defface pandoc-citation-face '((t :foreground "yellow")) "Face ...
1
vote
1answer
107 views

Improving org-block-begin-line, splitting in several faces

The face org-block-begin-line allows to customize the first line of the following block #+BEGIN_SRC lang :var arg1=1 arg2=2 ... #+END_SRC However, I would like to customize the faces within the line,...
0
votes
2answers
29 views

Documentation for face-attributes-as-vector

I try to find the documentation for the function face-attributes-as-vector or any other function which gives my access to the face definition. Emacs contains just the following information: face-...
1
vote
2answers
50 views

Why is face-attribute interfering with isearch?

Question: Why does face-attribute interfer with isearch filter predicates? The following code is part of my answer to the question about searching for bold text. If I set the variable isearch-face-...

1
2 3 4 5 6