Skip to main content

Questions tagged [text-properties]

is for any text property, such as `face`, that Emacs can associate with text. Emacs moves, copies, or displays the text using the text properties, which are specified as name-value pairs along with the text in a special Lisp structure. Emacs uses a special read and print syntax for text properties.

28 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
80 views

Custom follow mode

I want to make a follow mode where placing the cursor within certain parts of the buffer will cause some action to happen in another window. For example, using helm-follow-mode with helm-occur will ...
nispio's user avatar
  • 8,235
3 votes
0 answers
137 views

Calculate current-column including display properties

I am trying to calculate the width of text within either a buffer or a string after it has been displayed, i.e. after taking into account the width of any display properties, such as embedded images, ...
Basil's user avatar
  • 12.4k
3 votes
0 answers
127 views

How would one fake kerning adjustments in propertized text?

I've successfully managed adjusting the displayed size of spaces and raising/lowering propertized text by making use of the display property, however I cannot find anything that would allow me to fake ...
wasamasa's user avatar
  • 22.2k
2 votes
0 answers
21 views

Fields: how to avoid field-end-position to overlap with next field?

I have a text in the beginning of buffer 901 fifth avenue The word 901 is defined as field "house" and fifth (including space) as field "street". So the text with fields is ...
Ott Toomet's user avatar
2 votes
0 answers
117 views

isearch with invisible text properties, not overlays?

Q: how can I get isearch to understand invisible text properties, not just overlays? I'm writing a major mode that uses text properties rather than overlays to toggle visibility. I'd like to use ...
Dan's user avatar
  • 33k
2 votes
0 answers
36 views

Why does setting the 'face property trigger fontification?

