A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg01714.html below:

Re: Reading text properties from a yanked text

Because once again what you pass to text-properties-at is a different string. You are confusing how a string looks on display when inserted into a buffer with another string that just happens to have the same text.
Try this instead:

(with-temp-buffer
  (insert (propertize "Hello" 'face 'bold))
  (kill-region (point-min) (point-max))
  (insert (format "(text-properties-at 0 \"%s\")"
                  (current-kill 0)))
  (text-properties-at 0 (buffer-substring 24 29)))

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4