is for changes to fonts and colors for highlighting text. Emacs uses highlighting extensively to set apart portions of visible text in a buffer. Highlighting can also apply to dynamic text during search and replace operations, syntax highlighting in programming modes, and for alerts for errors during debugging.
Questions tagged [highlighting]
182 questions
31
votes
4 answers
How to unhighlight symbol highlighted with highlight-symbol-at-point
highlight-symbol-at-point is really useful however I could not find an easy way to un-highlight symbols.
Currently I have to call unhighlight-regexp repeatedly for each highlighted symbol.
Is there a better way to:
unhighlight all highlighted…

kostya
- 513
- 4
- 6
13
votes
3 answers
Highlight region
How do I highlight a region and it make it remain highlighted when point moves on.
Why would I want that? So I can make important snippets of code stand out when I review it later.

Kian
- 233
- 2
- 6
6
votes
1 answer
Highlight *other* occurrences of symbol
I've found that using the highlight-symbol-mode provided by highlight-symbol works very nicely for highlighting all occurrences of the symbol at point, automatically (without my pressing anything). However, I would like to highlight all other…

Resigned June 2023
- 1,552
- 15
- 20
5
votes
1 answer
temporarily highlighting current line
The minor mode global-hl-line highlights the current line "permanently" (until it is disabled).
Instead, I would prefer a command which highlights the current line for, say, one second.
Has anybody done this?

Antoine
- 205
- 2
- 6
2
votes
1 answer
Highlight words appearing once within a block
I want to highlight every identifier (a sequence of characters matching a certain regexp or, even better, having the default face) appearing once within a block of code (a piece of arbitrary text between two empty lines) for each block in the…

effectfully
- 23
- 6
2
votes
1 answer
How can I restore "hlt-highlight" after reopening a file?
Linux Mint 20.2
Emacs 27.1
package: highlight ver. 20210318.2248
I want to highlight specific region. So here my steps:
1. hlt-choose-default-face
2. Select region
M-x hlt-highlight
And here result.
Nice.
Now I kill the buffer C-x k
And…

a_subscriber
- 4,062
- 1
- 18
- 56
2
votes
2 answers
Highlighting Arbitrary text
I am trying to customize Emacs by adding a feature where I can select a block of text (like the region but not bound by mark and point).
Currently I have implemented this by setting two variables that mark the start and end of the block.
(defvar…

ryan
- 57
- 6
2
votes
1 answer
How can I unhighlight everything highlighted by `highlight-regexp`?
If I do this:
M-x highlight-regexp \cite{\(.+\)}
then pick a color. Later, if want to unhiglight all previous higlights, I have to do them one by one, e.g.
M-x unhighlight-regexp \cite{\(.+\)}
Is there not a command to un-highlight all?
user19777
2
votes
1 answer
Improve my highlighting function
I wanted something that highlighted a snippet of code that I wanted to keep in mind - NOT marking it, I just want it to pop out visually. As a bonus, I'd like it to get pushed to the mark ring so I can navigate back to it easily. highlight.el and…

yafov
- 314
- 1
- 9
2
votes
1 answer
Highlight Multiple Lines in Emacs
I wonder if there is any package which lets me do this:
Hightlight entire line where point is currently located
If you move point away, it keeps the that line highlighted
Multiple lines can be highlighted in similar way
Clear all highlights with…

StupidKris
- 119
- 6
2
votes
1 answer
Same or more powerfull as highlight-symbol?
Windows 10, Emacs 25.
I use package highlight-symbol for highlighting text. It's very useful.
But after 3 years of using it was not enough for me.
Is Emacs has another package with same or more powerfull capabilities?

lmdic
- 123
- 1
- 7
2
votes
1 answer
transient-mark-mode highlighting doesn't work until buffer display is refreshed
I recently upgraded to Emacs 25.1.2, and transient-mark-mode no longer works properly - sometimes.
The behavior I see is that pressing C-spc and moving the cursor to select an area of text doesn't automatically highlight the area. If I move to…

Rajesh J Advani
- 121
- 4
2
votes
1 answer
column-marker skips blank lines; how to fix?
I installed column-marker.el. I like the highlighting style better than fci-mode. Unfortunately, column-marker does not highlight bits of the window where the actual line is not 80 chars or more (or whatever its set to). Can this be fixed, so that…

user3113723
- 181
- 6
1
vote
1 answer
How to give background color to hl-todo-keywords?
I am using following setup in my .emacs file:
(setq hl-todo-keyword-faces
'(("TODO" . "#FF0000")
("FIXME" . "#FF0000")
("DEBUG" . "#A020F0")
("GOTCHA" . "#FF4500")
("STUB" . "#1E90FF")))
Here all those…

alper
- 1,370
- 1
- 13
- 35
1
vote
1 answer
How to highlight a buffer between given pairs of points?
I have a list that looks like this:
(((assoc)
(start (assoc) (line . 430) (col . 28))
(end (assoc) (line . 430) (col . 37)))
((assoc)
(start (assoc) (line . 433) (col . 14))
(end (assoc) (line . 433) (col . 23))))
I'd like to highlight all…

rgrinberg
- 143
- 3