I'm trying to write a major mode for a programming language with JSX based syntax. Here's a minimal implementation. (defun example-forward-parse-jsx (start-pos limit) "Move point past the JSX ...
Wilfred Hughes's user avatar
2 votes
0 answers
219 views

Make text Invisible with font-lock-keywords

I'm interested in changing my org-mode buffers to have a better looking logbook. My ideal state to end up in is that text that looks like this: - State "WAITING" from "WAITING" [2018-11-16 Fri ...
Matt Hamrick's user avatar
2 votes
0 answers
121 views

scrolling text in the mode-line

Since the mode-line space is precious, I'd like to display some information in a fixed size area (60 char for example). To do so, I'd like the text to scroll, like when music players display music ...
boehm_s's user avatar
  • 193
1 vote
0 answers
131 views

How to keep existing text-property decoration while using font-lock?

I tried to use text-property to decorate specific texts as well as automatically color tab characters in a text-mode buffer, but didn't find a way to realize them at the same time. This is my try: ...
yos's user avatar
  • 11
1 vote
1 answer
70 views

Searching for text fragments by character text properties

The text to be processed has special words marked with a special font. The required text is copied to the clipboard with the mouse (from firefox). The text is pasted into the clipboard emacs("...
uanr81's user avatar
  • 169
1 vote
0 answers
157 views

Problem with font in markdown-mode table

I am using variable-pitch for markdown-mode. Tables use fixed-pitch (markdown-table-face). The table aligns for regular text. It breaks alignment for links. The spaces are also underlined. ...
quasi's user avatar
  • 11
1 vote
0 answers
95 views

Is it possible to add visual padding around a character?

Is it possible to add visual padding around a variable width character (generally too, I suppose)? I've looked into using propertize and buffer-display-table to accomplish this, but every solution ...
theia-jane's user avatar
1 vote
0 answers
236 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
  • 537
1 vote
0 answers
375 views

Display done org-habit habits in a different face

I'm experimenting with org-habit and currently have org-habit-show-all-today set to t so I can see a habit even when I've done it for that day. I'm doing that because I want to get the little reward ...
Croad Langshan's user avatar
1 vote
0 answers
49 views

Get repeating value for org entry

I want to use the repeat-duration of tasks in the org-agenda-cmp-user-defined value of my custom agenda view. For example, let's say I have the following task. * TODO Reticulate Splines SCHEDULED: &...
Matthew Piziak's user avatar
1 vote
0 answers
336 views

Setting margins in `text-mode`

I use text files for most of my work. But for printing them on letterhead, I need to set margins to say 3 cm for upper margin and 2.5 cm for lower. Is there any way I can define them in text-mode. ...
Vaibhav's user avatar
  • 583
1 vote
0 answers
438 views

Org agenda using default face for some things (not caused by font-lock)

Org agenda is using the default face for some items, preventing customization. I've seen Org Agenda faces do not appear after applying themes, but font-lock is not enabled for my agenda buffer (the ...
Tom's user avatar
  • 111
1 vote
0 answers
60 views

How do I insert read-only, HTTP-style headers with editable values?

I'm creating a 'form' of sorts in a buffer that has a few required arguments: Title: Labels: content content content When the form is presented, I'd like to be able to edit any and all text after ...
Sean Allred's user avatar
  • 6,921
1 vote
0 answers
54 views

Displaying adjacent boxed text (Zero-length/invisible delimiters for text properties?)

I'm interested in displaying adjacent boxed text using the :box t face property in the following manner for adjacent text: Is there an accepted convention for delimiting/isolating text properties ...
ebpa's user avatar
  • 7,479
0 votes
0 answers
36 views

Is there a way to hide link prefixes in org-mode?

For some link types it would be nice to hide the link prefix automatically. This post does this with text properties, but I'd prefer if it was possible to do with something like prettify-symbols or ...
user41177's user avatar
  • 121
0 votes
0 answers
810 views

Different ways to set org-roam-node-display-template

I would like to understand what the differences is between this two variants about setting the value of org-roam-node-display-template. From here: (setq org-roam-node-display-template "${title:*} ...
buhtz's user avatar
  • 729
0 votes
0 answers
24 views

How to change the face of only a text segment in org-agenda?

I am trying to do this on my org-agenda. In the example below, I want that the text [MY PROJECT] has a distinct face (nano-strong, for example) than the next line NEXT My next task. If I have a ...
Maikol Solís's user avatar
0 votes
0 answers
34 views

Why text properties are overridden in this context?

I'm trying to understand why text properties are overridden when creating a list inside a function. I'm wondering if it is expected or a bug. For example, if I create a list of fruits like this, each ...
Kafey's user avatar
  • 1
0 votes
0 answers
24 views

Bug? Can get point into the middle of a run of characters with a replacing display spec

I'm implementing a minor mode that "folds" certain strings. It does this by adding a font-lock keywords rule to the buffer, that applies display properties that make it look like it's a ...
zwol's user avatar
  • 272
0 votes
0 answers
192 views

Text properties overriden in org-agenda header

I do load a sexp entry - as a diary- from one of my agenda files which calls a custom function. Everything works fine except that the propertized text using utf glyphs is overriden in the agenda view ...
Muihlinn's user avatar
  • 2,624
0 votes
0 answers
33 views

Is it a bug that isearch goes into text replaced with a display property?

The manual says: Some kinds of display specifications specify something to display instead of the text that has the property. These are called replacing display specifications. Emacs does not ...
Tom's user avatar
  • 1,260
0 votes
0 answers
380 views

Change the background color with region text as color code

I have many color variables defined in my css - LESS file, whose background color i like to highlight on text selection and running this elisp block. (add-text-properties (region-beginning) (region-...
Saravana's user avatar
  • 2,071
0 votes
0 answers
48 views

Is this possible to prettify \(A_i\) to A_i (A<sub>i</sub>) in org-mode?

I would like to prettify \(A_i\) to Ai. Is this possible? I looked up the source of org-match-substring-regexp and tried to modify it, but no luck. any help?
Leu_Grady's user avatar
  • 2,460