Questions tagged [highlighting]

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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
30 views

How to highlight invisible text when using `visible-mode`?

I sometime use visible-mode to show hidden elements in buffers. For example, I have org-hide-emphasis-markersset to t, but I sometimes want to see them. This works very well with visible-mode, however ...
user avatar
  • 1,775
1 vote
0 answers
32 views

Magit ediff range in a pretty way?

I need to investigate a project, with a patch made by a former student of my university. He made a series of commits on a repo, and I need to see what additions he made. I got the list of files ...
user avatar
0 votes
1 answer
30 views

How can I apply black color for bold text in highlighted region?

I am using dracula-theme. Only change I did is adding following line under (faces ': (faces '(;; default / basic faces (region :background ,dracula-yellow :foreground ,dracula-black :extend t) ...
user avatar
  • 1,102
0 votes
0 answers
13 views

Cycle through show-paren-style and highlight-sexp

I have the following code, rk-bracemk-companion changes the show-paren-style ("parenthesis", "expression", "mixed"), whereas rk-emph-symbolic-expressions enables ...
user avatar
  • 159
1 vote
1 answer
27 views

How to customize the magit-todo display

I use Emacs to write documentation, and a lot of times my files end up with some internal markup that looks like this: [TK: Where is the event handler defined?] in-line with the text. (“TK” is writer ...
user avatar
0 votes
2 answers
56 views

What are those red underline-like characters and how to find them?

I have a simple text file which has contents from the web copied into it and today I found a line where there was something like a red underline character (_) at some location. I guess it shows an ...
user avatar
  • 1,058
0 votes
1 answer
66 views

How can I make `font-latex-sedate-face` have precedence over `font-latex-math-face`?

In LaTeX mode, the face font-latex-sedate-face highlights commands of the form \foo which are not known by AUCTeX. I'd like commands of the form \foo which appear inside a math environment such as \(\...
user avatar
  • 11
0 votes
0 answers
11 views

Highlighting cited text in notmuch messages

When composing a GNU's message, the cited text gets highlighted with different faces depending on the level. This doesn't seem to work in notmuch out-of-the-box. How do I configure this correctly? It ...
user avatar
  • 1,429
0 votes
1 answer
32 views

How to disable momentary highlighting of a match by ggtags?

When I call gtags-find-tag-dwim, matches item will be highlighted for about one second. Like this: Please note that ggtags-highlight-tag has absolutely nothing to do with this highlight, I believe ...
user avatar
2 votes
1 answer
60 views

How to disable momentary highlighting of a match by xref and ggtags?

When I call gtags-find-tag-dwim, matches item will be highlighted for about one second. When I call xref-pop-marker-stack, matches item will be highlighted for about 0.2 second. like this: -----------...
user avatar
2 votes
1 answer
84 views

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 ...
user avatar
0 votes
0 answers
29 views

How to highlight certain symbols only inside math environment?

I'd like to have certain math symbols highlighted. I checked AUCTeX manual but there does not seem to be a built-in way to do that. They are not folded forms or anything, but the real glyphs, which I ...
user avatar
  • 11
1 vote
0 answers
24 views

Conditional Formatting foreground and background when highlighting selected text

This is a follow-up question to: Interchange Foreground and Background Colors when highlighting selected text. How can I do some conditional formatting? For example I do not want inverse-video if the ...
user avatar
1 vote
1 answer
36 views

Interchange Foreground and Background Colors when highlighting selected text

I use something like this to control the background color of my selected text: (region ((t (:background ,green)) (t :inverse-video t))) However some foreground colors don't go well with ...
user avatar
2 votes
1 answer
47 views

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....
user avatar
  • 3,385
1 vote
0 answers
35 views

Can't highlighting only one word exact on the one sentence

Given: Linux Mint 20.2, Emacs 27.2 Q: E.g. "Hello, how are you?" Suppose whole sentence has foreground color = white. And I want to change color (e.g to red) of only word "Hello". ...
user avatar
  • 3,385
1 vote
1 answer
52 views

How to move to the next highlight?

How can I jump to the next beginning of a string highlighted by a command such as highlight-regexp or highlight-lines-matching-regexp?
user avatar
  • 1,392
0 votes
0 answers
52 views

How to clear bookmark highlighting

A few months back my Emacs started to highlight bookmarks. I build and run from master, using the Homebrew emacs-head package. However even after I remove bookmarks, the highlighting remains. I ...
user avatar
5 votes
1 answer
195 views

Highlight rectangle and non-rectangle selection at the same time

By default, Emacs highlights the non-rectangular selection; alternatively, you can use (rectangle-mark-mode) to show the rectangular selection. Instead, I'd like to always show both, by highlighting ...
user avatar
  • 165
0 votes
1 answer
27 views

highlight occurences for thing under point also for substrings

With point over a word, pressing C-u C-s highlights this word and any identical words. How can I make this work for substring search as well, i.e. if highlighting the word house, occurrences of houses ...
user avatar
  • 419
0 votes
1 answer
124 views

Certain keywords show font weight of bold

The syntax highlighting in Emacs is not great so I installed tree-sitter plugin to improve it and configured it like this, ;; Tree sitter (use-package! tree-sitter :config (require 'tree-sitter-...
user avatar
0 votes
1 answer
51 views

How to stop Emacs from highlighting Linux Tab characters?

So I opened a c++ script made in Xubuntu and every tab character was highlighted with grey. That doesn't happen when I open scripts made on Windows. How do I stop Emacs from highlighting them, it's ...
user avatar
  • 3
1 vote
1 answer
70 views

Color settings with helm

I use helm a lot. I have a problem setting colors. In my init.el I have (require 'helm) (require 'helm-config) ;; change active line color (set-face-attribute 'helm-selection nil :...
user avatar
0 votes
1 answer
55 views

Highlight all words in a line

Is there an easy way to highlight all the words in a line with just one command? I'm trying to write an elisp function to achieve this but my knowledge is pretty rudimentary. So far, I can only move ...
user avatar
  • 169
0 votes
1 answer
78 views

Custom search for text under cursor

I would like to write a custom elisp function that searches for a few variants of unicode text under a cursor and highlights their occurrences in the currently open file. For e.g. if my text is ...
user avatar
  • 169
1 vote
1 answer
76 views

How to make Isearch highlight more matches when I scroll?

upon having used Isearch or C-u C-s to highlight a word, when I use then C-v or M-v for scrolling the highlights remain due to setting (setq-default isearch-allow-scroll t lazy-highlight-...
user avatar
  • 419
0 votes
2 answers
64 views

In org-agenda, highlight marked entries

Running Doom Emacs v2.0.9 on Emacs 27.1. I can mark several entries in the agenda buffer and work on all of them together. Is there a way to keep marked entries highlighted? This would give more ...
user avatar
  • 1,668
2 votes
2 answers
223 views

Highlight current line in org-agenda

Running Doom Emacs v2.0.9 on Emacs 27.1. In the agenda buffer, how do I get the current line highlighted? global-hl-line-mode is enabled and the current line in other buffers is highlighted as ...
user avatar
  • 1,668
1 vote
2 answers
353 views

How to show invisible/problematic characters such as TAB and Narrow No-Break Space in an org-mode table?

Is there a way to indicate where you have an "invisible" character that's causing problems in an org-mode table? The character's likely a TAB, but for the general case I'd like to assume it ...
user avatar
  • 77
0 votes
0 answers
55 views

in Fundamental mode, give certain marked text a different face

I am trying to add a new comment character in fundamental mode, but I can't get it to work. Let me rephrase that, because I think it's an xy-problem. What I really would like to have is the ...
user avatar
  • 131
0 votes
1 answer
55 views

Make mark color overlap highlight symbol at point

I use auto-highlight-symbol-mode package to auto highlight symbol on point. I found it annoying when I mark a text because the symbol highlight overlaps on my marked text, so I don't see if I marked ...
user avatar
  • 592
0 votes
1 answer
77 views

Whitespace-mode: highlight hidden indentation of empty lines

I use whitespace-mode, intend with tabs (colored pale yellow, which is what I want) and I am wondering about the situation where there is an empty line inside an indented block (see image below). I ...
user avatar
0 votes
1 answer
59 views

How to prevent highlighting when using ‘xref-pop-marker-stack’

I was using dumb-jump to get back from jump definition's location. I started to get following message: ‘dumb-jump-back’ is an obsolete command (as of 2020-06-26); ‘dumb-jump-back’ has been obsoleted ...
user avatar
  • 1,102
0 votes
1 answer
314 views

Blinking Paren Mode

I'm trying to get Paren Mode to be a little more clear, cause I can hardly see the other matching pair of parenthesis. Is there any way I could make this blinking yellow?;) I'm in gnome-terminal. Here ...
user avatar
5 votes
1 answer
264 views

Why does mousing over one button also highlight adjacent buttons?

I'm using some buttons, and want to arrange them in a row. That is, some will be directly next to each other. I don't want whitespace between them. This is easy enough to do: However, when I do this, ...
user avatar
  • 8,536
1 vote
1 answer
173 views

Highlight parentesis in latex

the image is self explanatory, I recently switched to doom emacs and I'm still learning. How can I fix this problem? I tried to switch off anything related to checkers in the init.el file but it doesn'...
user avatar
  • 11
6 votes
1 answer
97 views

minor mode to display long integers?

I have to deal with long integers frequently, typically 9+ digits, and all of the digits matter (so scientific notation doesn't help me. Is there a minor mode that helps make it easier to visually ...
user avatar
2 votes
0 answers
180 views

How to highlight matching brackets when the cursor is behind or in front of starting or ending brackets?

I am using Emacs: Highlight Brackets ()[]{}. I want to highlight matching brackets when the cursor is behind and front of starting and ending brackets. How can I accomplish this? foo ( "hello&...
user avatar
  • 1,102
0 votes
0 answers
51 views

Is it possible to create a way to toggle showing/hiding/changing text following a pattern? (org-mode or generally)

I'd like to create a way to toggle showing/hiding/changing text following a pattern in org-mode, but if it works generally, that's fine also. A few examples of where this might be useful. Hiding #+...
user avatar
  • 1,463
5 votes
2 answers
411 views

Mysterious highlight in emacs

Recently, I change my laptop from old Thinkpad to newer laptop with much larger touchpad. I've found that I frequently touch the sensitive touchpad while I'm using emacs. And with some mysterious ...
user avatar
  • 295
0 votes
1 answer
886 views

Color calendar day according to number of event in org-agenda

I would like to color the background of each day in calendar according to the number of events in my org-agenda. The idea is to have a quick and visual idea of what are the busiest days. The code from ...
user avatar
4 votes
1 answer
719 views

How do I highlight the current line?

I am obviously not well versed in the world of Emacs so I was watching Casey Muratori's Emacs video and whenever he traversed any file in Emacs, the current line always had a different background ...
user avatar
  • 143
1 vote
1 answer
73 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 ...
user avatar
0 votes
0 answers
57 views

Highlight matching parenthesis, only in Lisp mode (and maybe a few similar modes)

is there a way to have the global minor mode show-paren-mode functionality as a buffer-local minor mode? I love its behavior but only for Lisp. Searching for a package I can see a number of close ...
user avatar
2 votes
0 answers
75 views

Find and display duplicated regions of (org-mode) text across multiple files

What I'm trying to do I'm trying to condense a set of research notes consisting of over 250,000 words across 50+ files. I've converted these from previous file formats (mostly mind maps and OPML ...
user avatar
  • 23
1 vote
2 answers
221 views

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 ...
user avatar
  • 47
0 votes
1 answer
98 views

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{\(.+\)} ...
user avatar
  • 489
0 votes
1 answer
110 views

Expiring search highlights in Evil

I'm using the evil-search module ((evil-select-search-module 'evil-search-module 'evil-search)). When I perform a search, the results remain highlighted until I call evil-ex-nohighlight. I'd prefer ...
user avatar
1 vote
3 answers
290 views

How to check if a region is selected by mouse?

Usually a mouse selected region is highlighted and a region set by (set-mark-command) is not highlighted. But I don't know a programmatic way to check it. Could anyone help?
user avatar
2 votes
1 answer
636 views

Disable lsp-mode symbol highlighting?

When using lsp server, symbol highlighting obscures the highlighting done by region selection. I can toggle this behavior per-buffer with lsp-toggle-symbol-highlight, but cannot permanently disable ...
user avatar