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 allow the user to interactively move point into the middle of buffer text that is replaced in this way.


Yet, if I replace part of a buffer with a string:

(put-text-property start end 'display string)

then cursor movement does not go into the replaced part, but isearch does, though isearch is also an interactive command. Is it a bug in isearch?

  • Could you please add a recipe to show what you mean by Isearch moving the cursor into the display-provided text? (Also, adding that text property does not "replace part of a buffer" - it just affects the appearance, not the buffer text. – Drew Jan 16 '20 at 19:46
  • I quoted the manual page above which has the title " Display Specs That Replace The Text". That is the terminology the manual uses. The recipe is simple just put some 'display string property onto some text (the manual page too has an example) and then try to isearch for the original text. The cursor will disappear, because it will be on the original text which is replaced by the 'display text, though the manual page says interactive commands can't go into text which has this kind of replace text property. – Tom Jan 16 '20 at 20:20
  • So if the manual is correct, isearch should just ignore the original text, like movement commands do. – Tom Jan 16 '20 at 20:28
  • Please put all relevant info in the question itself. Comments can be deleted at any time. Thx. – Drew Jan 16 '20 at 22:47
  • IMO the answer is "no", but I'm not sure it's very useful, as always with yes/no questions – Stefan Jan 17 '20 at 4:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.