emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: search-invisible and friends


From: Yuri Khan
Subject: Re: search-invisible and friends
Date: Fri, 11 Sep 2020 12:35:53 +0700

On Thu, 10 Sep 2020 at 22:04, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> OTOH, maybe there could be unusual circumstances where it would make
> sense to consider hidden text as "visible" (e.g. if the `display`
> property replaces the text with something that looks very much like the
> same text, tho maybe rendered a bit differently).  So, maybe there
> should be a value of `no-search` (or some other property) which says
> "please do consider this text as visible even tho it's technically
> hidden".

In this thread, I see attempts to implement an ad-hoc rule for
ignoring or not ignoring parts of buffer text when searching. I wonder
what happens if we attack the issue from a different angle.

The ‘display’ property can replace buffer text with a different string
or an image for purposes of display. Maybe it makes sense to have a
property that can similarly specify a different string for purposes of
search? A property that can replace buffer text with a different
string or a waveform for purposes of text-to-speech?

A base64-encoded image would specify ‘display’ to display an image,
‘search’ to an empty string, and ‘speak’ to "image" or something
descriptive (cf. HTML <img alt>).

A mode could propertize the string ‘LaTeX’ with ‘display’ = nice image
of the LaTeX logo but no ‘search’ or ‘speak’ properties (so search and
text-to-speech work on the original representation).

A mode that replaces one word with another could decide which aspects
(display, search and/or text-to-speech) it wants to affect and how.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]