[Top][All Lists]

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

suggested feature -- console-mode frame title sets Xterm title

From: Eric Hanchrow
Subject: suggested feature -- console-mode frame title sets Xterm title
Date: 14 Jun 2002 09:49:03 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

In GNU Emacs 21.2.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2002-03-22 on raven, modified by Debian
configured using `configure  i386-debian-linux-gnu --prefix=/usr 
--sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib 
--infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --with-x=yes 
--with-x-toolkit=athena --without-gif'

I've been using Emacs in console mode recently, via an SSH connection
from a Windows box (using the very nice Windows SSH client "putty" --
http://www.chiark.greenend.org.uk/~sgtatham/putty).  That program,
naturally, creates a console window for me to type in, and it changes
the window's title when the program running under it sends escape
sequences.  To exploit that feature of Putty, when I'm just using the
shell (as opposed to using Emacs) I've set this variable in Bash:

        PROMPT_COMMAND='echo -ne "\033]0;${USER:address@hidden: ${PWD}\007"'

This causes Bash to emit a bunch of characters every time it prints a
prompt; Putty responds by changing the window title (to include my
user name, host name, and working directory, obviously).

This escape sequence doesn't work just with Putty; it apparently
conforms to some standard or other, because other programs (such as
xterm) similarly change their window-bar title in response.

I'm proposing that Emacs, when running under a console (as opposed to
running under X), behave similarly to Bash -- that is, that it (when
the user so requests) send those sorts of characters, thus updating
Putty, or the xterm it's running under, or whatever, in the same
situations in which it would modify its frame title if it were running
under X.

I don't know if this is possible, although I suspect it is; I haven't
tried to hack something up myself.  I'd be interested to hear comments
from Emacs developers -- is this worth doing, has it already been
done, etc.  If it seems worth doing, I'll give it a whirl and if I'm
happy with what I've done, I'll submit it as a patch.

PGP Fingerprint: 3E7B A3F3 96CA 8958 ACC5  C8BD 6337 0041 C01C 5276

reply via email to

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