Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [overlays]

an Emacs presentation feature that alters the appearance of a buffer’s text on the screen, without changing the buffer content

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

How can I make occur work only on visible text (e.g. org outline)?

Is there a way to do an M-x occur on only visible text, similar to how you can make isearch skip folded content with setq-local search-invisible nil? That way we could occur on for example headings of ...
unhammer's user avatar
  • 1,159
2 votes
1 answer
74 views

remove overlay "if any character within the overlay is changed"

I have this example function: (defun enumerate-foo () (interactive) (save-excursion (let ((counter 0)) (goto-char (point-min)) (while (search-forward-regexp "\\<foo\\>&...
Gabriele's user avatar
  • 1,618
0 votes
1 answer
36 views

Cannot get rid of isearch overlays

The following code (defun nordlow/isearch-previous-symbol-at-point () (interactive) (cond ((eq last-command 'nordlow/isearch-previous-symbol-at-point) (isearch-repeat-backward)) ;avoid ...
Nordlöw's user avatar
  • 507
2 votes
0 answers
74 views

Delete Text by Fading It

I once saw a feature in Vim where, when I delete the text to the left of the cursor, the text is indeed deleted. However, a faint impression of the text remains in its original place, as shown in the ...
shynur's user avatar
  • 5,318
0 votes
0 answers
36 views

Image overlay: how to write code scaling overlay images along with the text?

See the code in my other question which places an image overlay above a special character: The problem with this code is that the images don't get scaled along with the text: How to write code ...
Claudio's user avatar
  • 475
0 votes
1 answer
108 views

Image overlay: what does `defimage` do and how to make it work as expected?

After solving the problem with appropriate height of placement of the as overlay inserted image ( see here "Image overlay: how to change the relative image insert position within the buffer text?&...
Claudio's user avatar
  • 475
0 votes
1 answer
78 views

Image overlay: how to change the relative image insert position within the buffer text?

I have just managed to create an overlay being a small image (the Emacs logo) which purpose is to be shown instead of a special single character in the buffer text: I would like to place this image ...
Claudio's user avatar
  • 475
2 votes
0 answers
105 views

overlay makes text unreadable -- where does it come from? Overlay face is "undefined face"

There is an overlay making parts of stack traces in my inferior python buffers very difficult to read: I would like to change the coloring of the yellow part of line 42. If I run M-x describe-char ...
Timothy W. Hilton's user avatar
1 vote
0 answers
59 views

Is there any way (built-in or not) to display a sub-tree as a top level tree when narrowed?

When I narrow to a subheading in emacs, I would love for it to be displayed as if it was the top level as opposed to it staying the level it actually is. For example consider this tree * Heading 1 ** ...
wychwitch's user avatar
0 votes
2 answers
35 views

Make mouse-3 behave like mouse-1 (mouse-set-point) only for overlays

I defined this keymap: (defvar my-custom-keymap (let ((map (make-sparse-keymap))) (define-key map [mouse-1] #'my-function1) (define-key map [mouse-3] #'my-function2) map) "Custom ...
Gabriele's user avatar
  • 1,618
2 votes
1 answer
133 views

Is there a way to add display annotation to the buffer text so that it's searchable?

Suppose I have a text data file with various data values which the computer can parse easily, but it's not easy to read for a human. In order to make the file easier to read I'd add display only ...
Tom's user avatar
  • 1,260
0 votes
0 answers
79 views

change font style in Latexpreview in org mode

The latexpreview image is very poor. I increased the font size but it is still not good. I want to make the writings in the image bold or use a better font. How can I do that?
user36390's user avatar
2 votes
0 answers
139 views

GUI emacs: What Face Defines Overlay for Truncated Lines in Margin?

I am currently using the emacs GUI. I have a custom theme defined for a particular buffer, but when the text runs over the line, an overlay takes over (presumably handling truncation) in the margins. ...
strange's user avatar
  • 81
0 votes
1 answer
72 views

org-fill-paragraph doesn't comply with org-list-allow-alphabetical

Given that (setq org-list-allow-alphabetical t). Consider the following example, where | stands for the point: 1. |Lorem Ipsum 1. Lorem Ipsum 1. |Lorem Ipsum a. Lorem Ipsum While org-fill-...
Firmin Martin's user avatar
1 vote
0 answers
143 views

Why can't I create a full-width overlay and display in the margins at the same time?

I want to create an overlay (or, to avoid X-Y problems, a multicolored, multilayered, visually distinct line at an arbitrary position that cannot be removed, like a page-break) that spans the entire &...
tefkah's user avatar
  • 111
2 votes
1 answer
117 views

How to insert overlay every n visual/screen lines?

I want to insert an overlay at the beginning of every 40th or so visual/screen, to generate a WYSIWYG looking page-break overlay like so: At the moment this is done by font-locking the line-feed ...
tefkah's user avatar
  • 111
2 votes
1 answer
162 views

How do I order overlays?

I have two overlays that are initially in the same position. (defvar-local minibuffer-overlay nil) (defvar-local minibuffer-overlay2 nil) (defun minibuffer-advice (fn &rest args) (minibuffer-...
Plow's user avatar
  • 21
3 votes
1 answer
226 views

Overlay extending to the end of physical line

I'm trying to use overlay to highlight a whole line but for some reason my overlay stops at the end of the line (past the last character) instead of the end of the physical line (just before fringe). ...
Nicolas Rougier's user avatar
0 votes
0 answers
93 views

Pulse text inserted, changed or removed when undoing and redoing

I heard about pulse.el recently on r/emacs and thought of using it to highlight the chunks of text inserted, removed or changed on undoing and redoing edits, just like evil-goggles used to do: There'...
Arch Stanton's user avatar
  • 1,667
2 votes
1 answer
73 views

Overlay category set properties

From the Elisp manual: If an overlay has a category property, we call it the category of the overlay. It should be a symbol. The properties of the symbol serve as defaults for the properties of the ...
Sergey's user avatar
  • 259
2 votes
2 answers
196 views

Background color of matching parentheses overlays the region background color

I have set lime as a background color for my region, and I also have enabled to highlight matching parens using (show-paren-mode 1). The issue I have is that when I exactly select the contents ...
BMBM's user avatar
  • 361
0 votes
0 answers
72 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 ...
skyfire's user avatar
  • 107
1 vote
1 answer
88 views

List of hooks inhibited by inhibit-modification-hooks

The documentation of inhibit-modification-hooks states Non-nil means don't run any of the hooks that respond to buffer changes. This affects before-change-functions and after-change-functions, as ...
Tohiko's user avatar
  • 1,649
0 votes
0 answers
134 views

Are there different tooltip mechanisms?

I experience some weird behavior with tooltips: (progn (let* ((start (point)) (end (progn (insert "test") (point))) (ov (make-overlay start end))) (overlay-put ov 'help-echo ...
Andreas Matthias's user avatar
1 vote
1 answer
78 views

Overlay special properties

How can I configure overlay text to be read-only? I know there is a text property read-only, but that's not exactly what I want to use.
dev1223's user avatar
  • 241
1 vote
0 answers
241 views

keymap (overlay / text property): how to create and modify?

I'd like to have certain keymap active when the cursor is in a particular highlighted area. For instance, I would like to bind hl-todo-next to some easy key combination, but only when the cursor is on ...
9000's user avatar
  • 547
3 votes
2 answers
253 views

Move point inside of image overlay

I'm trying to create a realtime/WYSIWYG editor for LaTeX fragments -- the general idea is that at each move of point / edit of the fragment, the overlay should update to reflect the newly changed ...
Cardano's user avatar
  • 163
3 votes
0 answers
329 views

Can I get emacs to display a grid?

The question is if there's anything like a "background display mode" or maybe a package that once installed would allow a background grid to be displayed in the editor window. The Eclipse IDE for e.g. ...
Cris6556's user avatar
2 votes
2 answers
569 views

How to make an invisible overlay displaying other text clickable

I've been trying to add the ability to unfold with mouse by clicking on ellipsis in my json-mode, but after considerable time spent experimenting and looking through the Elisp manual, I can't figure ...
user avatar
0 votes
0 answers
175 views

Increase minubuffer font size for quail mode completion

I am trying to increase the font size of the text overlay displayed in the minibuffer when using quail completion without success so far. Does anyone have any idea how to achieve this? EDIT: I was ...
Navidot's user avatar
  • 772
1 vote
1 answer
198 views

Make highlight-changes-mode untrack specific changes

I recently discovered highlight-changes-mode and I added it to my proofs-typesetting setup (LaTeX). I usually make some temporary changes to my buffer that I like not to be tracked (highlighted) when ...
Gabriele's user avatar
  • 1,618
2 votes
1 answer
231 views

how to fix an overlay at end-of-line highlighting too much?

I have added the following definitions to my initialization file in order to make the mark show up as a red highlight: (defface mmv-face '((t :inherit default :background "red")) "...
Teemu Leisti's user avatar
5 votes
0 answers
119 views

Copy buffer content verbatim

Emacs uses overlays / prettify-symbols-mode / etc which modify how data is displayed to user. I like to copy visible content as I see it. For example I aligned columns in CSV file with M-x csv-align-...
gavenkoa's user avatar
  • 3,452
2 votes
0 answers
215 views

How can I make hl-line mode not override the color of rainbow-mode? [duplicate]

Is there an non-intrusive way to do this? I've made a fork of rainbow-mode that uses overlay instead of text properties, which solves this :) https://github.com/amosbird/rainbow-mode
Amos's user avatar
  • 466
4 votes
1 answer
775 views

How can I eliminate the side effect of left margin?

I've set a left margin like this: (set-window-margins (get-buffer-window) 20 0) (let ((gutter-sep (concat (make-string (- (car (window-margins (get-buffer-window))) 2) ? ) "+"))) (propertize "." '...
Amos's user avatar
  • 466
1 vote
0 answers
82 views

How do you create a custom undo?

I have a package that creates overlays as annotations. Part of the functionality is to delete annotations too. It turns out neither of these seems to be undoable. I.e. if you add an overlay to text, ...
John Kitchin's user avatar
  • 11.9k
0 votes
1 answer
114 views

Redirect compilation mode hyperlink to external tool

I have a working compilation error matcher, that contains the path to a file. The compilation buffer correctly adds a hyperlink to that file and I can open it in emacs. However, the file in question ...
theldoria's user avatar
  • 1,845
2 votes
1 answer
83 views

Modifying the insertion type of overlay markers after creation

On creation of an overlay it's possible to specify the "insertion type" / advance behavior of the beginning and end markers: (make-overlay BEG END &optional BUFFER FRONT-ADVANCE REAR-ADVANCE) ...
ebpa's user avatar
  • 7,499
2 votes
0 answers
239 views

Equivalent of add-face-text-property for overlays?

add-face-text-property is very convenient for adjusting the face of text based on text properties (Changing Text Properties). Q: Is there an existing equivalent to add-face-text-property to add face ...
ebpa's user avatar
  • 7,499
10 votes
2 answers
982 views

How to display overlay like this screencast?

How to make an overlay in Emacs like the following (maybe it's not overlay, I don't know, it's from company-coq inline-docs):
stardiviner's user avatar
  • 1,938
5 votes
1 answer
852 views

display eldoc help info behind point

I have the following code to replace default eldoc display function: (defun my-eldoc-display-message-momentary (format-string &rest args) "Display eldoc message near point." (when format-...
stardiviner's user avatar
  • 1,938
0 votes
1 answer
52 views

Create term buffer duplicate with coloring preserved

I want to write function that will create new empty buffer, populates it with current term buffer contents, preserving point and window-start positions, and switch to it right away. Basically I want ...
sandric's user avatar
  • 1,271
2 votes
0 answers
402 views

How can I stop an overlay from inheriting the properties of underlying text?

I'm using an overlay to display additional information next to Dired candidates, because modifying the Dired buffer directly prevents Dired from working properly. I'm displaying the text using a ...
JCC's user avatar
  • 1,029
0 votes
1 answer
305 views

Eval-buffer works, init does not hl-line fix

I have written the following bit of emacs lisp that allows hl-line to extend past end of buffer to the rest of the line. Problem is, this only works if I use (eval-buffer) after start-up and not when ...
skyfire's user avatar
  • 107
2 votes
2 answers
105 views

How do I get the closest property change before a given point?

How can I get the previous-or-equal single property change for a given property? For example, assume AAA, BBB, and CCC below have different faces. AAABBBCCC Here is the return value that I would ...
Clément's user avatar
  • 3,995
7 votes
1 answer
670 views

Line highlighting canceling out syntax highlighting

I use hl-line-mode and I really like the built-in misterioso theme. However, the way that lines are highlighted with this theme cancels out syntax highlighting or any other properties of the ...
elethan's user avatar
  • 4,825
2 votes
1 answer
286 views

Highlighting selected region in same buffer, displayed in multiple windows

Q:  I am seeking a proposed modification of simple.el at lines 5251 to 5308 of the master branch relating to highlighting a selected region to achieve a better visual representation when the same ...
lawlist's user avatar
  • 19.2k
2 votes
2 answers
478 views

face vs overlays, can face ever win?

Some of my modes use overlays for contextual information. However, I have a face that I'd like to always be shown despite any overlays on top of it. Is there any way to have such a "super face"?
fommil's user avatar
  • 1,800
1 vote
1 answer
197 views

Overlay into empty line truncates line, workarounds?

I am using the ov library to display overlays. If I try to insert an overlay into an empty line, it truncates the line. See the pictures below to understand the problem, and use the code to ...
24HrRevengeTherapist's user avatar
3 votes
1 answer
115 views

Change overlaid text of an outline header?

Q: how do I add a new outline header regexp but change the overlaid text? I often write presentations with Beamer in LaTeX. As such, there are a lot of frame (ie, "slide") environments: \begin{...
Dan's user avatar
  • 33.1k