The simplest way to examine text properties is to ask for the value of
a particular property of a particular character. For that, use
get-text-property
. Use text-properties-at
to get the
entire property list of a character. See section Text Property Search Functions, for
functions to examine the properties of a number of characters at once.
These functions handle both strings and buffers. Keep in mind that positions in a string start from 0, whereas positions in a buffer start from 1.
If there is no prop property strictly speaking, but the character
has a category that is a symbol, then get-text-property
returns
the prop property of that symbol.
get-text-property
, except that it checks
overlays first and then text properties. See section Overlays.
The argument object may be a string, a buffer, or a window. If it is a window, then the buffer displayed in that window is used for text properties and overlays, but only the overlays active for that window are considered. If object is a buffer, then all overlays in that buffer are considered, as well as text properties. If object is a string, only text properties are considered, since strings never have overlays.
nil
, it defaults to the current buffer.
(setq default-text-properties '(foo 69)) ;; Make sure character 1 has no properties of its own. (set-text-properties 1 2 nil) ;; What we get, when we ask, is the default value. (get-text-property 1 'foo) => 69
Go to the first, previous, next, last section, table of contents.