Subject: bug#78474: 31.0.50; Wrong char insertion in rxvt

From: Eli Zaretskii <[email-masked]>
Date: Mon, 21 Jul 2025 18:54:45 +0300

> Date: Mon, 21 Jul 2025 17:47:30 +0200
> From: Seb Hinderer <[email-masked]>
> Cc: Samuel Thibault <[email-masked]>, [email-masked],
> 	[email-masked], [email-masked]
> 
> Eli Zaretskii (2025/07/21 18:43 +0300):
> > > Date: Mon, 21 Jul 2025 17:34:22 +0200
> > > From: Samuel Thibault <[email-masked]>
> > > Cc: Seb Hinderer <[email-masked]>, [email-masked],
> > > 	[email-masked], [email-masked]
> > >
> > > > I see where you're coming from, but IMO such a change can only fly if
> > > > we enabled this new behavior when some screen-reading software is in
> > > > use.  And that requires some means for Emacs to detect this.  If
> > > > someone knows how to do that on Posix systems, please speak up.
> > >
> > > That does not exist in terminals, only in graphical sessions
> >
> > How come?  Screen readers should announce themselves quite prominently
> > to any system,
> 
> Can you elaborate why you are thingking so?

Because catching screen output is not an easy feat on modern
platforms.

> > so I'd be very surprised to hear that they are
> > invisible on Linux terminals.
> 
> Well then, be surprised, they are. Basically the kernel provides
> /dev/vcsa and then every tool that needs to monitor the screen reads it.
> There is no API for a screen reader to present itself as such because
> there has never really been the need for that.

Then maybe the /dev/vcsa driver itself could be the sign we need?  Or
any of those other tools you mention?  Anything that happens on those
systems and can serve as a reliable-enough indication of the use of
screen-reading software, will do.