Skip to main content
edited tags
Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
Source Link
lawlist
  • 19.5k
  • 5
  • 42
  • 125

How to remove certain text-properties from a list of properties

text-properties-at returns a list of various text properties.

I want to remove: display (image :type xpm :file /Users/HOME/.0.data/.0.emacs/.0.images/ezimage/box-plus.xpm :scale 1.1070588235294117 :ascent center). The image may change, so I'd like a general approach that targets the display property and any value that may exist in relation thereto.

I thought I was dealing with a plist and I read about remprop, but it strips everything in the entire list -- i.e., it makes the whole list nil.

    (let ((props (text-properties-at 0 OBJECT)))
      (setq props (remprop 'props 'display)))