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
2
votes
2answers
60 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 ...
2
votes
0answers
75 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. ...
1
vote
2answers
99 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 ...
0
votes
0answers
40 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 ...
0
votes
1answer
69 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 ...
2
votes
1answer
60 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")) "Face used for ...
4
votes
0answers
55 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-...
2
votes
0answers
142 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
3
votes
1answer
297 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 "." '...
1
vote
0answers
39 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, ...
0
votes
1answer
48 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 ...
2
votes
1answer
44 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) ...
1
vote
0answers
64 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 ...
10
votes
2answers
504 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):
5
votes
1answer
408 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-...
0
votes
1answer
43 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 ...
1
vote
0answers
170 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 ...
0
votes
1answer
201 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 ...
2
votes
2answers
72 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 ...
6
votes
1answer
527 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 ...
2
votes
1answer
196 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 ...
2
votes
2answers
196 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"?
1
vote
1answer
105 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 ...
3
votes
1answer
76 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{...
-1
votes
1answer
100 views

How add a condition, to detect if there is no overlay?

Situation I use the package vimish-fold. This package uses overlays, to detect the current state of the fold. I would like to create folds (hence the new function foobar), when there is no fold ...
4
votes
1answer
47 views

Forbid inserting text before and after overlay

Is there any way to forbid insertion of text before and after specific overlay? (I mean on the same line that displays overlay.) Forbid means that either changes cancelled somehow or immediately ...
2
votes
2answers
198 views

Inserting before an after-string overlay

I'm using after-string overlays as in this question to put text on the right hand side of the buffer, like this: (let ((overlay (make-overlay (point-max) (point-max) (current-buffer)))) (overlay-...
4
votes
2answers
73 views

Concatenate multiple 'help-echo strings

I have multiple overlays with 'help-echo strings covering the same region. Can I make Emacs show all these strings in the mouseover tooltip? By default it only shows the one coming from the highest ...
3
votes
1answer
144 views

Display other text centered

I'd like to find all occurrences of == in a buffer and overlay them with Unicode ≡, keeping width of two chars and centered in the space. I know about replacing text visual representation: (put-text-...
1
vote
1answer
137 views

Selecting the cursor type when using an overlay 'cursor property

The documentation for the 'cursor overlay property does not discuss methods for altering the type of cursor that is used when point is on a particular overlay: https://www.gnu.org/software/emacs/...
2
votes
1answer
69 views

Understanding why two apparently different overlay strings are `equal`

I am having trouble understanding why two apparently different overlay strings are equal. The following test results positive -- i.e., t. The colors are different and the :data identification names ...
7
votes
1answer
181 views

Theme background with opacity? Or theme callback?

Two related questions Is it possible to use opacity while theming in emacs? I mean defining theme which - for example - would add 25% of blue to the background color of elements it is applied to. Or ...
2
votes
1answer
168 views

A simple overlay program

My buffer has one line as, i am sitting on an overlay Now when i do, M-x some-function-to-hide, i like to hide the text from display, and show three dots as, ... I am looking forward to have a "...
1
vote
1answer
121 views

How to pick colors using Emacs to generate a 3-element vector

QUESTION:  Can Emacs help a user to pick colors in the form of a 3-element vector, and what does each element of that vector represent? Background: I borrowed certain sections of code from pong.el ...
1
vote
1answer
270 views

Calculating cursor position excluding the overlay after-string

ISSUE:  An overlay after-string at the end of a wrapped line is preventing the function previous-line from moving the cursor directly upwards in a vertical line. QUESTION:  How to modify the ...
0
votes
2answers
128 views

Removing all overlays with duplicate values

My goal is to delete all duplicate overlay values from a list, and then remove every overlay in the buffer with values equal to each remaining element in the list. I am having trouble understanding ...
0
votes
1answer
228 views

overlay and buffer content

I provide web-mode-column-show in web-mode.el to display a column that "connects" the start tag and the end tag. This column may cross empty lines. In that case I use (move-to-column COL t) (see the ...
12
votes
5answers
415 views

Ways to unobtrusively vary text rendering?

I'm writing an emacs extension for use with speech recognition, and I'm looking for help with a particular feature. Some words the speech recognizer (Dragon) recognizes consistently poorly -- it doesn'...
1
vote
1answer
96 views

how to use the STRING parameter in put-image?

I want to temporarily insert an image and a newline in the buffer, all using put-image. That is, I want the buffer to look like this: [IMAGE] \newline I want the newline to be part of the overlay. ...
20
votes
2answers
291 views

Display list of words along bottom of frame?

I'd like to display 3 lists of words on separate lines horizontally along the bottom (although top would work too) of every emacs frame I have open. I've thought of 6 ways to do this, and they all ...
2
votes
1answer
157 views

Simplest way to add-text-properties without overriding existing ones

I need to add a text-property to the entire buffer. However, parts of the buffer might already have that property with a different value. Q: What's the easiest way to apply a text property only to ...
9
votes
2answers
616 views

Temporary text in window location with no text to propertize/overlay?

Q: how do I temporarily show text in a window at screen locations with no text to propertize/overlay? I'm familiar with the basic idea behind text properties and overlays (see also this thread), have ...
23
votes
2answers
2k views

What are overlays for, and how do they differ from text properties?

The manual states: You can use overlays to alter the appearance of a buffer's text on the screen, for the sake of presentation features. From its name, it suggests it can be used to create “...
5
votes
2answers
773 views

How to apply overlay or text properties to text matching a regexp?

I want to transform a text file with many lines : | refXXXXX | here useful text, first sentence, last word. | | refYYYYY | First word, second sentence. | into : here useful ...