8 votes

How to display overlay like this screencast?

Indeed it does accomplish that behavior using overlays. Specifically- it uses the 'after-string property to show the documentation (see: Overlay Properties). If you examine the function company-coq--...
ebpa's user avatar
  • 7,389
5 votes
Accepted

Line highlighting canceling out syntax highlighting

Basically, the hl-line face is defining a :foreground property, which is overriding the other foreground colors in your theme. misterioso defines hl-line in terms of highlight using inheritance, and ...
PythonNut's user avatar
  • 10.3k
4 votes
Accepted

display eldoc help info behind point

As with the comment, pos-tip-show works fine for me too. I did hack together a better (but not perfect) version of the momentary-string-display version. I just rewrote the display function so that it ...
justbur's user avatar
  • 1,510
3 votes

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

Something like this should work: (defun last-prop-change (prop &optional limit) (let ((pos+1 (min (1+ (point)) (point-max)))) (previous-single-char-property-change pos+1 prop nil limit))) ...
nispio's user avatar
  • 8,205
3 votes
Accepted

Move point inside of image overlay

I believe you are looking for the variable disable-point-adjustment. You will want to read its docstring to better understand how you want to use it (i.e. you'll have to reset it every time point &...
Stefan's user avatar
  • 26.3k
3 votes
Accepted

Highlighting selected region in same buffer, displayed in multiple windows

Not sure what the question is. Are you asking for code that gives you the behavior you want? Are you asking that Emacs Dev change simple.el so that it behaves as you want? At any rate, this is the ...
Drew's user avatar
  • 76.4k
2 votes
Accepted

face vs overlays, can face ever win?

If you want a whitespace warning face to win, then use an overlay for that face, and give it a higher priority value than the overlay you want to shadow. You can use library Highlight to do this. It ...
Drew's user avatar
  • 76.4k
2 votes
Accepted

Overlay into empty line truncates line, workarounds?

The question has nothing to do with spacemacs, so the reference to that library/configuration should be removed from the question so as not to confuse other forum participants. The original poster ...
lawlist's user avatar
  • 19k
2 votes
Accepted

Create term buffer duplicate with coloring preserved

(defun sandric/duplicate-current-term-buffer () (interactive) (let ((duplicate-buffer (get-buffer-create "NEWBUF")) (term-point (point)) (term-window-start (window-start)) (...
icarus's user avatar
  • 1,904
2 votes
Accepted

Modifying the insertion type of overlay markers after creation

It would be safe to let the user change the insertion type of the start/end position of an overlay. It just hasn't been needed until now. I guess those people who have needed such a thing haven't ...
Stefan's user avatar
  • 26.3k
2 votes
Accepted

Background color of matching parentheses overlays the region background color

Try adjusting downward the value for show-paren-priority -- "[p]riority of paren highlighting overlays" -- which has a default value of 1000. The priority for the active region is '(nil . 100), which ...
lawlist's user avatar
  • 19k
2 votes
Accepted

Overlay extending to the end of physical line

Starting in emacs-27 you can specify the :extend t attribute when creating the face, and the background will then extend to the right edge of the Emacs window.
rpluim's user avatar
  • 4,850
2 votes
Accepted

Overlay category set properties

Use put to set a property of a symbol. Use get to retrieve one property and symbol-plist to retrieve them all. The properties of a symbol are an attribute of it, parallel to its value as a variable (...
Gilles 'SO- stop being evil''s user avatar
1 vote

Background color of matching parentheses overlays the region background color

It seems likely that your face show-paren-match has :background set to a dark grey color. Try running this: (set-face-attribute 'show-paren-match nil :background nil)
Anonymous's user avatar
1 vote
Accepted

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

EDIT In response to the comments It appears that modification-hooks do not get triggered when text is inserted in front of the overlay. For that there exists insert-in-front-hooks. The code block in ...
dalanicolai's user avatar
  • 6,633
1 vote

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

Yes, have function2 call mouse-set-point before calling thing-at-point.
db48x's user avatar
  • 16.8k
1 vote

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

If I understand correctly (based on your comment to this answer), you want to search within some text that has a given overlay property (before-string) with a particular value. That is, you want ...
Drew's user avatar
  • 76.4k
1 vote
Accepted

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

As @NickD pointed out and per the documentation: This variable needs to be set before org.el is loaded. If you need to make a change while Emacs is running, use the customize interface or run the ...
Firmin Martin's user avatar
1 vote
Accepted

How to insert overlay every n visual/screen lines?

I've figured it out! You can use save-excursion to get the position of the n-th visual line (defun get-visual-line-start (n) "Get the character position of the 'nth' visual line, serving as the ...
tefkah's user avatar
  • 111
1 vote
Accepted

List of hooks inhibited by inhibit-modification-hooks

An overlay can have property modification-hooks, which specifies particular hooks. Buffer text or a string can have text property modification-hooks, which is similar but slightly different. See the ...
Drew's user avatar
  • 76.4k
1 vote

Overlay special properties

There is no predefined overlay property read-only. You can probably get the behavior you want by using property keymap or local-keymap. You can use a keymap value that binds all normally self-...
Drew's user avatar
  • 76.4k
1 vote
Accepted

How to display overlay like this screencast?

(defvar inline-docs-overlay nil) (defgroup inline-docs nil "Show inline contextual docs in Emacs." :group 'docs) (defcustom inline-docs-border-symbol ?― "Specify symbol for ...
stardiviner's user avatar
  • 1,888
1 vote
Accepted

How to make an invisible overlay displaying other text clickable

On the one hand you set the invisible property to t on the other hand you set the display property to json-mode-fold-ellipsis. That combination does not make much sense. Use only one of those. If you ...
Tobias's user avatar
  • 32.8k
1 vote

How to make an invisible overlay displaying other text clickable

Your key-binding code is wrong, to start with. This will get you started: use (kbd "<mouse-2>"), not (kbd "mouse-2"). Put (debug) in your lambda to continue debugging. (Do that to start with, ...
Drew's user avatar
  • 76.4k
1 vote
Accepted

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

When a face is placed on a newline (aka "LF") character, Emacs highlights the whole "rest of the line". That's why (in your case when the mark is at EOL, mark-position is just before LF and (1+ mark-...
Stefan's user avatar
  • 26.3k
1 vote
Accepted

How can I eliminate the side effect of left margin?

It looks, to me, like it might be a bug. The hl-line-mode code moves its overlay (using move-overlay) to line-beginning-position, which is at the beginning of the buffer text for the current line (...
Drew's user avatar
  • 76.4k
1 vote
Accepted

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

The problem is coming from: (add-hook 'pre-command-hook #'my-hl-line-after-unhighlight nil t) (add-hook 'post-command-hook #'my-hl-line-after-current-line nil t) The nil t at the end means that you ...
Stefan's user avatar
  • 26.3k
1 vote
Accepted

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

So I'm not sure I understood your question but were you trying to do this? (defun vimish-fold-toggle () "Toggle fold at point." (interactive) (let ((there-is-a-fold-at-point nil)) (dolist (...
npostavs's user avatar
  • 9,083
1 vote

Inserting before an after-string overlay

I have found that setting 'cursor t as an overlay property has no effect when used in conjunction with an 'after-string property. However, it works if the STRING is propertized; e.g., 'after-string (...
lawlist's user avatar
  • 19k

Only top scored, non community-wiki answers of a minimum length are eligible