*major caveat*:  I just started building tmux from the source.  Trying
to answer this question was my first dive into the source.

From looking at the source (grep "set_title"), it looks like the title
is automatically updated [server_client_set_title()] if you have the
"set-titles" option on.  Alas, if you -don't- have it on it looks like
you won't get the initial change to "emacs".

It looks like there is code in server_client_set_title() to
explicitely change the client title back to the title derived from the
template, if it has changed.  I'm not sure if tmux is capturing the
"\033]0;...\007" sent by emacs (or other programs) and stashing it for
later restoration.  It doesn't look like it, since there is no
window->title or window_pane->title.  So, it looks like your options
are set-titles=on (too clever, what you've seen) or set-titles=off
(complete dumb, leaves it up to the programs).

Drew


On Fri, Feb 26, 2010 at 4:20 AM, Trent W. Buck <t...@cybersource.com.au> wrote:
> It seems that tmux is more clever than I am.
>
> I open a new window (running bash).  Therein, I run emacs -Q -f ielm.
> At this point, tmux says the title is "emacs".  Good!  Now, I attempt to
> have emacs set the window title to something more meaningful than
> "emacs", such as the name of the file being edited.
>
>   ELISP> (send-string-to-terminal "\ekEĥoŝanĝo ĉiuĵaŭde, Γειά σας, שלום, 
> Здравствуйте!\e\\")
>   nil
>   ELISP>
>
> Hooray, it worked.  And unlike Screen, it got Unicode right!  But wait;
> after less than a second, something has set the window title back to
> "emacs".  This is not what I want!
>
> My bash PS1 includes the Screen shelltitle escape sequence (case $TERM
> in (screen*) PS1="\[\134\033k\033\134\015\]$PS1";; esac) so I tried tmux
> neww "emacs -Q -f ielm" but the new window exhibited the same behaviour.
>
> The manpage doesn't appear to mention any relevant escape sequences, so
> short of RTFSing I'm not sure how to determine what I'm doing wrong.
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to