All Questions
Tagged with overlays text-properties
13 questions
5
votes
1
answer
254
views
How can I detect when emacs is dictation safe?
Longer version of question: how can I efficiently detect and indicate when emacs is dictation safe?
By "dictation safe", I really mean "when can type random printable ASCII characters ...
1
vote
1
answer
41
views
add overlay to org mode entry headline that still shows when subtree is collapsed
I have an org mode entry/heading and want to add an overlay that appends some text to it (the text comes from the entry properties, but that's not necessary for this question). I'd like the overlay to ...
2
votes
1
answer
143
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 ...
1
vote
1
answer
101
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 ...
1
vote
0
answers
260
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 ...
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
4
votes
1
answer
807
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 "." '...
2
votes
2
answers
106
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 ...
13
votes
5
answers
629
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'...
2
votes
1
answer
337
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
2
answers
975
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 ...
28
votes
2
answers
5k
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
2
answers
1k
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 ...