Subject: bug#28591: 27.0.50; xterm-set-window-title

From: Eli Zaretskii <[email-masked]>
Date: Fri, 29 Sep 2017 13:45:36 +0300

> Date: Tue, 26 Sep 2017 00:08:08 -0400
> From: Mark Oteiza <[email-masked]>
> Cc: [email-masked]
> 
> > > The following lightly tested patch appears to do the right thing here.
> > 
> > Thanks.  I tried.  But nothing seems to be changed unfortunately.
> > When I run `emacs -nw' in the xterm, the title becomes to
> > "emacs@hostname" but the original title "xterm" is not pushed to
> > the `xterm-window-title-stack' variable.  And the title does not
> > come back to "xterm" when I exit or suspend Emacs -nw.
> > 
> > I tried adding `(error "XXX")' to the `xterm--title-handler'
> > function but nothing happens (with no error).  So, the function
> > doesn't seem to run by way of `xterm-push-title-stack'.
> 
> Grr, thanks.  I see what you're seeing in XTerm 330.  I am stumped--not
> sure this is possible in Elisp, so I'm inclined to revert.

That'd be too drastic, I think.  The code did work for you, right?  So
it definitely works for some configurations out there, and I think we
could leave it in Emacs, turned off by default, and allow its optional
activation with the proper warning that it might not work for some
versions of xterm.

WDYT?